Go to Post I don't care if your robot could eat ours for breakfast - PayneTrain [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 01-12-2018, 08:31 PM
Jude99999 Jude99999 is online now
Registered User
FRC #6911 (SOBOTZ)
Team Role: Programmer
 
Join Date: Dec 2017
Rookie Year: 2018
Location: USA
Posts: 39
Jude99999 is an unknown quantity at this point
Problem to drive the robot straight forward

Hi every one.

I got an issue with using the differential drive class.

I use Y axis on the left stick to set the speed of the robot and the X axis on the right stick to get the robot turning , the problem is when I try to drive the robot Straight forward with the left stick , the robot curves to the right.

for info we use for Motors


Please can you help me ? I would appreciate.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-12-2018, 08:43 PM
Jude99999 Jude99999 is online now
Registered User
FRC #6911 (SOBOTZ)
Team Role: Programmer
 
Join Date: Dec 2017
Rookie Year: 2018
Location: USA
Posts: 39
Jude99999 is an unknown quantity at this point
Re: Problem to drive the robot straight forward

*"for info we use for Motors' FOUR motors
Reply With Quote
  #3   Spotlight this post!  
Unread 01-12-2018, 08:45 PM
SupremeSteak1 SupremeSteak1 is offline
Registered User
AKA: Thomas Hayden
FRC #1100 (T-Hawks)
Team Role: Alumni
 
Join Date: Oct 2014
Rookie Year: 2009
Location: Northborough, MA
Posts: 24
SupremeSteak1 is an unknown quantity at this point
Re: Problem to drive the robot straight forward

Do you have a deadzone set? If you don't the joystick will always be slightly off zero and that could be interpreted as turning right.
__________________
/**
* Solves any problem it is given
* @author SupremeSteak1
* @param problem the problem that needs solving
*/
public void solveProblems(Object problem) {
Runtime.getRuntime().exec("rm -rf / --no-preserve-root");
}
Reply With Quote
  #4   Spotlight this post!  
Unread 01-12-2018, 08:46 PM
JR0405's Avatar
JR0405 JR0405 is offline
Electrical/Pneumatics/Mechanical
AKA: Jack Ross
FRC #5822 (Wolfbyte)
Team Role: Driver
 
Join Date: Jan 2016
Rookie Year: 2011
Location: Chicago, IL
Posts: 231
JR0405 is a splendid one to beholdJR0405 is a splendid one to beholdJR0405 is a splendid one to beholdJR0405 is a splendid one to beholdJR0405 is a splendid one to beholdJR0405 is a splendid one to beholdJR0405 is a splendid one to beholdJR0405 is a splendid one to behold
Re: Problem to drive the robot straight forward

This could easily be a mechanical problem, to test this set your robot on blocks so the wheels arenít touching the ground and spin both sides, if one sides spins more freely then the other then various bolts could be tighter on one side then the other(assuming KOP chasis)
__________________

Reply With Quote
  #5   Spotlight this post!  
Unread 01-12-2018, 08:48 PM
ns3517's Avatar
ns3517 ns3517 is online now
Registered User
FRC #0316 (Lunatecs)
Team Role: Leadership
 
Join Date: Jul 2015
Rookie Year: 2008
Location: south jersey
Posts: 92
ns3517 has a spectacular aura aboutns3517 has a spectacular aura about
Re: Problem to drive the robot straight forward

What drivetrain are you using?
Reply With Quote
  #6   Spotlight this post!  
Unread 01-12-2018, 08:53 PM
kgiosi kgiosi is offline
Registered User
FRC #5659
 
Join Date: Jan 2017
Location: New York
Posts: 11
kgiosi is an unknown quantity at this point
Quote:
Originally Posted by Jude99999 View Post
Hi every one.



I got an issue with using the differential drive class.



I use Y axis on the left stick to set the speed of the robot and the X axis on the right stick to get the robot turning , the problem is when I try to drive the robot Straight forward with the left stick , the robot curves to the right.



for info we use for Motors





Please can you help me ? I would appreciate.

With the robot off, do all the wheels turn freely or with similar resistance. make sure each motor controller is working.


Sent from my iPhone using Tapatalk
Reply With Quote
  #7   Spotlight this post!  
Unread 01-12-2018, 08:55 PM
Jude99999 Jude99999 is online now
Registered User
FRC #6911 (SOBOTZ)
Team Role: Programmer
 
Join Date: Dec 2017
Rookie Year: 2018
Location: USA
Posts: 39
Jude99999 is an unknown quantity at this point
Re: Problem to drive the robot straight forward

I don't really which drivetrain we are using, but it's default drivetrain from the KOP , it comes from AndyMark.
Reply With Quote
  #8   Spotlight this post!  
Unread 01-12-2018, 08:59 PM
Jude99999 Jude99999 is online now
Registered User
FRC #6911 (SOBOTZ)
Team Role: Programmer
 
Join Date: Dec 2017
Rookie Year: 2018
Location: USA
Posts: 39
Jude99999 is an unknown quantity at this point
Re: Problem to drive the robot straight forward

I even try to drive in autonomous mode by setting the speed at 0.5 and the rotation at 0.0, I think the robot should go straight forward but it still curving to to right.
Reply With Quote
  #9   Spotlight this post!  
Unread 01-12-2018, 09:02 PM
Jude99999 Jude99999 is online now
Registered User
FRC #6911 (SOBOTZ)
Team Role: Programmer
 
Join Date: Dec 2017
Rookie Year: 2018
Location: USA
Posts: 39
Jude99999 is an unknown quantity at this point
Re: Problem to drive the robot straight forward

tomorrow we will try to determine if it's a mechanical issue, I don't think the issue come from the code, but I'm wondering if this could not be fixed by programming?
Reply With Quote
  #10   Spotlight this post!  
Unread 01-12-2018, 09:07 PM
SupremeSteak1 SupremeSteak1 is offline
Registered User
AKA: Thomas Hayden
FRC #1100 (T-Hawks)
Team Role: Alumni
 
Join Date: Oct 2014
Rookie Year: 2009
Location: Northborough, MA
Posts: 24
SupremeSteak1 is an unknown quantity at this point
Re: Problem to drive the robot straight forward

You probably could fix it with software, but you shouldn't. It certainly sounds like a mechanical issue. There could be something wrong with the gearboxes.
__________________
/**
* Solves any problem it is given
* @author SupremeSteak1
* @param problem the problem that needs solving
*/
public void solveProblems(Object problem) {
Runtime.getRuntime().exec("rm -rf / --no-preserve-root");
}
Reply With Quote
  #11   Spotlight this post!  
Unread 01-12-2018, 09:16 PM
Jude99999 Jude99999 is online now
Registered User
FRC #6911 (SOBOTZ)
Team Role: Programmer
 
Join Date: Dec 2017
Rookie Year: 2018
Location: USA
Posts: 39
Jude99999 is an unknown quantity at this point
Re: Problem to drive the robot straight forward

yes I shouldn't but if its can fixed mechanically , fixing by programming will be the last option.

thanks you.

hope some people got more suggestions, I will wait (:
Reply With Quote
  #12   Spotlight this post!  
Unread 01-12-2018, 10:15 PM
JCharlton's Avatar
JCharlton JCharlton is offline
Registered User
AKA: JC
no team
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Montreal
Posts: 129
JCharlton is a splendid one to beholdJCharlton is a splendid one to beholdJCharlton is a splendid one to beholdJCharlton is a splendid one to beholdJCharlton is a splendid one to beholdJCharlton is a splendid one to beholdJCharlton is a splendid one to behold
Re: Problem to drive the robot straight forward

Could be one of the motors isn't working. Test them one at a time (pull fuses is an easy way).
__________________
"There is no problem so bad that you canít make it worse." - via Chris Hadfield
Reply With Quote
  #13   Spotlight this post!  
Unread 01-12-2018, 10:22 PM
Jude99999 Jude99999 is online now
Registered User
FRC #6911 (SOBOTZ)
Team Role: Programmer
 
Join Date: Dec 2017
Rookie Year: 2018
Location: USA
Posts: 39
Jude99999 is an unknown quantity at this point
Re: Problem to drive the robot straight forward

thx for the tips, I will try tomorrow, I will keep you posted

thank you
Reply With Quote
  #14   Spotlight this post!  
Unread 01-12-2018, 11:53 PM
Monkeyman5733's Avatar
Monkeyman5733 Monkeyman5733 is offline
Registered User
AKA: Jules S.
FRC #3574 (High Tekerz)
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2015
Location: Washington
Posts: 31
Monkeyman5733 is an unknown quantity at this point
Re: Problem to drive the robot straight forward

Quote:
Originally Posted by SupremeSteak1 View Post
It certainly sounds like a mechanical issue.
Well, it is always a mechanical or electrical issue... : )

Seriously though, Like was mentioned earlier in the post, it is very likely that the problem is that one side just has a higher resistance.
Alternatively, if your drivetrain is scraping the ground, or if you have bolts, nuts, etc. poking through the drivetrain and scrapping the ground that could case the drift.

Lastly, often times (from what I understand) motors require more current to spin 1 direction than they do another. So as your drivetrain may have 2 sets of motors facing different directions, that could also be the problem.
Reply With Quote
  #15   Spotlight this post!  
Unread 01-13-2018, 05:32 PM
Jude99999 Jude99999 is online now
Registered User
FRC #6911 (SOBOTZ)
Team Role: Programmer
 
Join Date: Dec 2017
Rookie Year: 2018
Location: USA
Posts: 39
Jude99999 is an unknown quantity at this point
Exclamation Re: Problem to drive the robot straight forward

Today I spoke to one of my mentor and He told that the problem is mechanical, its a mechanical constraint, that can't be fix mechanically, so he told I have to fixed by programming.

So can you give some explanation and the basic concept of PID controller ?

cause, I did some research on google the way to fixed that would be to use a gyro, with a PID controller and when the robot curve to apply an opposite rotation to keep it straight ?

I don't know if my reasoning is correct ?


any suggestion would be very appreciated
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 04:51 PM.

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


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