Dynamixel (XL430-W250) Encoder Value Spikes (TurtleBot3-Burger)

Hi everyone,

I bought a Turtlebot3-Burger recently and have been dealing with a Dynamixel (XL430-W250) encoder problem basically since I’ve assembled and set it up and hope someone can help me with that.

I’ve followed the instructions from the robotis homepage to set it up with Ubuntu 20.04 and ROS foxy.

The problem I am facing are encoder wheel position spikes. They occur usually for only one frame and always have the value -33686019 for left and right encoder, while the torque value jumps from false to true. Below is an example of sensor_state topic output in ros2 when it happens.


header:
  stamp:
    sec: 1673189780
    nanosec: 348095519
  frame_id: ''
bumper: 0
cliff: 0.0
sonar: 0.0
illumination: 0.0
led: 0
button: 0
torque: true
left_encoder: -33686019
right_encoder: -33686019
battery: 12.0

I can trigger these when going full speed with negative velocity and then stopping. In some rarer cases the encoder values stay like this for several frames right after starting the robot. I’ve also managed to trigger this behavior without any control input and just trying to gently apply external torque on the motor wheels.

All in all, this leads to very messed up odometry values and thus transformation issues. I’ve traced it down in the ROS nodes to the point of knowing that the values are already wrong when read using dxl_sdk_wrapper here and here.

I have recorded respective ROS bags of these situations but don’t know if they are of any help. I’ve played around a bit with the Arduino IDE. Followed these install instructions and then tried to run the DynamixelWorkbench examples.
o_Find_Dynamixel returns:

23:42:48.519 -> Find 0 Dynamixels
23:42:49.742 -> Succeed to init : 1000000
23:42:55.303 -> Find 2 Dynamixels
23:42:55.303 -> id : 1 model name : XL430-W250
23:42:55.303 -> id : 2 model name : XL430-W250
23:42:56.493 -> Succeed to init : 2000000
23:43:02.087 -> Find 0 Dynamixels
23:43:03.277 -> Succeed to init : 3000000
23:43:08.872 -> Find 0 Dynamixels
23:43:10.093 -> Succeed to init : 4000000
23:43:15.683 -> Find 0 Dynamixels

However, I couldn’t make the last part of the p_Monitor example work, i.e. the wheel don’t turn.
Also interesting but maybe unrelated: When I run above linked p_Monitor example and execute bulk_read command, my PC loses connection to the board and I have to reset it before I can re-establish a connection.

Is this a known software issue or is this likely faulty hardware?

If you need any other info, please let me know. Thank you for your help in advance!

Hi @h4gjd,

Can you please check after reinstalling the ROS2 Burger firmware from Arduino?
I will check with latest firmware on my end as well.

Hi @Tahir,

thanks for replying. What exactly does this incorporate?

I did the following:

  1. Installed Arduino IDE 2.0.3 on Ubuntu 20.04 desktop machine using the described steps in the ROBOTIS e-manual.
  2. Installed OpenCR (by ROBOTIS) 1.5.2 via board manager
  3. Installed Dynamixel2Arduino (by ROBOTIS) 0.6.1 via library manager.
  4. Connected the board via USB → Opened and compiled / uploaded File > Examples > TurtleBot3 ROS2 > turtlebot_burger → rebooted whole robot

However, the error persists.

If you mean something else, do you have some instructions or a link I can use?

Thanks a lot :slight_smile:

Hi @h4gjd
I tried the same p_Monitor example as like you and face same issue like you. I will contact Robotis for further consultation and get back to you asap I have some leads.

1 Like

@h4gjd

Several other developers also found similar issues when running TurtleBot3 as below.

It looks like the position data read from DYNAMIXEL doesn’t correctly processed in the OpenCR firmware.

Please allow me a couple weeks to look into this as I’m recently out of office for on site tasks.
Thanks!

@willson

That looks pretty much like the issue I am dealing with. Thanks for sharing and looking into this!