Go to Post I always get a little stressed as arm operator, especially with Paul Copioli standing behind me screaming at me. - JohnnyB [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-02-2015, 15:08
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Python: Robot's turning is opposite?

Hi! We are almost finished with our robot but I have one annoying issue to fix. The robot turns the opposite way then what it should. Forward and backward is fine but turning isn't. I am using the "robotdrive.arcadedrive(joystick, True)". Any ideas would be appreciated!
  #2   Spotlight this post!  
Unread 16-02-2015, 15:27
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: Python: Robot's turning is opposite?

If front/back are correct but turns are reversed, it is likely that you have two separate problems that are almost but not quite cancelling each other out. First, you have your left and right motors swapped. Second, you have the wrong motors inverted.

I am not familiar with how to define drive motors in Python, so I can't give you specific instructions for how to fix them in code. If you'd rather swap the wiring, you can do that instead. Just don't change both the hardware and the software.
  #3   Spotlight this post!  
Unread 16-02-2015, 15:33
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: Python: Robot's turning is opposite?

Quote:
Originally Posted by Alan Anderson View Post
If front/back are correct but turns are reversed, it is likely that you have two separate problems that are almost but not quite cancelling each other out. First, you have your left and right motors swapped. Second, you have the wrong motors inverted.

I am not familiar with how to define drive motors in Python, so I can't give you specific instructions for how to fix them in code. If you'd rather swap the wiring, you can do that instead. Just don't change both the hardware and the software.
Thanks! I should have thought about swapping the motors. I and the drivers appreciate it!
  #4   Spotlight this post!  
Unread 16-02-2015, 16:16
Christopher149 Christopher149 is offline
Registered User
FRC #0857 (Superior Roboworks) FTC 10723 (SnowBots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Houghton, MI
Posts: 1,104
Christopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond repute
Re: Python: Robot's turning is opposite?

Or, if I'm interpreting your description correctly, perhaps the right and left joysticks are flipped on the driver station. Edit: just make sure to try only one of these suggestions at a time, because each "fix" will probably negate the other.
__________________
2015-present: FTC 10723 mentor
2012-present: 857 mentor
2008-2011: 857 student

2015: Industrial Design, Excellence in Engineering, District Finalist, Archimedes Division (#6 alliance captain)
2014: Judges Award, District Engineering Inspiration, District Finalist, Galileo Division

  #5   Spotlight this post!  
Unread 16-02-2015, 17:08
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: Python: Robot's turning is opposite?

Quote:
Originally Posted by Christopher149 View Post
...perhaps the right and left joysticks are flipped...
Arcade drive doesn't use right and left joysticks. They're using the variety of arcadedrive() that takes a single joystick as input.
  #6   Spotlight this post!  
Unread 16-02-2015, 17:26
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 238
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: Python: Robot's turning is opposite?

Pastebin?
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
  #7   Spotlight this post!  
Unread 16-02-2015, 21:25
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: Python: Robot's turning is opposite?

Quote:
Originally Posted by TimTheGreat View Post
Pastebin?
Yeah I figured out it was just the motors needing to be flipped around. Thanks to all the answers!
Closed Thread


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 21:05.

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