|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: How do you program the navx mxp in labview?
Breakaway has done this for a couple of years now.
Because we use the gyro in both modes, we put Get_YPRHfH.vi and store the gyro's position (yaw) into a global in Periodic tasks, and use that global in auto. ![]() The basic principal is that WPI has already provided great algorithms for a x/y control algorithm (Arcade drive). So we use a PID (target gyro angle as the setpoint, the global from the gyro for the process variable, and work out the tuning) as the x input to the Arcade Drive vi, and usually a constant into the y value. We have found that the gyro updates rapidly enough to support this (we've even translated vision analysis into a desired gyro angle because the gyro was updating fast enough and the vision was not.) The NavX library has updated some since we did this. You could combine this idea with the TeleopRotateToAngle.vi in the navX\Examples folder. |
|
#2
|
|||
|
|||
|
Re: How do you program the navx mxp in labview?
Quote:
If you have questions please let me know. |
|
#3
|
||||
|
||||
|
Re: How do you program the navx mxp in labview?
Is there any way to get a continuous fused heading or yaw that doesn't jump at 360/0 or -180/180 degrees? I ask, because we model and correct yaw in an ongoing basis to a modeled value. I know we could reset the gyro if the abs(yaw) > 120 or so, but we want to be able to do a 360 degree closed loop orbit for testing (without sparing at the point where yaw or heading magically jump 360 degrees).
It looks like those values are only being read off a registry, and not calculated in LabVIEW. Is there any way to tell the NavX to put the non-resetting values in those registers? Last edited by Levansic : 08-02-2017 at 23:39. |
|
#4
|
|||
|
|||
|
Re: How do you program the navx mxp in labview?
Quote:
|
|
#5
|
|||
|
|||
|
Re: How do you program the navx mxp in labview?
Quote:
Continuous Angle Tracker.vi Try it and let me know if you need more capabilities. Thank you for your input, Tim |
|
#6
|
||||
|
||||
|
Re: How do you program the navx mxp in labview?
Thanks for the replies. I'll check out both of your codes in our setup later on today. We worked up our own code to do this, but it looks like we lose a little bit of truth when we reset the NavX heading to avoid the edge discontinuity.
I apologize for my less than clear explanation. We have some code that filters the user input and models what we want the robot to do. We then compare this desired movement model to the current state of the inertial devices to provide a corrected input to our drive code. We are using a non-traditional holonomic drive, and the robot is not as controllable as we would like. For those who haven't looked it up, holonomic means rolling without slipping. As soon as you push a holonomic wheel hard enough to slip, you've then lost control of your rotation and translation. Likewise, if you accelerate hard enough that one wheel reduces its contact with the ground, you will lose rotation and translation control as holonomic drives work by balancing forces of non-parallel wheels/rollers. This makes your robot look like it is on the Lunacy "ice" rather than the relatively high traction carpeting. Modeling the desired motion, and then doing closed loop control to correct the robot position to match the model, is how we fix this. Maybe a better explanation is that a driver commands velocity, not position, but views the motion of the robot in its trajectory of positions over time. Our model captures the commanded velocities, translates them to realistic positions (both rotational and translational), then controls the robot to hit the expected positions by using feedback to adjust the wheel velocities. You have to model the rotational orientation to be able to seek to that, and it can't be done if you have a discontinuity in the heading when you pass through a trigonometric singularity point. |
|
#7
|
|||
|
|||
|
Re: How do you program the navx mxp in labview?
OK here is the revised beta edition that also handles multi devices and has a reset. We may still change the overall function in the next release of this code.
Get_Continuous_Angle.vi |
|
#8
|
|||
|
|||
|
Re: How do you program the navx mxp in labview?
Okay, this is cool and all, but how do you even OPEN this gyroscope? All our LabView is giving us is Analog and XRS450 SPI. I'm assuming we need to download the code externally (like for our CAN Talons), so does anybody have a link to that?
|
|
#9
|
|||
|
|||
|
Re: How do you program the navx mxp in labview?
Quote:
http://www.pdocs.kauailabs.com/navx-mxp/software/ There is a tutorial a couple of links under that page http://www.pdocs.kauailabs.com/navx-...aries/labview/ |
|
#10
|
|||
|
|||
|
Re: How do you program the navx mxp in labview?
The LabView installation link doesn't seem to work. I downloaded the library from GitHub, but where do I install it?
|
|
#11
|
|||
|
|||
|
Re: How do you program the navx mxp in labview?
Quote:
http://www.pdocs.kauailabs.com/navx-mxp/software/ Download the zip, and run the setup.exe within it. It will install everything you need. There is a tutorial a couple of links under that page http://www.pdocs.kauailabs.com/navx-...aries/labview/ |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|