Go to Post Something is subtly different about the competition environment that makes everything worse. - kaszeta [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 14-02-2014, 23:38
zackd97 zackd97 is offline
Registered User
FRC #4102
 
Join Date: Feb 2013
Rookie Year: 2013
Location: New Mexico
Posts: 16
zackd97 is an unknown quantity at this point
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2014, 09:29
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
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: Mecanum wheel twist issues.

Quote:
Originally Posted by zackd97 View Post
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?


Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2014, 14:48
zackd97 zackd97 is offline
Registered User
FRC #4102
 
Join Date: Feb 2013
Rookie Year: 2013
Location: New Mexico
Posts: 16
zackd97 is an unknown quantity at this point
Re: Mecanum wheel twist issues.

Here is a picture of the underside of the bot:
Click image for larger version

Name:	share.jpg
Views:	39
Size:	169.3 KB
ID:	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.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2014, 15:37
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
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: Mecanum wheel twist issues.

Quote:
Originally Posted by zackd97 View Post
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.


Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2014, 16:57
zackd97 zackd97 is offline
Registered User
FRC #4102
 
Join Date: Feb 2013
Rookie Year: 2013
Location: New Mexico
Posts: 16
zackd97 is an unknown quantity at this point
Re: Mecanum wheel twist issues.

So could this possibly be an issue with the ports the motor controllers are plugged into?
Reply With Quote
  #6   Spotlight this post!  
Unread 15-02-2014, 17:03
Halo_Kid_3633's Avatar
Halo_Kid_3633 Halo_Kid_3633 is offline
Registered User
FRC #3633 (Catayst)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Albert Lea, MN
Posts: 9
Halo_Kid_3633 is an unknown quantity at this point
Re: Mecanum wheel twist issues.

A sample code maybe helpful.
__________________
haha

- Yup Me
Reply With Quote
  #7   Spotlight this post!  
Unread 15-02-2014, 17:09
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
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: Mecanum wheel twist issues.

Quote:
Originally Posted by zackd97 View Post
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.


Reply With Quote
  #8   Spotlight this post!  
Unread 15-02-2014, 18:11
zackd97 zackd97 is offline
Registered User
FRC #4102
 
Join Date: Feb 2013
Rookie Year: 2013
Location: New Mexico
Posts: 16
zackd97 is an unknown quantity at this point
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.

Last edited by zackd97 : 15-02-2014 at 18:19.
Reply With Quote
  #9   Spotlight this post!  
Unread 15-02-2014, 21:24
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Mecanum wheel twist issues.

Quote:
Originally Posted by zackd97 View Post
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.
Reply With Quote
  #10   Spotlight this post!  
Unread 16-02-2014, 21:04
zackd97 zackd97 is offline
Registered User
FRC #4102
 
Join Date: Feb 2013
Rookie Year: 2013
Location: New Mexico
Posts: 16
zackd97 is an unknown quantity at this point
Re: Mecanum wheel twist issues.

Quote:
Originally Posted by Alan Anderson View Post
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!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:21.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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