Go to Post See, building a really great robot is just a pseudo challenge for the concept of the whole FIRST program. It is just a phony way to bring people together to reach one common goal. - sanddrag [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 24-01-2009, 22:21
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,082
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: Using encoders for traction control help

This pseudo-code should get you started...

Code:
commanded_speed = Get_Our_Desired_Speed()
robot_speed = Get_Actual_Robot_Velocity()
wheel_speed = Get_Wheel_Velocity()

speed_error = robot_speed - wheel_speed

// Detect if we are slipping
If absolute value of speed_error is greater than tolerance then we are slipping
{
  // If we are, get back our traction ASAP!
  Set commanded_speed to robot_speed
}
Else 
{
  // If we aren't slipping, let's keep it that way!
  Limit commanded_speed based on maximum acceleration to prevent slipping
}

Send commanded_speed to the motors
Close the loop between commanded_speed and wheel_speed with a PID controller (optional)
Hopefully this will be useful!

Also, keep in mind that if you turn differentially (tank-style), your wheels ARE going to slip a little bit. Take that into account or your idler wheel is going to freak out your traction control system every time you turn.
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementing Traction Control for an advantage in the 2009 game DonRotolo Programming 143 27-02-2009 11:53
Help for Better Understanding of Shaft Encoders Xufer Programming 2 08-01-2007 23:14
Autonomous using encoders Mr.G Programming 11 17-01-2006 03:34
Using Shaft Encoders D.Viddy Programming 7 14-12-2004 18:27
Traction Control Algorithm Mr. Lim Programming 3 20-01-2004 14:26


All times are GMT -5. The time now is 18:38.

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