Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Mecanum wheel twist issues. (http://www.chiefdelphi.com/forums/showthread.php?t=126483)

zackd97 14-02-2014 23:38

Mecanum wheel twist issues.
 
This year we are working with a mecanum drive system. We have everything working peachy but the twist. When we twist the joystick, the robot moves in a completely random pattern. Forward, backward, and strafe are all fine.

To handle the operations we are using the Cartesian mecanum drive. For the twist we tried using

Code:

stick.GetTwist()
and
Code:

stick.GetZ()
Using the GetTwist caused the robot to spaz out upon enabling. Using the GetZ seemed to be working but when twisting the robot acted like it was fighting against itself. At first I thought it may be interference from other joystick values, but I also called the mecanum Cartesian drive with no input besides a 1 for twist, which caused the same spastic behavior as using GetTwist.

Do you guys have any idea what the problem may be? At this point, we think it may be a mechanical issue.

Ether 15-02-2014 09:29

Re: Mecanum wheel twist issues.
 
Quote:

Originally Posted by zackd97 (Post 1343354)
This year we are working with a mecanum drive system. We have everything working peachy but the twist. When we twist the joystick, the robot moves in a completely random pattern. Forward, backward, and strafe are all fine.

To handle the operations we are using the Cartesian mecanum drive. For the twist we tried using

Code:

stick.GetTwist()
and
Code:

stick.GetZ()
Using the GetTwist caused the robot to spaz out upon enabling. Using the GetZ seemed to be working but when twisting the robot acted like it was fighting against itself. At first I thought it may be interference from other joystick values, but I also called the mecanum Cartesian drive with no input besides a 1 for twist, which caused the same spastic behavior as using GetTwist.

Do you guys have any idea what the problem may be? At this point, we think it may be a mechanical issue.

Gently tip the bot up on its side and take a picture of the bottom showing all 4 wheels and post it here.

Then put the bot on blocks (all 4 wheels off the floor) and give it a twist (rotate) command, tell us what direction each of the wheels is spinning.

What model joystick are you using?



zackd97 15-02-2014 14:48

Re: Mecanum wheel twist issues.
 
1 Attachment(s)
Here is a picture of the underside of the bot:
Attachment 16241
Please excuse the sub par wiring job. We're still working on cleaning that up.

When twisting the joystick to the left, the front and back wheels turn away from each other. The front go forward and the back go backward. When twisting the joystick right, that is reversed, with the front going back and the back going forward.

As for the joystick, we are using a Logitech extreme 3D pro.

Ether 15-02-2014 15:37

Re: Mecanum wheel twist issues.
 
Quote:

Originally Posted by zackd97 (Post 1343543)
Here is a picture of the underside of the bot:

All four wheels appear to be mounted in the correct configuration.

Quote:

When twisting the joystick to the left, the front and back wheels turn away from each other. The front go forward and the back go backward. When twisting the joystick right, that is reversed, with the front going back and the back going forward.
That would explain why you are not rotating.

To rotate clockwise, the left wheels should be going forward and the right wheels backward. Vice-versa for turning counter-clockwise.



zackd97 15-02-2014 16:57

Re: Mecanum wheel twist issues.
 
So could this possibly be an issue with the ports the motor controllers are plugged into?

Halo_Kid_3633 15-02-2014 17:03

Re: Mecanum wheel twist issues.
 
A sample code maybe helpful.

Ether 15-02-2014 17:09

Re: Mecanum wheel twist issues.
 
Quote:

Originally Posted by zackd97 (Post 1343579)
So could this possibly be an issue with the ports the motor controllers are plugged into?

At this point, I would say it appears to be either a wiring error or a code error. I bet if you post your code and focused pictures of how you have the motors wired you'll get more detailed help.



zackd97 15-02-2014 18:11

Re: Mecanum wheel twist issues.
 
Right now the only portion of code that has anything to do with the driving looks like this:
Code:

myRobot.MecanumDrive_Cartesian(stick.GetX(), stick.GetY(), stick.GetZ());
stick being the joystick and myRobot being the robot drive.

The ports are initialized as so:
Code:

myRobot(1,2,3,4),
stick(1)

The wiring is as follows:
Front left motor- Port 1
Front right motor- Port 2
Back left motor- Port 3
Back right motor- Port 4

EDIT:
I forgot as a side note, the MecanumDrive_Cartesian calls for input from a gyro at the end. That has not been included yet as we are working on getting our gyro mounted and working now.

Alan Anderson 15-02-2014 21:24

Re: Mecanum wheel twist issues.
 
Quote:

Originally Posted by zackd97 (Post 1343613)
The wiring is as follows:
Front left motor- Port 1
Front right motor- Port 2
Back left motor- Port 3
Back right motor- Port 4

The RobotDrive constructor takes four motors in the order frontLeft, rearLeft, frontRight, rearRight. It looks like you have ports 2 and 3 swapped.

zackd97 16-02-2014 21:04

Re: Mecanum wheel twist issues.
 
Quote:

Originally Posted by Alan Anderson (Post 1343715)
The RobotDrive constructor takes four motors in the order frontLeft, rearLeft, frontRight, rearRight. It looks like you have ports 2 and 3 swapped.

This was the solution. Thank you!


All times are GMT -5. The time now is 12:42.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi