Interbotix / interbotix_ros_core

Core ROS Packages for Interbotix Robots
BSD 3-Clause "New" or "Revised" License
30 stars 57 forks source link

Add read failure publishing options #46

Closed lukeschmitt-tr closed 2 months ago

lukeschmitt-tr commented 2 months ago

When there is a syncread failure because any of the motors fail to communicate (bad connection, etc.), all values are reported as -pi. Because -pi can be a valid joint state, this can cause confusion and have unexpected downstream effects.

This PR hopes to address this issue by allowing users to change the behavior when a read failure is detected. If the joint_state_publisher.read_failure_behavior motor config parameter is set to 1, NaN values are published for all joints instead of -pi.

Note that the default behavior is the same as before this change. Read failures will still result in joint states of -pi.