How to add two plugin for ros2_control?

asked 2022-08-30 08:55:45 -0500

benthebear93 gravatar image

updated 2022-08-30 08:56:24 -0500


I have been studying ros2_control for few days to use it for my own robot (URDF).

i was able to spawn differential drive controll (diff_drive_controller) with hardware plugin

something like this


<ros2_control name="${name}" type="system">
    <param name="example_param_hw_start_duration_sec">0</param>
    <param name="example_param_hw_stop_duration_sec">3.0</param>
  <joint name="${prefix}base_to_lw">
    <command_interface name="velocity"/>
    <state_interface name="position"/>
    <state_interface name="velocity"/>
  <joint name="${prefix}base_to_rw">
    <command_interface name="velocity"/>
    <state_interface name="position"/>
    <state_interface name="velocity"/>

However my robot has mobile base and manipulator on top of it. Meaning i need to add joint controller plugin also.

in ros2_control_demo, example of RRBotSystemPositionOnlyHardware plugin exist,

But i don't know how to add DiffBotSystemHardware and RRBotSystemPositionOnlyHardware (two plugin) together. Do i need to write another pulgin that has diff controller and joint controller together?

(I just need to control wheel joints and manipulator joints as if it's all same joints, ROS1 had little easier/simpler ways to do this but ros2 became too difficult to do it. Or am i doing something wrong? Is there anyother easy way to do what i want expect using ros2_control and pulgin?)

edit retag flag offensive close merge delete