View Full Version : Gyro programming in LabVIEW
savagecreature
23-03-2014, 23:15
We're running our robot with a mechanum drive using LabVIEW as our programming environment. We were doing driving training today with our second robot and the benefits of having a gyro system that would allow us to ignore the facing of the robot became apparent. I've read some things from other teams who have similar systems, but they were programming more directly in C++. Hypothetically, how would we go about developing a system like this using LabVIEW? (we manage to muddle through, but LabVIEW still has many mysteries for us) Just wondering if you would be willing to share some thoughts? Thanks!
Alan Anderson
23-03-2014, 23:41
Look at the LabVIEW Gyro example. It shows you exactly how to use a gyro (yaw rate sensor), and Tutorial 7 tells you exactly how to incorporate into your own code what's in the example.
If you're using the Cartesian version of the MecanumDrive vi, it has an input for the gyro angle that will give you field-centric control of a holonomic drivebase.
savagecreature
24-03-2014, 00:06
Look at the LabVIEW Gyro example. It shows you exactly how to use a gyro (yaw rate sensor), and Tutorial 7 tells you exactly how to incorporate into your own code what's in the example.
If you're using the Cartesian version of the MecanumDrive vi, it has an input for the gyro angle that will give you field-centric control of a holonomic drivebase.
thank you very much. We will do exactly that.
Levansic
24-03-2014, 00:42
One thing to pay attention to is that the kit gyro is limited to 250 degrees per second rotation rate. If your robot spins faster than this, then you will "upset" the gyro, and your orientation will be lost.
You can test your robot's rate by timing multiple rotations at full commanded rotation rate. If it is too fast (very likely, depending on gearing), you could scale the rotation rate to not achieve 250 dps.
If you don't want to throttle the rotation rate, check out a digital gyro. We are using one from Pololu. This thread has our code and more info:
http://www.chiefdelphi.com/forums/showthread.php?t=127677
No matter what you do, you still will probably have drift or upset problems. Make sure you give your drivers a gyro reset button, so they can make the world right again for the robot.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.