ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

How to make my own base controller publish /odom?

I have no robot, so I must build one piece by piece. I use differential drivers ,each with a encoder.And each encoder can output two channels signal :A,B.

I can read channel A and B to aquire the speed and direction of a motor through Arduino device.

But how can I integrate the signal from the two encoders with the topic of /odom with the lowest level device Arduino? If this is done by Arduino ,I doubt the ability of an 8-bit processor. so is there any relevent reference about it?

i have check the detail of msg /odom:

rosmsg show nav_msgs/Odometry
uint32 seq
time stamp
string frame_id
string child_frame_id
geometry_msgs/PoseWithCovariance pose
geometry_msgs/Pose pose
geometry_msgs/Point position
float64 x
float64 y
float64 z
geometry_msgs/Quaternion orientation
float64 x
float64 y
float64 z
float64 w
float64[36] covariance
geometry_msgs/TwistWithCovariance twist
geometry_msgs/Twist twist
geometry_msgs/Vector3 linear
float64 x
float64 y
float64 z
geometry_msgs/Vector3 angular
float64 x
float64 y
float64 z
float64[36] covariance

thank you very much!

edit retag close merge delete

Sort by ยป oldest newest most voted

The first step would be to get encoders ticks -> wheel velocity for the left and right wheel. Besides the tick count/motor revolutions this obviously depends on the wheel diameter.

Next, convert left/right velocity to translational and rotational velocity. Google should give you some simple formulas using the wheel base.

Given the measured time between two odometry readings, you now get a delta in translation and orientation that you can add to your last send odometry.

You can use this information to fill out the message.

more