Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Help with Gyro (http://www.chiefdelphi.com/forums/showthread.php?t=132379)

Caitlinnnnn99 08-01-2015 00:13

Help with Gyro
 
Hello, we are using the ADXRS453Z along with the roboRIO and the numbers (angle) we are getting back is just continuously increasing (into the negatives), we are using the new roboRio Labview example, and was wondering if anyone can help with making the gyro read the angle properly. That is, instead of reading and adding what seems to be the gyro rate, to read just what the gyro's real angle is.

Also, we are very sure that we wired it correctly, because we did it according to the picture in the lab view example.

Any help would be much appreciated. Thanks.

Joe Ross 08-01-2015 00:29

Re: Help with Gyro
 
The ADXRS453Z is a digital gyro. The LabVIEW gyro library is for an analog gyro. You will have to write your own driver and integration routine to use the ADXRS453Z.

Caitlinnnnn99 09-01-2015 20:45

Re: Help with Gyro
 
2 Attachment(s)
Thanks Joe,
The new labview 2015 has provided us with an example code for this specific sensor using SPI Vi's. We've put this example program into our robot program and have also tested with just the example program and the results are still the same: an increasing number for the angle.

We need some help on changing this to where we read the actual angle of the gyro's position. Not a constantly increasing number, even when the gyro isn't moving.

Also, in the program it seems to be adding the rate of angular change?
But the thing is when we leave the sensor still it continues to rise in "angle".
Why would it continue to increase even when the gyro is still?

I have attached pictures of the example code we are using.

Team3266Spencer 09-01-2015 23:57

Re: Help with Gyro
 
I'm not familiar with the gyro or LabView but on page 7 of this data sheet there is some data for drift with this gyro. Most gyros "drift" over time, meaning 0.2 degrees may be incremented every second even when the gyro is stationary.

Skyehawk 11-01-2015 00:19

Re: Help with Gyro
 
Sorry that this post is a little out of place, but what is your application of the gyro in this years game? Autonomous or teleop? I went over the use of a gyro with a few members of my team and they seemed to deem it unnecessary. Normally I would agree, (our team is not particularly known for our programming prowess). I am interested this year because of the need to use every second available, my team plans on using autonomous to set ourselves up for teleop scoring. The more accurately we know our robot's position the faster we can move in autonomous, faster = higher score.
What do you guys see as the practical applications for gyroscopes in this years game? At what stages in the game? Is there any specific gyroscope you would recommend? Thanks in advance.

juchong 11-01-2015 23:38

Re: Help with Gyro
 
Quote:

Originally Posted by Skyehawk (Post 1426053)
Sorry that this post is a little out of place, but what is your application of the gyro in this years game? Autonomous or teleop? I went over the use of a gyro with a few members of my team and they seemed to deem it unnecessary. Normally I would agree, (our team is not particularly known for our programming prowess). I am interested this year because of the need to use every second available, my team plans on using autonomous to set ourselves up for teleop scoring. The more accurately we know our robot's position the faster we can move in autonomous, faster = higher score.
What do you guys see as the practical applications for gyroscopes in this years game? At what stages in the game? Is there any specific gyroscope you would recommend? Thanks in advance.

A gyro is required for field-oriented drive configurations. Think of it like this: If I push the joystick forward, the robot will always drive forward, regardless of where the "front" of the robot is. This feature makes it a LOT easier for inexperienced drivers (and mentors) to drive the robot! It's also essential for drive systems which can "strafe".

On a mecanum drive system, when coupled with encoders, the gyro makes programming an autonomous routine very precise! As a general rule, the more accurate data you have available to your drive system, the more precise your execution will be!

jman4747 13-01-2015 15:25

Re: Help with Gyro
 
Quote:

Originally Posted by Caitlinnnnn99 (Post 1425298)
Thanks Joe,
The new labview 2015 has provided us with an example code for this specific sensor using SPI Vi's. We've put this example program into our robot program and have also tested with just the example program and the results are still the same: an increasing number for the angle.

We need some help on changing this to where we read the actual angle of the gyro's position. Not a constantly increasing number, even when the gyro isn't moving.

Also, in the program it seems to be adding the rate of angular change?
But the thing is when we leave the sensor still it continues to rise in "angle".
Why would it continue to increase even when the gyro is still?

I have attached pictures of the example code we are using.

All a Gyro will ever give you is a roll rate for each axis. The key is that it is a rate not a heading. The thing you need to look for is gyro integration. This is the process of constantly adding in how fast you were turning for the last time period that you were measuring to your current heading. As for the reported movement even when the gyro is still, you need to calibrate to get rid of the false movement. Read http://www.chiefdelphi.com/forums/sh...ight=Best+Gyro it talks about a lot of this. Furthermore I think that if you decide not to use the WPI libraries you will need a co-processor (Arduino) to read the gyro, calculate the heading, and transmit it to the RIO via UART or another coms method.


All times are GMT -5. The time now is 08:56.

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