Closed frog0705 closed 9 years ago
Thanks for reporting this @frog0705. Now we need to narrow down the bug. Did ros_control
break API in their Indigo patch or did this update just uncover an underlying bug? I will look into this a bit today, but any additional information you could provide would be very welcome.
Just a quick update. I think I have found the issue. ros_control
has accepted a pull request this sync that changes the behavior of how controllers are switched: https://github.com/ros-controls/ros_control/pull/200
Previous to this PR, one could stop controllers whether or not they were started (which is the way we implemented baxter_gazebo
). It appears now that this throws an error when controllers are already stopped. Our offending piece of code is contained in this switch case in baxter_gazebo/src/baxter_gazebo_ros_control_plugin.cpp
:
https://github.com/RethinkRobotics/baxter_simulator/blob/master/baxter_gazebo/src/baxter_gazebo_ros_control_plugin.cpp#L207-L234
Ok, this line in baxter_gazebo_ros_control_plugin.cpp was a timebomb:
controller_manager_msgs::SwitchController::Request::STRICT
Passing in a value of STRICT
to the controller manager didn't matter before because it was never properly implemented. According to the service Request definition:
# * STRICT means that switching will fail if anything goes wrong (an invalid
# controller name, a controller that failed to start, etc. )
So it was only a matter of time before the functionality was fixed to the intended behavior. Unfortunately, we were relying on missing functionality. It does seem harsh for the controller to fail to switch because already-stopped controllers were passed in to stop, but I suppose that's why it's called STRICT
.
I can verify that changing line 228 in baxter_gazebo_ros_control_plugin.cpp to controller_manager_msgs::SwitchController::Request::BEST_EFFORT
solves the issue. The question now is, do we want to rely on BEST_EFFORT
to be lenient or continue to use STRICT
and do additional checking to verify the proper controllers have been identified for start/stop?
I think going with BEST_EFFORT
is a good short-term fix for all until this issue can be revisited more thoroughly in the development cycle. I will add this change to a branch off master
and pull request.
Today, May 21 (China Time) there were numerous updates for ROS. After updating these I was no longer able to move Baxter in Simulation. Apparently there is an issue with ros_control.
It seems I upgraded from version 0.9.2 to 0.9.3
When running
roslaunch baxter_gazebo baxter_world.launch
the simulation loads but the arms are not responsive.Then, when you try to move the arms using any
baxter_example
script, an error message shows up in the simulator terminal saying:Is anyone else experiencing this behavior?