how to change the controller interface during running?
Hi all,
I want to simulate the door-opening in Gazebo. Until grasping the door handle, I'm using the position_controllers/JointTrajectoryController of JointPositionInterface. To push the door, I need to use the effort_controllers/JointEffortController of JointEffortInterface to achieve the compliant control of the arm.
I tried to change the transmission in urdf and config file for node "controller_manager". It seems I can only load only one control mode for the arm. Can I load two kinds of controllers for arm and switch when needed??
Thanks very much!
I don't believe this is currently supported out-of-the-box.
Or, at least not in Gazebo's implementation of the
hardware_interface
. Technically it should be possible to offer more than a single interface -- many drivers for real robots actually do this, andros_control
would simply manage those resources. Controllers would be able to use them.Switching controllers at runtime is something which is certainly supported, so as long as the interfaces are there, it should work.
Thanks for your reply. so it seems in Gazebo for each joint I can only keep one kind of controller running. Maybe I could stop current controller and start a new one by running the controller_manager in C++ file. I saw the video of pr2 opening a door in Gazebo and parts of its source code, but not quite understand how it works....
You seem to conflate interfaces with controllers.
gazebo_ros_control
does not support multiple interfaces per joint afaik, butgazebo_ros_control
uses the regularControllerManager
, so it does support controller switching.undertand. Thanks for the clarification.