![]() |
Mecanum Code weird bug need help
1 Attachment(s)
Using Windriver C++
4 wheel drive mecanum Jaguars motor controllers (calibrated manually) PWM Logitech Extreme 3D Joystick All electrical has been checked and while there is no such thing as an absolute appears to be wired accurately We have reimaged the cRio to ensure we do not have garbage code randomly running Using the mecanum base code provided by FIRST Behavior we are seeing: forward works as expected reverse works as expected strafe works as expected Turning either direction (left or right) wheels do not spin in proper directions and fight each other If anyone has time and is willing could you please help us find our error? I have attached all code and we would appreciate your help as this is interefering with our drive practice and we don't want to upload broken code on our bot at competiton Thank you... |
Re: Mecanum Code weird bug need help
I haven't looked at the code, but could you describe how the wheels are mounted on the robot? do the rollers on the wheels make a diamond or an X on the ground?
i.e. /\ \/ diamond \/ /\ X |
Re: Mecanum Code weird bug need help
I am their coach...rollers are in X pattern
|
Re: Mecanum Code weird bug need help
Quote:
It is possible the wheels are spinning the correct way, but you have the wheels mounted with the roller orientation incorrect. For pure clockwise rotation, the left wheels should be spinning forward and the right wheels backward. |
Re: Mecanum Code weird bug need help
Quote:
Viewed from above should be X Viewed from below should be diamond. Put vehicle up on blocks and command a turn and tell us what each of the 4 wheels is doing. |
Re: Mecanum Code weird bug need help
Quote:
|
Re: Mecanum Code weird bug need help
When joystick is twisted left:
'front' wheels spin backwards (both) 'back' wheels spin forward (both) When joystick is twisted right: 'front' wheels spin forward (both) 'back' wheels spin backwards (both) According to the programmer if he changes the code to make turning work properly then it will break strafing...?? Something is not sounding right to me on this... |
Re: Mecanum Code weird bug need help
Quote:
Quote:
|
Re: Mecanum Code weird bug need help
Quote:
If lefts and rights were set as fronts and backs, and not inverted it would be consistent with what you describe. |
Re: Mecanum Code weird bug need help
Quote:
http://www.google.com/imgres?start=2...w=1486&bih=723 Is this not correct? According to the instructions we recieved with the wheels this is correct... |
Re: Mecanum Code weird bug need help
Quote:
|
Re: Mecanum Code weird bug need help
Quote:
If Left are in front and Rights in the back (or vice versa): stick forward all turn forward, ditto back stick to the side and left and right counter rotate so you still strafe (if the front-rear of the two sides are also swapped relatively) but if you try to turn in place fronts and backs go opposite Sorry if that isn't terribly clear, but I would check the order your controllers are in the constructor really match physical L-R/F-R |
Re: Mecanum Code weird bug need help
Quote:
|
Re: Mecanum Code weird bug need help
Assuming the wheels are installed correctly (X pattern viewing from the top), it could be a software issue. The way we software calibrated our mecanum drive train is as the following:
|
Re: Mecanum Code weird bug need help
how exactly would we write that if wanted to invert the motors for 1 and 3
|
| All times are GMT -5. The time now is 12:34. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi