Go to Post I am a big fan of community building exercises. And harassing my friends. - Amanda Morrison [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 22-04-2016, 11:59
samfruth's Avatar
samfruth samfruth is offline
Registered User
FRC #1710 (Ravonics Revolution)
Team Role: Driver
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Olathe, Kansas
Posts: 132
samfruth will become famous soon enough
Getting pitch from navX sensor

We are trying to read the "pitch" value that is build into the YPRHfH vi in autonomous but have been unsuccessful so far. We are using it to find when the bot has driven over a defense or has gotten on the batter. We're able to read "yaw" just fine. We enable the sensor in begin as YPRH. Any insight?
__________________



I kind of know programming
Reply With Quote
  #2   Spotlight this post!  
Unread 22-04-2016, 12:06
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 336
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Getting pitch from navX sensor

Quote:
Originally Posted by samfruth View Post
We are trying to read the "pitch" value that is build into the YPRHfH vi in autonomous but have been unsuccessful so far. We are using it to find when the bot has driven over a defense or has gotten on the batter. We're able to read "yaw" just fine. We enable the sensor in begin as YPRH. Any insight?
Can you please clarify what "have been unsuccessful so far" means?

If just starting out using pitch, it's good to review the terminology. As discussed in the navX-MXP "Terminology" page, pitch is defined as rotation about the "X" axis.

Then, it's good to review the different axes to make sure it's clear which is the X axis and what it means to rotate around that axis. Take a look closely at the navX-MXP; there's indication of the X axis there. As rotation about this axis occurs, the pitch angle will change.

Depending upon how your navX-MXP/RoboRIO are mounted, the pitch angle could be measuring different things.
Reply With Quote
  #3   Spotlight this post!  
Unread 22-04-2016, 12:14
samfruth's Avatar
samfruth samfruth is offline
Registered User
FRC #1710 (Ravonics Revolution)
Team Role: Driver
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Olathe, Kansas
Posts: 132
samfruth will become famous soon enough
Re: Getting pitch from navX sensor

To clarify, the value being fed out of the unbundle by name vi is always 0. 0E-3 to be exact. The pitch angle is definitely the value we want. I know it's not working properly because the value never changes from 0 during teleop driving or auto.
__________________



I kind of know programming
Reply With Quote
  #4   Spotlight this post!  
Unread 22-04-2016, 14:12
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 336
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Getting pitch from navX sensor

Quote:
Originally Posted by samfruth View Post
To clarify, the value being fed out of the unbundle by name vi is always 0. 0E-3 to be exact. The pitch angle is definitely the value we want. I know it's not working properly because the value never changes from 0 during teleop driving or auto.
Can you please confirm that you are using the most recent version of the LabView library for the navX-MXP? The latest version of this is 2.0.5.0, and a release is available here:

https://github.com/FRC900/navX-MXP-LabVIEW/releases

One you have verified that your release is current, I'd encourage you to run in LabView the "navX Example v2.vi", which is in the "Examples\Functions" folder once you open the "navX Library.lvproj" project in LabView . This provides a monitor on the navX-MXP and will display the Yaw, Pitch and Roll values from the sensor, along with a lot of other information. This will verify that your board is correctly sending pitch/roll values to a labview application.

As you run this test, be sure to select the appropriate interface (SPI, I2C or TTL UART) in the example, to match what you use in your robot application.

Please let us know what you find.
Reply With Quote
  #5   Spotlight this post!  
Unread 22-04-2016, 15:11
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 298
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Getting pitch from navX sensor

Try reading the "roll" value. Depending on how your NavX is mounted, your robot pitch and roll could be flipped compared to the NavX board axes.
Reply With Quote
  #6   Spotlight this post!  
Unread 22-04-2016, 16:24
samfruth's Avatar
samfruth samfruth is offline
Registered User
FRC #1710 (Ravonics Revolution)
Team Role: Driver
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Olathe, Kansas
Posts: 132
samfruth will become famous soon enough
Re: Getting pitch from navX sensor

Quote:
Originally Posted by slibert View Post
Please let us know what you find.
First of all, your example vi that contains all the readouts from the NavX is amazing. It turns out that the Roll value was what I needed instead of Pitch. I'll mess around with the bot tonight and tomorrow and let you know if we have any other issues.
Thank you very much for your helpful advice! Your product is an awesome tool to have. No FRC team should go without it!
__________________



I kind of know programming
Reply With Quote
  #7   Spotlight this post!  
Unread 22-04-2016, 16:43
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 336
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Getting pitch from navX sensor

Quote:
Originally Posted by samfruth View Post
First of all, your example vi that contains all the readouts from the NavX is amazing. It turns out that the Roll value was what I needed instead of Pitch. I'll mess around with the bot tonight and tomorrow and let you know if we have any other issues.
Thank you very much for your helpful advice! Your product is an awesome tool to have. No FRC team should go without it!
Glad to hear you've got it worked out.

Actually, all credit for the LabView Library and the Example VI goes to James Parks, FRC team 900 (Zebracorns) - he goes by "Caboose" on ChiefDelphi.

James and others in the FRC community have volunteered their valuable time to work together with KauaiLabs to get things to where they are today. Couldn't have done it without folks like James.

Not only did James port Joe Ross' original nav6 LabView library from the CRIO to the RoboRio navX-MXP library for the 2015 season, he then completely rewrote the library for 2016, adding support for things like multiple navX devices on a robot as well as velocity and displacement estimation.
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 20:51.

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