why joint state values increasing continiously in turtlebot3 gazebo simulation?

asked 2021-01-23 00:27:48 -0500

Vignesht.tech gravatar image

updated 2022-04-17 10:39:00 -0500

lucasw gravatar image

While running turtlebot3_navigation file to work on navigation, the robot_state_publisher node used to send the robot state to the amcl. This robot_state_publisher node takes the joint state inputs form the gazebo. When I echo the values it is increasing continuously.

edit retag flag offensive close merge delete

Comments

Which specific values are increasing? Please post some output for clarity. For certain values, that could be expected behavior.

tryan gravatar image tryan  ( 2021-01-26 10:11:55 -0500 )edit

output:

name: [wheel_right_joint, wheel_left_joint]
position: [0.0008967009949039095, -0.0009094987368714058]
velocity: []
effort: []
---
header: 
  seq: 1273
  stamp: 
    secs: 42
    nsecs: 659000000
  frame_id: ''
name: [wheel_right_joint, wheel_left_joint]
position: [0.0008974005346056302, -0.0009102249066481605]
velocity: []
effort: []
---
header: 
  seq: 1274
  stamp: 
    secs: 42
    nsecs: 692000000
  frame_id: ''
name: [wheel_right_joint, wheel_left_joint]
position: [0.0008981000761307811, -0.0009109510783646968]
velocity: []
effort: []
---
header: 
  seq: 1275
  stamp: 
    secs: 42
    nsecs: 726000000
  frame_id: ''
name: [wheel_right_joint, wheel_left_joint]
position: [0.0008988208177909129, -0.0009116992573110494]
velocity: []
effort: []
Vignesht.tech gravatar image Vignesht.tech  ( 2021-01-26 22:41:50 -0500 )edit

in the above comment i've pasted the rostopic echo /joint_states in turtlebot3_world.launch. In that without moving a robot the joint states are continuously increasing. But the robot_state_publisher publishes the right state of the robot. But I want to know how this joint_states are represented.

Vignesht.tech gravatar image Vignesht.tech  ( 2021-01-26 22:44:17 -0500 )edit

A key point I missed from your question was that this happens with no input. It seems that there's a small drift in the joint positions on the order of ~0.001 deg/s. That may be due to a small initial disturbance in the simulation or modeling error from physical parameters, but it's hard to say. If you can't ignore it, adding some friction/damping may help.

As for how the joint_states are represented, I'm not entirely sure what you mean, so feel free to clarify. The units are radians. With Turtlebot, the wheel joints are usually modeled as continuous joints that can revolve around a single axis without limit, but you'd have to check the URDF file you're using to be sure. Here's the Turtlebot3 Burger's description for example. Note that the file also imports some Gazebo properties, including surface friction.

tryan gravatar image tryan  ( 2021-01-27 08:53:29 -0500 )edit