Go to Post God bless the camera. That's all I gotta say. - Bharat Nain [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 26-01-2011, 10:03
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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
gyro-guided skid-steer

See attachment.

It's pseudo-code for gyro-guided single 2-axis joystick control of a skid-steer robot. The robot turns and goes in the direction commanded. It's field-centric control for a non-holonomic vehicle, like a 6WD.

I'm looking for a team that would be interested in coding this up and trying it out, and collaborating with me to work out the bugs and add features, either as a learning experience or possibly for competition use.

It seems to work in a simple simulation but I don't have a good plant model of the vehicle dynamics and no access to target hardware.

Post here or PM me if interested.

Thanks.


Attached Files
File Type: txt gyro-guided skid-steer 1-26-2011b.txt (1.8 KB, 90 views)

Last edited by Ether : 26-01-2011 at 11:42. Reason: updated attachment
  #2   Spotlight this post!  
Unread 26-01-2011, 11:05
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: gyro-guided skid-steer

Our team has used a variant of your algorithm on several of our robots (primarily to aid in driving in a straight line...especially important the two years we had omni-wheel holonomic drives). Proportional-only control on gyro heading seemed to do a pretty decent job (way better than trying to use gyro rate as the process variable directly).
  #3   Spotlight this post!  
Unread 26-01-2011, 13:17
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: gyro-guided skid-steer

Quote:
Originally Posted by Jared341 View Post
Our team has used a variant of your algorithm on several of our robots
In what ways was it different? Did you guys ever write a paper or make a presentation ?


  #4   Spotlight this post!  
Unread 26-01-2011, 14:30
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: gyro-guided skid-steer

No paper or presentation (yet?). Mainly due to the fact that I was under the impression that many others had done something like it (though I can't name any robots in particular off the top of my head).

In general, our implementation only uses the gyro if we detect that the driver is trying to go straight (the X axis of single stick drive is near 0) - when turning, we leave everything up to the driver. Other than that, pretty much the same.

I would imagine you could code up similar functionality using only left and right encoders, and using the delta between each encoder rate as your error (when trying to go straight).
  #5   Spotlight this post!  
Unread 26-01-2011, 15:14
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: gyro-guided skid-steer

Quote:
Originally Posted by Jared341 View Post
In general, our implementation only uses the gyro if we detect that the driver is trying to go straight (the X axis of single stick drive is near 0) - when turning, we leave everything up to the driver. Other than that, pretty much the same.
OK, it looks to me like that's quite a bit different from what I was trying to achieve.

What I posted is intended to make an essentially field-centric driver interface to a skid-steer vehicle: the driver "points" the joystick in a given (field-centric) direction with a given magnitude, and the robot turns and goes in that direction at the commanded speed, viz:
  • you push the joystick straight forward and the robot turns and heads straight downfield
  • you pull the joystick straight back and the robot turns around and heads back toward you
  • you push the joystick to your right and the robot turns and goes straight across the field from left to right
  • you push the joystick to your left and the robot turns and goes straight across the field from right to left
  • ... or any angle in-between
Optionally (by adding two more lines of code as shown) the robot could limit the required turning to 90 degrees or less by reversing direction. So if the robot was going straight downfield, for example, and the driver then pulled the joystick straight back, instead of turning around the robot would simply reverse direction by reversing the wheel speeds... but if the driver pushed the joystick to the right the robot would still turn and drive to the driver's right (regardless of the robot's orientation at the time).

Whether or not this mode of driver interface would be helpful depends on the game being played and the driver's experience and skill. Using this interface does not, of course, preclude having a robot-centric (or any other) interface available at the press of a button, so it could be used selectively.



Last edited by Ether : 26-01-2011 at 15:50.
  #6   Spotlight this post!  
Unread 26-01-2011, 20:27
siggy2xc siggy2xc is offline
Registered User
AKA: Tyler Siegrist
FRC #1756 (Argos)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: peoria
Posts: 70
siggy2xc is an unknown quantity at this point
Re: gyro-guided skid-steer

I've been working on this for a few days now, I. would deffinately appreciate any team that could post their code to auto-orient the robot as an example code for me.
  #7   Spotlight this post!  
Unread 26-01-2011, 20:29
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: gyro-guided skid-steer

Quote:
Originally Posted by siggy2xc View Post
I've been working on this for a few days now, I. would deffinately appreciate any team that could post their code to auto-orient the robot as an example code for me.
Did you look at the attachment to post #1 in this thread? Any thoughts?


  #8   Spotlight this post!  
Unread 26-01-2011, 20:50
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: gyro-guided skid-steer

We did this, and posted our code and a video here (under SOAD) http://thecatattack.org/DriveSystems
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #9   Spotlight this post!  
Unread 27-01-2011, 00:32
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,086
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: gyro-guided skid-steer

We did this type of control two years ago when we did swerve drive. It worked out reasonably well, but we had some small issues with the gyro drifting a bit every once in awhile.

Our students even did it with two people: one person controlling X/Y, and the other controlling the direction the robot was 'pointing'. If it wasn't for the trailer on the back of the robot, I think it would have been pretty cool... but the two drivers ended up making it look like the bot was fighting itself.

Code is on my website if anyone's interested: http://www.virtualroadside.com/FRC
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #10   Spotlight this post!  
Unread 27-01-2011, 00:53
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,535
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: gyro-guided skid-steer

We did somewhat the same in a different application: our '09 turrent used the gyro oriented with regards to the driver. It blew the judges away when they could push the joystick in a direction while we rotated the robot on our pit cart and the turrent would stay pointing in the direction the judges were commanding.

We changed the joystick x/y to a polar angle and used that and the gyro with a PID. The only major difference was that we ignored magnitude.
  #11   Spotlight this post!  
Unread 29-01-2011, 10:36
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: gyro-guided skid-steer

Quote:
Originally Posted by Ether View Post
See attachment.

It's pseudo-code for gyro-guided single 2-axis joystick control of a skid-steer robot. The robot turns and goes in the direction commanded. It's field-centric control for a non-holonomic vehicle, like a 6WD.

I'm looking for a team that would be interested in coding this up and trying it out, and collaborating with me to work out the bugs and add features, either as a learning experience or possibly for competition use.

It seems to work in a simple simulation but I don't have a good plant model of the vehicle dynamics and no access to target hardware.

Post here or PM me if interested.

Thanks.


I made some corrections and additions, added a lot more explanation, and posted it here.

I'm still looking for a team that would like to collaborate with me on developing and testing this.


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 23:40.

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