ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
In some robots you can't measure velocity directly. Instead, you measure movement (of the motors, for example) and calculate both the new position and velocity from that movement. As an example, the ros_arduino_bridge
package does exactly that from the encoder measurements of a differential-drive system.
You can see an example of writing an Odometry
message with updated position and velocity based on encoder deltas and publishing the updated transform in lines 146–185 of the base_controller.py
file in ros_arduino_bridge
: https://github.com/hbrobotics/ros_arduino_bridge/blob/indigo-devel/ros_arduino_python/src/ros_arduino_python/base_controller.py