change joint characteristics at runtime
I would like to inject faults into a simulation. Faults may include locking a joint in place, letting a joint move freely, or changing the limits, damping, or friction on a joint. Locking a joint could possibly be accomplished by setting new limits on it. Are there mechanisms in ROS/Gazebo that can help with this?
So far it appears I can set friction and limits using a Gazebo ModelPlugin. Are there other ways to do it, possibly with an external script or program? I have not yet found a way to let a joint go limp, possibly by disabling a controller.
You can find all the available methods you can use in Gazebo plugin in Gazebo API. If you are using the ros_control to manage your joint, you can find commands to unload the controllers here.
Thanks. I am able to stop controllers with rosrun controller_manager controller_manager stop <controller_name>. However, afterwards I see that the joint maintains the effort it had before stopping the controller; I can confirm this by echoing /joint_states. I would expect the effort to go to 0 with the controller stopped. What can be done about this?
I tried using a plugin to set the effort to 0 with physics::Joint::SetForce() and physics::JointController::SetForce(), but there's no effect.