View Single Post
  #3   Spotlight this post!  
Unread 24-10-2010, 21:24
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: How to code Macanum ddrive

Quote:
Originally Posted by RoboMaster View Post
"Tank-based holo drive" (what Ether was describing): robot is driven normally like a tank: two joysticks control the left and right wheels of the robot.
Correct. You use the Y axis of each joystick for tank drive.

Quote:
But, when the driver presses a button, the robot switches to strafing only
That's not what I was describing. When you hold a button down, it enables the X axis of, say, the right joystick. The X-axis controls strafing. But the Y axes are not disabled. The Y axes of the 2 joysticks continue to operate as tank drive in this mode, controlling the fwd/rev and rotate degrees of freedom. So the driver, if skilled enough, can control all three degrees of freedom simultaneously.

The button is not required. You could leave the X-axis (strafe command) enabled all the time. Field experience has shown, however, that it is useful to disable the X-axis unless it is needed. This way, the driver doesn't unintentionally command strafe when he doesn't want it.


Quote:
This might be a little trickier and would require a combination of the holo drive VI and the tank drive VI (switching between the two based on if the button was pressed).
All it requires is the cartesian mecanum vi. No switching is required. Calculate (Y1+Y2)/2 and feed it to the cartesian mecanum vi "Y" input (fwd/rev). Calculate (Y1-Y2)/2 and feed it to the "rotation" input. Feed X to the X input (strafe). This will provide tank drive with the left and right joystick Y axes; and when X is not zero you will get strafing too.

Quote:
However, this is nice and easy to drive because you normally just drive with the tank drive technique, which is intuitive. The strafing is like an added bonus.
Exactly.

Quote:
(Note: you could use arcade drive instead of tank drive, which would require only one joystick. The point is that you're switching between that and holo drive to enable strafing).
You could use 2 joysticks for arcade+strafe with the cartesian mecanum vi: Y1 for fwd/rev, X1 for rotate, and X2 for strafe.






Last edited by Ether : 24-10-2010 at 21:51.
Reply With Quote