|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Since our robot is driven with tank drive, we had to convert NI's robot centering code from arcade drive to tank drive. It is not working right now, so we would appreciate if you could help us out...
The code uses the camera and gyro to center the robot with the camera, as you may know. But it sends out one value for the X axis of an arcade drive robot. So I took that value and made 2 out of it for each side of the drive. See my logic for negating one of them in the picture of my code. Unfortunately this doesn't seem to work, as it turns in the wrong direction. When I negated the other side of the drive instead, it still turned in the wrong direction. By the way, I multiplied the initial value by .5 because the robot was turning too fast, kept overshooting, and swaying side to side. But after this, it started acting weird. Thanks for any of your help! |
|
#2
|
|||||
|
|||||
|
Re: Target tracking/centering converted to tank drive: help?
You didn't actually have to convert the self-centering code to Tank Drive.
You can mix the two driving modes as long as you are using Tank Mode in every place you expect the drivers to have direct control of the drive motors. If the robot is driving on it's own, e.g., self-centering or Autonomous, then you don't really care which method (Tank vs Arcade) is currently active. In any case, to convert Arcade-style inputs to Tank-style... Arcade is speed and rotation, so you want to convert the rotation to a differential between the two tank sides then apply speed, keeping everything in proportion. Last edited by Mark McLeod : 04-03-2010 at 21:30. |
|
#3
|
||||
|
||||
|
Re: Target tracking/centering converted to tank drive: help?
I think I see where you're going with not having to convert, meaning that you just control the drive with the Arcade Drive VI when you are driving it autonomously. We would have to switch out some stuff in the code since we are controlling it manually with Motor Set Speed VIs (long story on why we wouldn't use the Tank Drive VI), but I don't think it would be that bad.
With actually converting it, there is no speed because the centering VI always sends out 0 for Y. So it's a simple matter of running the two sides of the drive train at the speed it sends out for X. You just have to negate one to run it backwards, which I reasoned to be the right side one. So why did it still not work? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Team 39: Target AND Field Oriented Drive (Target tracking) | TotalChaos | Robot Showcase | 13 | 02-03-2010 15:55 |
| Need help with tank drive | nickcvet89 | NI LabVIEW | 16 | 02-02-2010 16:35 |
| Tank and Arcade Drive Help? | baihooli3022 | FRC Control System | 2 | 25-01-2010 22:36 |
| Tank Drive help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | Idaman323 | Programming | 3 | 18-02-2005 15:17 |