Go to Post We should also remember the fact that the FIRST Manual is not supposed to be enterpreted with lawyer speak. If so you could make it say many things. - Anthony [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2015, 14:51
jojoguy10's Avatar
jojoguy10 jojoguy10 is offline
Programming/Controls Mentor
AKA: Joe Kelly
FRC #0997 (Spartan Robotics) and FRC #2990 (Hotwire Robotics)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Stayton, OR
Posts: 283
jojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of light
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
__________________


Reply With Quote
  #2   Spotlight this post!  
Unread 18-02-2015, 15:10
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 18-02-2015, 15:23
jojoguy10's Avatar
jojoguy10 jojoguy10 is offline
Programming/Controls Mentor
AKA: Joe Kelly
FRC #0997 (Spartan Robotics) and FRC #2990 (Hotwire Robotics)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Stayton, OR
Posts: 283
jojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of lightjojoguy10 is a glorious beacon of light
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 ) the right way.

Thanks!

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


Reply With Quote
Reply


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 03:55.

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