hoverboard-robotics / hoverboard-driver

ROS hardware driver for UART-controlled hoverboard
MIT License
96 stars 52 forks source link

Strange odom behaviour #2

Closed err4o4 closed 4 years ago

err4o4 commented 4 years ago

When I launch hoverboard_driver (roslaunch hoverboard_driver hoverboard.launch) odom (rostopic echo hoverboard_velocity_controller/odom) looks good linear.x = 0 and angular.z = 0, when I send cmd_vel it also shows ok values, but when I stop sending cmd_vel twist gets strange linear.x = -2.08166817117e-17 (or similar value) and angular.z = -7.11930514541e-15 (or similar value) until I send new cmd_vel.

I've changed api->scheduleRead(HoverboardAPI::Codes::sensHall, -1, 200, PROTOCOL_SOM_NOACK); to api->requestRead(HoverboardAPI::Codes::sensHall, PROTOCOL_SOM_NOACK); in Hoverboard::read because can't get scheduleRead to work and send me hall data, but don't think it's an issue.

alex-makarov commented 4 years ago

It's not a totally strange value, just something very close to zero. I'd assume the board returns non-zero values for speed, but cannot check right now.