05-02-2015 03:33 PM
Hello all,
I'm a mentor for a FRC Robotics Team. For the summer, I want to try to make a VI that is able to create sub-programs for the autonomous period. Basically, there would be this canvas that the user could move the "robot" (aka rectangle) around, and it would record its movements and "translate" them into "motor code".
For instance: I want my robot to go straight for about 3 feet, rotate 90 degrees clockwise, and go another 3 feet. I would take the rectangle, drag it up an equivalent 3 feet (maybe using a grid pattern to show 0.5 feet increments), rotate the rectangle 90 degrees clockwise, then drag it another 3 feet.
This is the big picture. Right now, I want to know if it's possible to have a user drag a picture (such as a rectangle) and have the program where it is on a coordinate plane.
Thanks!
05-02-2015 05:30 PM
I'm tempted to say "Yes" based on the following:
I believe there may even be a LabVIEW Example somewhere showing this.
Turning may be the hard part. However, if you are at Location 1 and move the mouse to Location 2, you could, in principle, use the angle going from 1 to 2 to set the rotation of the Object. Thus if you moved the mouse up and down, the (call it a) Car would go up and down. But if you moved the mouse to the right, the car would swivel to the right and then move.
Good luck with this project.
Bob Schor
05-02-2015 05:45 PM
I've been finding similar results. Using the mouse coordinates instead of an object's.
Also, to specify, these robots COULD be (not always) holonomic drive, which, if you don't already know, means they can strafe. So, if it came to that, I would need a rotation factor somehow.
Thanks for the quick response!
05-02-2015 05:49 PM