LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Robotics differential steering frame

Solved!
Go to solution

Hi,

 

I'm programming an autonomous robot using LabView and I'm having a little trouble with the "Get steering frame velocity from wheels" vi.

 

I've narrowed it down to this simple test, which makes a differential steering frame, passes some test wheel velocities and reads the estimated steering frame velocity.

 

As the passed wheel velocities are identical and in the same direction I would assume that the estimated steering frame velocity would be straight ahead (y_dot) with no angular velocity (theta_dot) however the returned values for [x_dot, y_dot, theta_dot] are [0, 4.59618, 8.10573]

 

Here is what the test looks like.

 

untitled.PNG

 

I have sucessfully used the other steering and motor communication vis without a problem.

 

Any help would be greatly appreciated.

0 Kudos
Message 1 of 12
(3,635 Views)

Hi bensmith,

 

I recreated your VI with LabVIEW Robotics 2010, and I'm getting the correct results (0, 10, 0).  Try running the attached snippet to see if you get the same result.

steer frame.png

 

Chris M

LabVIEW R&D

Message 2 of 12
(3,617 Views)

Hi Chris,

 

Thanks for taking the time to look into this.

 

I could not see where to download the attached vi, but I've recreated it again and attached it. I'm getting different results (0, 10, -1.25681).

 

Regards,

 

Ben

0 Kudos
Message 3 of 12
(3,607 Views)

Hi bensmith,

 

If you grow the size of the numeric indicator you'll see that the value of the theta_dot component is actually -1.25681E-15, which is effectively equal to zero.  It looks like this is working correctly for you, although I don't understand why you were seeing different numbers in your original VI.  Can you post the VI that was producing the value [0, 4.59618, 8.10573]?

 

FYI, the image I posted in my last message is a "VI snippet".  You can save it, then drag the PNG file directly into a block diagram to drop down the contents.

 

Chris M

LabVIEW R&D

Message 4 of 12
(3,603 Views)

Hi Chris,

 

Thats embarassing...

 

The other VI was part of a project and it seems that I have unknowingly modified some library VIs, as when I reopen my project and try to run it, it says that there are unsaved changes to several items...

 

mod.PNG

 

Is there an easy way to undo these modifications, or should I just recreate the project?

 

Thanks again for all you help.

 

Regards,

 

Ben

0 Kudos
Message 5 of 12
(3,598 Views)

I wouldn't worry about undoing any changes, as long as you haven't made any deliberate changes to VIs in the "<LabVIEW>\vi.lib\" folder.  LabVIEW is most likely detecting VIs being recompiled, possible as a result of moving from one target to another.  In any case, you should be able to safely click the "Save All" button.

Message 6 of 12
(3,586 Views)

Hi again,

 

I thought that might have had something to do with the problem.

 

Anyway, I've done some more testing and it seems that I only get the strange values when the VI is run on the realtime target of out CompactRIO.

 

I've attached a project where I have the added the same VI to both "My Computer" and our CompactRIO, when I run the VI on "My Computer" it returns the correct results, and when I run the VI on the CRIO it returns [0, 4.59618, 8.10573]

 

Thanks again,

 

Ben

0 Kudos
Message 7 of 12
(3,583 Views)

Hi bensmith,

 

I am seeing the same behavior as you on RT.  I'm looking into what is causing this, and I'll let you know once I find a good way to make it return the correct results.

 

Chris M

0 Kudos
Message 8 of 12
(3,538 Views)
Solution
Accepted by topic author bensmith

bensmith,

 

I made a modification to the Robotics Steering API that should fix the problem you are seeing.  Please try these steps, then let me know whether it fixes the problem you are seeing:

  1. Unzip the contents of the attached zip file into your "<Program Files>\National Instruments\" folder.
  2. Confirm that this file exists: "<Program Files>\National Instruments\LabVIEW 2010\vi.lib\robotics\Steering\Steering Frame\Estimate Velocity from Transforms.vi"
  3. Test your application on desktop and RT.  "Get Steering Frame Velocity from Wheels.vi" should now return the correct values on both target types.

Chris M

Message 9 of 12
(3,496 Views)

Hi Chris,

 

Thanks for looking into this, I don't have access to LabView at the moment but will try as soon as I do.

 

Regards,

 

Ben Smith

0 Kudos
Message 10 of 12
(3,480 Views)