Go to Post Way to steal my thunder, Billfred! :p - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-01-2017, 23:45
yank's Avatar
yank yank is offline
Registered User
AKA: Kenneth
FTC #0207
Team Role: Leadership
 
Join Date: Nov 2016
Rookie Year: 2015
Location: New Jersey
Posts: 9
yank is an unknown quantity at this point
Programming for Mecanum Wheel Chassis

Hello,

My team is trying out mecanum wheels (AndyMark 4 inch diameter) on our robot for FTC Velocity Vortex. Driving forwards, backwards, and turning works fine, however, we are not able to strafe sideways.

When we press the gamepad A button or the gamepad B button (our strafe controls), the robot moves in random directions, although occasionally it does strafe properly for a few seconds (which probably rules out any mechanical reasons for failure).

N.B.: "Bot" is a public class (please see bot.java); FL, FR, BL, BR refer to motors that power mecanum wheels (front-left, front-right, back-left, back-right respectively)

We suspect that using the "Bot" class causes problems, though we are not completely sure why or if that is true at all.

We would greatly appreciate any advice on this matter. I've posted links to our code below:

Teleop program
Direction (enum)
Bot.java

Thank you very much.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-01-2017, 01:46
sher_221b's Avatar
sher_221b sher_221b is offline
Registered User
AKA: Sadiyo Hassan
FRC #4818 (The Herd (4818))
 
Join Date: Apr 2016
Rookie Year: 2016
Location: West Fargo, North Dakota
Posts: 1
sher_221b is an unknown quantity at this point
Quote:
Originally Posted by yank View Post
Hello,



My team is trying out mecanum wheels (AndyMark 4 inch diameter) on our robot for FTC Velocity Vortex. Driving forwards, backwards, and turning works fine, however, we are not able to strafe sideways.



When we press the gamepad A button or the gamepad B button (our strafe controls), the robot moves in random directions, although occasionally it does strafe properly for a few seconds (which probably rules out any mechanical reasons for failure).



N.B.: "Bot" is a public class (please see bot.java); FL, FR, BL, BR refer to motors that power mecanum wheels (front-left, front-right, back-left, back-right respectively)



We suspect that using the "Bot" class causes problems, though we are not completely sure why or if that is true at all.



We would greatly appreciate any advice on this matter. I've posted links to our code below:



Teleop program

Direction (enum)

Bot.java



Thank you very much.

There is code out there for mecanum drive you can find to verify your code. Our team built 3 drive trains this year and I was part of the mecanum team. Though I wasn't in charge of coding, our robot was having the same issue of unable to drive side ways or diagonal. We realized the orientation of the wheel affected it's mobility drastically and if it wasn't in the correct order, it would prohibit sideways movement. Before changing the code, look up orientation of the wheels because there are different orientations out there and we did it 3 different ways before it worked with our code.


Sent from my iPhone using Tapatalk
Reply With Quote
  #3   Spotlight this post!  
Unread 08-01-2017, 08:56
GeeTwo's Avatar
GeeTwo GeeTwo is online now
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,736
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Programming for Mecanum Wheel Chassis

As above.

One possible scenario which could cause your issue is if you swapped the control signal to the wheels on either the left or the right side (whether in code or wiring). Forward, reverse, and spinning would all work just fine, but strafing would try to compress or stretch the robot along the width axis.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #4   Spotlight this post!  
Unread 08-01-2017, 08:37
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: Programming for Mecanum Wheel Chassis

Quote:
Originally Posted by yank View Post
Driving forwards, backwards, and turning works fine, however, we are not able to strafe sideways.
Put the bot up on blocks and tell us what each wheel is doing when you give a pure strafe command.

Also, post a bird's-eye (or worm's eye) picture of the bot so we can see how the 4 mec wheels are mounted.


Reply With Quote
  #5   Spotlight this post!  
Unread 08-01-2017, 09:01
yank's Avatar
yank yank is offline
Registered User
AKA: Kenneth
FTC #0207
Team Role: Leadership
 
Join Date: Nov 2016
Rookie Year: 2015
Location: New Jersey
Posts: 9
yank is an unknown quantity at this point
Re: Programming for Mecanum Wheel Chassis

Quote:
Originally Posted by Ether View Post
Put the bot up on blocks and tell us what each wheel is doing when you give a pure strafe command.

Also, post a bird's-eye (or worm's eye) picture of the bot so we can see how the 4 mec wheels are mounted.


Pictures

The "top view" picture shows our robot from earlier this week when we put the wheels on. We have not moved the wheels at all, but we did change the gear ratio (originally geared for speed, now geared for torque, as seen in the "full bot" picture)

Unfortunately I don't have a video of the bot on blocks, but the wheels turn erratically (the reason we suspect it's a programming issue).

We did do some tests earlier with another program although we still had our old speed gear ratio at that point. The wheels spun as they were supposed to (left side wheels spinning towards each other, right side wheels spinning away from each other, and vice-versa for strafing in the other direction), but the robot moved diagonally (when we tried left strafe, it moved forward diagonally to the left, when we tried right strafe, it moved forward diagonally to the right. We thought that our robot did not have enough torque to strafe properly, so we changed the gear ratio to what it is now.

Was our conjecture about torque a valid one?

Thanks for your help!
Reply With Quote
  #6   Spotlight this post!  
Unread 08-01-2017, 09:24
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: Programming for Mecanum Wheel Chassis

Quote:
Originally Posted by yank View Post
The "top view" picture shows our robot from earlier this week when we put the wheels on.
I see only two motors. You are using four motors (one for each wheel), yes?

It looks like you are actually gearing up the speed from the motor to the wheels. Yikes. I don't know what kind of motors you are using, but if they are anything like FRC motors you need to gear them down. Way down.


Reply With Quote
  #7   Spotlight this post!  
Unread 08-01-2017, 09:30
yank's Avatar
yank yank is offline
Registered User
AKA: Kenneth
FTC #0207
Team Role: Leadership
 
Join Date: Nov 2016
Rookie Year: 2015
Location: New Jersey
Posts: 9
yank is an unknown quantity at this point
Re: Programming for Mecanum Wheel Chassis

Quote:
Originally Posted by Ether View Post
I see only two motors. You are using four motors (one for each wheel), yes?

It looks like you are actually gearing up the speed from the motor to the wheels. Yikes. I don't know what kind of motors you are using, but if they are anything like FRC motors you need to gear them down. Way down.


Yes, we are using one motor per wheel. That picture was taken before we got all the motors on.

We geared the motors down yesterday (2:1).
Reply With Quote
  #8   Spotlight this post!  
Unread 08-01-2017, 09:48
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: Programming for Mecanum Wheel Chassis

Quote:
Originally Posted by yank View Post
We geared the motors down yesterday (2:1).
What is the free speed of the motors you are using?


Reply With Quote
  #9   Spotlight this post!  
Unread 08-01-2017, 10:05
yank's Avatar
yank yank is offline
Registered User
AKA: Kenneth
FTC #0207
Team Role: Leadership
 
Join Date: Nov 2016
Rookie Year: 2015
Location: New Jersey
Posts: 9
yank is an unknown quantity at this point
Re: Programming for Mecanum Wheel Chassis

Quote:
Originally Posted by Ether View Post
What is the free speed of the motors you are using?


160 rpm (they're AndyMark NeveRest 40s)
Reply With Quote
  #10   Spotlight this post!  
Unread 08-01-2017, 11:06
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: Programming for Mecanum Wheel Chassis

Quote:
Originally Posted by yank View Post
160 rpm (they're AndyMark NeveRest 40s)
That's a gearmotor. It's already been geared way down (40:1)

Max power is only 14 watts. How fast do you need to go, and how heavy is that robot going to be?




Last edited by Ether : 08-01-2017 at 11:11.
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 15:30.

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