LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Robotics Navigation Heading Rollover issue

Hello All! 

 

I am sort of stumped.  I am building an electric wheelchair based robot using a RoboRio.  I am almost done but I have one annoying bug that I just cant get my head around.

 

Attached you will find my example code that defines the problem.  I implemented the control identical to the example but there is an issue I don't see in the example. When the robot is controlling to a target heading of say 179 deg and it is pointed at about 160 deg all is well and it steers at an angle of -19 deg.  so lets say it overshoots slightly to 185 deg it sees this as needing to steer 354 deg as the heading from the Goal Code is in  180 to 0 to +180 but the actual(which is Theta from dead reckoning calc) is in a non-bound format.  What happens is the bot tracks perfectly in the Quadrants I and II but in III and IV when it "rolls over" it takes a sharp turn briefly then corrects back.

 

I am sure I am missing something obvious or someone has solved this before.

 

Thank you for any help!

Gene

0 Kudos
Message 1 of 2
(2,065 Views)

Hi GeneHancock,

 

It's quite complicated to troubleshoot this without the exact code. Exactly, what example are you using?

 

I'd also like you to tell me what have been your steps to troubleshoot this? If it's something that is happening within the code I suggest you to try using the highlight execution and see in what part of the code this is happening. 

 

If it doesn't have the same behavior this means that the code is fine but the speed of execution is affecting. Maybe there is a feedback that is missing because of timing issues, this arrives later so you see that it does the turn and then come back to follow the movement.

 

There are several things to check here. Try using the NI support channel if you have access to.

 

Regards,

PedroR

0 Kudos
Message 2 of 2
(2,013 Views)