We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am interfacing over udp with a system (a robot) wherein I send a vector movement and get feedback on it's actual co-ordinates many times per second (hopefully nearing the target of 4ms)
Due to there being no in-built ramping of the speed (accelerating or braking) this creates a jerking motion when the vector direction changes (or attempts to go from 0 to full speed in 4milliseconds..)
Anyone have any ideas on how to code this, wherein we can only send a movement vector, only receive the current position, and have a dynamic queue of points to drive towards; and have it accelerate/decelerate in response to drastic movement vector changes and yet behave normally when there isn't drastic movement vector change.
If anyone has code, psuedo-code, advice, or alternate solutions to suggest I'm all open.
Thanks.
Answers
Hmm, but this basically has the actual point stopping to 0 velocity at every point , as opposed to the normal smooth movement I would prefer (unless there was a drastic vector change) sorry if I wasn't clear on that.
Moreover, as there is no feedback loop, if I did make it smooth (having the velocity lerp directly to the new queued velocity), it'd probably overshoot and end up somewhere completely different as no course correction is being carried out.
And while its pretty minor, by dynamic queue I meant an actual queue of subsequent points to reach (say in an ArrayList or similar) It's somewhat of a moot point though as if it can be done with a single queued point, it shouldn't be too hard to expand it to a list of queued points.
quick illustration to hopefully better convey my intention black points are queued co-ordinates (movement between points would be linear, ignore how curved I made the path >_<)