Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Differential Drive Odometry in LabVIEW (http://www.chiefdelphi.com/forums/showthread.php?t=73971)

brianrumburg 09-02-2009 02:36

Differential Drive Odometry in LabVIEW
 
2 Attachment(s)
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

Wamp 03-05-2011 04:13

Re: Differential Drive Odometry in LabVIEW
 
Hi brian.

I was looking for an example of this topic and this post is all I got. Thank you very much for sharing!

However, Iīm confused about some details in the code (calculating Wheel Rates, wheel base...). The original documentation (odometry.pdf) that you linked is nowhere to be found. Do you have it? Could you upload it, please?

Iīm aware that this topic has 2 years so I think itīs meaningless to ask it now, but it would help me A LOT if its possible for you to share the documentation (or your knowledge :) ).

siggy2xc 03-05-2011 15:38

Re: Differential Drive Odometry in LabVIEW
 
I have made something very similar but i have used a picture instead of a graph.
http://www.chiefdelphi.com/forums/sh...ad.php?t=94550

Chris Hibner 03-05-2011 15:44

Re: Differential Drive Odometry in LabVIEW
 
While I haven't tested your code, our code looks almost identical. This is how we've been doing autonomous for quite some time now. Excellent job.

brianrumburg 03-05-2011 19:21

Re: Differential Drive Odometry in LabVIEW
 
1 Attachment(s)
I wasn't able to find the original Odometry.pdf anywhere in my source code repository (ack!). I did find this page which seems pretty close to what I remember reading. I haven't looked at the code in a couple of years, so I may be way off. (c:

I did find a couple of updated versions of the CalculateOdometry.vi in my repository. I assume I fixed something, but who knows what. I have attached them in hopes that they may be of help.

I don't have LabVIEW installed at the moment so I have no idea what I'm posting here. It might be a good idea to shield your eyes when opening these...

Best of luck!

-Brian

Wamp 04-05-2011 04:08

Re: Differential Drive Odometry in LabVIEW
 
Thank you all for the info.

Yesterday I found 2 interesting links:

http://rossum.sourceforge.net/papers/DiffSteer/#d6

(Same aproximation as brian used)

http://www-personal.umich.edu/~johannb/position.htm

(There is a PDF, page 20, same aproximation but more "in depth")

With everything I got and your replies, I think I understand the whole process, except the very beginning... brian calculated:

Left Wheel = Speed + Turn Rate
Right Wheel = Speed – Turn Rate


What exactly is "Turn Rate"? Obviously thats not an angle, I think itīs a transformation of some data input from the wheel encoders, but Im not sure where it comes from. I didnīt found anything about that...

(Well, I know itīs only a "simulation" and you actually set it manually from the instrument panel, Im talking about how it applies in a real situation).

Sorry if I ask something stupid, Iīm a noob in robotics, this is my third month studying this field ::rtm:: Which I have to say, I found it pretty hard, time-consuming, but also fascinanting!

BTW, I have to check better and compare the last VIs brian posted.

Oh, and maybe you can find this interesting, is a simulation comparing real trace VS Dead Reckoning aproximation: http://rossum.sourceforge.net/tools/...ionApplet.html

Ether 04-05-2011 17:09

Re: Differential Drive Odometry in LabVIEW
 
Quote:

Originally Posted by Wamp (Post 1059007)
I think I understand the whole process, except the very beginning... brian calculated:

Left Wheel = Speed + Turn Rate
Right Wheel = Speed – Turn Rate


What exactly is "Turn Rate"?

If "speed" is the vehicle forward speed command in feet/sec, then the "turn rate" is equal to (L/2)*omega, where omega is the vehicle rotation rate command in radians per second and L is the vehicle trackwidth measured in feet. The above formulas will then give the required tangential velocity (in feet per second) for the left and right wheels (which can be converted to wheel rpm by multiplying by 360/pi and dividing by the wheel radius in inches).





Wamp 05-05-2011 03:48

Re: Differential Drive Odometry in LabVIEW
 
Thank you very much, Ether :) Finally I understand the whole process.


All times are GMT -5. The time now is 10:40.

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