moveit / moveit_core

THIS REPO HAS MOVED TO https://github.com/ros-planning/moveit
30 stars 76 forks source link

Using multiple controller managers #237

Closed TheDash closed 9 years ago

TheDash commented 9 years ago

Is this possible? For example, I want to use the MoveItSimpleControllerManager to control the UR5 arm. But I've put the PR2 gripper onto it, and so would like to also use the PR2 controller manager.

Is it possible to do this in MoveIt? Afaik there is the one parameter moveit_controller_manager_name that can only be set to one for movegroup. Or can I pull up multiple move groups?

One possible solution: Add a paremeter inside the controllers.yaml config used for moveit called "controller_manager" which will change the moveit_controller_manager_name w.r.t what controller manager is being used at the time.

mikeferguson commented 9 years ago

Right now it looks like it uses a single plugin for all controllers -- this is implemented in the TrajectoryExecutionManager class -- in particular https://github.com/ros-planning/moveit_ros/blob/179d1dd0d0f4e9a29af9930913ae391298474d89/planning/trajectory_execution_manager/src/trajectory_execution_manager.cpp#L117 uses pluginlib to load the plugin. The only way to have more than one plugin would be to load multiple plugins during initialization (the MoveGroupCapabilities are loaded in such a fashion if you are looking for some examples). It should be possible to make the code accept both a single string name or a list of names for plugins and parse accordingly (which would avoid breaking backwards compatibility). Deciding which plugin to use for each controller in the YAML file may be trickier while preserving backwards compatability.

Regardless - this ticket belongs on moveit_ros -- as would any pull request enhancement. I'm going to close this ticket, feel free to create one on moveit_ros, and if you do, please link to this ticket.