Help! How to get correct GetPositionY()?

Ringo setup, hardware, basic programming. User to user support.
szx0112
Posts: 3
Joined: Mon Feb 20, 2017 5:09 pm

Help! How to get correct GetPositionY()?

Postby szx0112 » Wed Feb 22, 2017 8:18 pm

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?

Thanks.

Kevin
Posts: 124
Joined: Tue Jul 28, 2015 12:56 am

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

Postby Kevin » Tue Feb 28, 2017 3:27 pm

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.

Thanks!
-Kevin

szx0112
Posts: 3
Joined: Mon Feb 20, 2017 5:09 pm

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

Postby szx0112 » Mon Mar 06, 2017 5:54 am

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.


Return to “Ringo Basics”

Who is online

Users browsing this forum: No registered users and 1 guest