Go to Post The function of that part is to keep one student occupied playing with it during the entire build season. It doesn't have to be the same student all the time, they can take turns. - MrForbes [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 12-02-2016, 13:24
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,064
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: Field Positioning with IMU

There are many sensors that can inform you about the current position of your robot. Encoders, gyros/IMUs, vision systems, ultrasonic sensors, LIDARs, contact sensors, etc...

Moreover, there are many, many approaches for taking various combinations of these and producing an overall estimate of robot pose.

One approach that tends to work well in FRC is to combine encoders with a gyro/IMU and use a model like this for estimating robot velocity:

Code:
robot_velocity = (left_wheel_velocity + right_wheel_velocity) / 2;
robot_heading = getHeadingFromGyroOrImu();
Once you have the velocity and heading, you can integrate the velocities over time to obtain position (taking into account that robot velocity is in the direction of the robot heading)...

Code:
robot_position_x += cos(robot_heading) * robot_velocity * dt;
robot_position_y += sin(robot_heading) * robot_velocity * dt;
This assumes your robot moves at a constant velocity in a constant direction over a period of time (dt) which we know is not true, but if dt is small enough, this is a good approximation (it is a Riemann sum).

If you are interested, there are many other more sophisticated ways to do this that exploit the fact that there is also overlap in what sensors can sense (for example, an IMU can tell you something about your linear velocity, and encoders can tell you something about your angular velocity) and "fuse" these measurements intelligently by considering the uncertainty properties of each source. Look up Kalman Filters, Extended Kalman Filters, Particle Filters. But in general, the above formulation is good enough in FRC.
Reply With Quote
 


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 09:07.

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