View Single Post
  #1   Spotlight this post!  
Unread 09-02-2009, 02:36
brianrumburg's Avatar
brianrumburg brianrumburg is offline
Registered User
AKA: Brian Rumburg
FRC #2352 (Metal Mayhem)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2007
Location: Oklahoma City, OK
Posts: 4
brianrumburg is an unknown quantity at this point
Differential Drive Odometry in LabVIEW

I couldn't find any LabVIEW code out there that did differential drive odometry. I probably was looking in the wrong places. Regardless, I decided to try and tackle it myself. Attached is the resulting code in hopes that it will help another team. If nothing else, it is a fun example to play around with.

I put together a sample VI that calculates some useful information if you have a this type of drive system with encoders at each side. The calculations are based on a PDF found here:
http://www.classes.cecs.ucf.edu/eml3804/Odometry.pdf

In your main loop, supply the VI with distance readings from left and right wheel encoders and and the wheelbase of the encoder wheels. It will output Distance Traveled, Heading, and the current X and Y of the robot.

Just as a disclaimer... This VI has only been implemented in the attached sample application. I've not seen how it behaves yet with real encoder data. YMMV.

This is my first post here. I'm new to LabVIEW (as I'm sure most of you are) and this is only our team's second year in FRC. I'll do my best to answer any questions about the code. Any feedback would be appreciated!

I've attached a screenshot of the front panel in action along with the source files.

Enjoy!

-Brian
Attached Thumbnails
Click image for larger version

Name:	OdometryVI.JPG
Views:	264
Size:	83.5 KB
ID:	7373  
Attached Files
File Type: zip DifferentialDriveOdometry.zip (58.5 KB, 312 views)
Reply With Quote