Go to Post I just... I can't even comprehend it. Like, my brain is soup. Commas are everywhere. Sentences. Shrinking. zzzzzzzzzzzz... - PayneTrain [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-02-2014, 12:08
Mr. 1033's Avatar
Mr. 1033 Mr. 1033 is offline
Registered User
AKA: Paul E. Lathrop
FRC #1033 (Team CLUTCH)
Team Role: Coach
 
Join Date: Jun 2012
Rookie Year: 2003
Location: United States
Posts: 40
Mr. 1033 is a jewel in the roughMr. 1033 is a jewel in the roughMr. 1033 is a jewel in the roughMr. 1033 is a jewel in the rough
Mec wheel help

I was wondering if anyone could point me to some basic, working C++ mecanum drive code. We have successfully compiled and deployed code using the cartesian and polar mecanum drive methods, but our robot behaves in unexpected ways when we try to run the code in teleop.

First, the robot's wheels start moving before the joystick is even touched by the drivers. Then, when they do push forward and back and left and right on the joystick, is seems to have no effect on the drive train.

We're using the 3 D joystick.

We aren't sure if we are sending bad values in the code, or if we have hardware or wiring issues.

[Note: the robot ran fine using robot drive code with one joystick in arcade mode, so we're stumped.]

Any help would be greatly appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2014, 12:22
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
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: Mec wheel help

Quote:
Originally Posted by Mr. 1033 View Post
We have successfully compiled and deployed code using the cartesian and polar mecanum drive methods, but our robot behaves in unexpected ways when we try to run the code in teleop.

...

[Note: the robot ran fine using robot drive code with one joystick in arcade mode, so we're stumped.]
Was the only difference between the red and green the mec vs arcade drive code? Or are there other differences (even non-drivetrain-related code)?



Last edited by Ether : 07-02-2014 at 13:36. Reason: didn't see your note
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2014, 12:47
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: Mec wheel help

Quote:
Originally Posted by Mr. 1033 View Post
Any help would be greatly appreciated.
We don't have much to base our help on. Show us your drive code and we'll be happy to suggest things to look at.

That your motors move before you tell them to is worrisome. I would suspect a wiring issue, except that you say it worked with Arcade Drive.
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2014, 16:57
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: Mec wheel help

We are having the same issues.
__________________
haha

- Yup Me
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2014, 14:10
Toa Circuit's Avatar
Toa Circuit Toa Circuit is offline
Thaddeus Maximus
AKA: Thad Hughes
FRC #4213 (MetalCow Robotics)
Team Role: Leadership
 
Join Date: Nov 2012
Rookie Year: 2012
Location: Shirley, IL
Posts: 131
Toa Circuit is an unknown quantity at this point
Re: Mec wheel help

Sounds like:
Bad joysticks
or
Joysticks being moved before plugged in (When you plug in a joystick, most axes home themselves upon power on).
__________________

2012 Head of Programming and Electrical
2013-14 Overall Team Captain and Programming Head
2012-14 Mentor of FLL Team Power Surge
2014 Dean's List Finalist
2014 CIR Xerox Creativity Award
Webpage
Reply With Quote
  #6   Spotlight this post!  
Unread 14-02-2014, 02:22
TheVoid's Avatar
TheVoid TheVoid is offline
C++ programmer
AKA: Liam Taylor
FRC #2605 (Sehome Seamonsters)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Bellingham
Posts: 8
TheVoid is an unknown quantity at this point
Re: Mec wheel help

Hi there, just in case:
What sort of motor driver setup are you using? Is it closed loop? (If so, did you change anything about that too?)

As well, could it be that something besides your drive code is trying to set your motor controllers?

Finally, if you put the robot into any other enabled mode than Tele-operated, does this behavior show up? ( I suppose you would want to use Test mode for this )
__________________
"Just look for the rectangle. Simple!"
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 14:35.

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