jacknlliu / development-issues

Some issues from my development
MIT License
7 stars 1 forks source link

reset /joint_states and gazebo plugins state in gazebo #27

Open jacknlliu opened 6 years ago

jacknlliu commented 6 years ago

We can't reset /joint_states after resetting gazebo world online, and this will cause the joint_state_controller and joint_trajectory_controller fail.

And stop/start gazebo ros controller manager help nothing!

And /joint_states will provide wrong data which is very large and exceeds the joint limit after the robot has a collision with an object in gazebo. And it will keep this wrong data, and it will not back to normal.

/joint_states:

header: 
  seq: 14205682
  stamp: 
    secs: 71085
    nsecs: 101000000
  frame_id: ''
name: ['elbow_joint', 'shoulder_lift_joint', 'shoulder_pan_joint', 'wrist_1_joint', 'wrist_2_joint', 'wrist_3_joint']
position: [-8.51584976541768, -22393.868370150947, -23210.903847882473, -23059.99195414233, 7.4320796024417355, 9.18637489720941]
velocity: [0.00021875832846863282, 0.00585327683488699, 0.003416905486500389, -0.0001427822974524656, 6.232113829809081e-05, 1.6280227906504893e-06]
effort: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

We also find that the large joint data may change directly from very large negative number to very large positive number.

Possible related issues:

Reference

jacknlliu commented 6 years ago

This issue may be related to gazebo, gazebo_ros_control, joint_state_controller , joint_trajectory_controller and ros controller manager.

We find gazebo_ros_control get the joint_state_ from gazebo is wrong using this transform, but gazebo plugin gazebo_ros_joint_state_publisher get the reasonable joint state using origin gazebo API, see here.