doublerobotics / Basic-Control-SDK-iOS

This SDK provides access to basic driving controls from a custom iOS application.
Apache License 2.0
48 stars 21 forks source link

Sometimes angle rotated is incorrect #3

Closed jishh closed 6 years ago

jishh commented 6 years ago

I have used "turnByDegrees" function to rotate by 90 degrees after a forward walk. But sometimes the robot do a small tilt and 90-degree rotation is incorrect. Is this a behaviour in uneven (non-flat) surfaces, if so can I calculate the angle effectively rotated and force rotation to desire values?

davidcann commented 6 years ago

That's correct – turn by degrees is not always accurate, especially at larger angles. You can probably get more accurate turning in place by turning slower and reading the travel data heading.

jishh commented 6 years ago

Thanks for the reply. Is there a way to get a callback for the function "turnByDegrees", for knowing when rotation ended.

davidcann commented 6 years ago

There is no callback at the end of turnByDegrees. If you need more precise control, you should implement your own feedback loop.