Encoder sensor data

Hi, I study ros with rosbot 2.0.

I’d like to read the encoder data.

Rosbot 2.0 has 4 motor and each motor has the encoder.

Also, it is said that the rotation angle of the wheel can be read using the /joint_states topic.

So, I typed topic “echo /joint_states” into the terminal to check the rotation angle of the wheel.

“roslaunch rosbot_ekf all.launch” has already been run.

However, the wheel rotation angle value has not been published.

How can I publish the encoder’s sensor value?

Thank you.


I think you have to enable the publishing of joint states messages as described here: GitHub - husarion/rosbot-stm32-firmware: Embedded, low-level firmware for STM32 microcontroller inside ROSbot. with the EJSM - ENABLE/DISABLE JOINT STATES MESSAGES command.


1 Like

Thank you for answering me.

It’s solved!

Happy new year!


Thank you Michael for your help. Using config service is the correct way, but when you are using ROS Melodic you may be confused. Rosserial has a bug that prevents the service from being sent feedback.
Therefore when I run this command:

rosservice call /config "{command: 'EJSM', data: '1'}"

I get an error:

ERROR: service [/config] responded with an error: service cannot process request: service handler returned None

But it works :wink:

Best regards,