Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   NavX Labview Programming Guide? (http://www.chiefdelphi.com/forums/showthread.php?t=134857)

jojoguy10 18-02-2015 14:51

NavX Labview Programming Guide?
 
Hello CD,

Our team has the NavX sensor and are programming in Labview. As far as I know, there are really only examples coded in C or Java. We would like some input on how other teams (with the NavX) have programmed these tasks:
  • Field-oriented driving (with a user reset button for "north")
  • Rotating to a given angle (for AUTO)
  • Driving straight (correcting mecanum rotational drift)

We have fought some battles with this, and I believe this sensor is going to be an awesome tool for us, but we need some guidance.

We are using a 4-wheel Mecanum drive with two joysticks.

Thanks for any help!
Joe Kelly

Alan Anderson 18-02-2015 15:10

Re: NavX Labview Programming Guide?
 
Field-oriented driving is as easy as wiring the yaw value to the Mecanum Drive function's gyro input. I think you will have to do your own "North" reset, by subtracting a saved offset whenever you need to use the yaw value, and storing the current yaw as the offset value when you want to reset it.

Rotating to a given heading and correcting for rotational drift are both accomplished by the same scheme: closed-loop control of direction. Use the NavX's yaw value as the process variable of a PID function, and have a desired heading as the control value. The output of the PID gets wired to the Mecanum Drive function's rotation input.

To permit manual control of rotation is simple. Whenever the driver is not calling for rotation, use the PID output. When the driver does want to rotate, use the joystick or gamepad axis value, and simultaneously copy the current yaw to be the desired heading so the robot will hold that direction when the driver releases the control.

I hope that is enough of a clue to get you going where you want to go. If you have specific questions on how to implement some of this, ask again with more detail.

jojoguy10 18-02-2015 15:23

Re: NavX Labview Programming Guide?
 
Thanks Alan!

That's where we are kind of at right now. I just wanted to confirmation (or even, other ideas) that we were heading (pun intended :P ) the right way.

Thanks!

If anyone else has physical examples (of your own program maybe), that would be great!


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

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