Page 1 of 1

Help! How to get correct GetPositionY()?

Posted: Wed Feb 22, 2017 8:18 pm
by szx0112
Well, I try to get the x and y value using the GetPositionY() and GetPositionX() methods. The issue is that I cannot get any valid value yet.

The process is that I do the NavigationBegin() first, then call one of the three methods: SimpleGyroNavigation(), SimpleNavigation(), NavigationXY() before the GetPositionY() function. However, the problems arise. The SimpleGyroNavigation() will not update the X/Y value, the SimpleNavigation() keeps incrementing the y value even when the ringo is just sitting there, and the value get from NavigationXY() is just like arbitrary, will increase or decrease in either direction. (I just check the Y values for most cases, but assume that it should show similar performance on x)

Any comments on how to select and understand these methods or how to get the correct y position?


Re: Help! How to get correct GetPositionY()?

Posted: Tue Feb 28, 2017 3:27 pm
by Kevin
I've always been a bit confused about the low level details of the navigation functions. They were written by a friend a while back. I'm hoping to be able to go over them in detail soon as we'll be using the same code on the new Spirit rover.

If you can send me some actual code examples I'll try to have a look. This is good feedback to see how people are actually using the navigation. The basic driving navigation works pretty well but the functions to query specifics like you're trying to do - I haven't fully tested those myself.

Contact me via the Contact form on the plumgeek website so we can email back and forth and share code. If you did figure it out on your own, please share any details. I'm sure they'll be helpful for everyone.


Re: Help! How to get correct GetPositionY()?

Posted: Mon Mar 06, 2017 5:54 am
by szx0112
Thanks for your reply Kevin,

I kind of figure out the problem. Looks like the accelerometer is very sensitive, if ringo is a little bit of tilt when moving, the reading of accelerometer will drastically increase and the GetPosition functions will fail.

I try to resolve this problem from programming side, like cut off the enormous reading but still not sure how to really avoid it.