gazebo_ros2_control failed to load controllers

asked 2022-12-06 04:19:18 -0500

NotARobot gravatar image

Tl;dr How to load controllers with the gazebo_ros2_plugin?

Greetings. I am using a Universal Robot UR series robot for a real application as well as simulation within Gazebo. Since the developers did not support simulation in the ROS Foxy branch I modified the driver an the robots description. This works reasonably well (ROS Foxy driver + ROS Galactic description) with further modifications to the hardware interface.

My question/problem however is in regard to ros2_control and gazebo_ros2_control. The driver loads ros2_control (controller_manager and the respective controllers), this seems to be fine for the real robot. Since gazebo_ros2_control also instantiates the controller_manager I've gotten an error in the past. In order to use the plugin inside the URDF fully, I would like it to load the defined controllers as well. This seems to be done within the demos, since no controller_manager node is started within the launch file and the controller parameters are given by the YAML configuration file. When I try to load my controllers this way, no controller is loaded at all, what am I missing?

A snipped of my controllers YAML:

  update_rate: 60  # Hz
  use_sim_time: True

    type: joint_state_broadcaster/JointStateBroadcaster

    type: ur_controllers/GPIOController

    type: ur_controllers/SpeedScalingStateBroadcaster

    type: ur_controllers/ForceTorqueStateBroadcaster

    type: joint_trajectory_controller/JointTrajectoryController

    type: ur_controllers/ScaledJointTrajectoryController

    state_publish_rate: 60.0
    use_sim_time: True

     sensor_name: tcp_fts_sensor
       - force.x
       - force.y
       - force.z
       - torque.x
       - torque.y
       - torque.z
    frame_id: tool0
    topic_name: ft_data
    use_sim_time: True

The snipped of my XACRO:

<xacro:if value="$(arg sim_gazebo)">
    <!-- Gazebo plugins -->
    <gazebo reference="world">
      <plugin filename="" name="gazebo_ros2_control">
        <parameters>$(arg simulation_controllers)</parameters>
edit retag flag offensive close merge delete


Can you add your log from the Gazebo, launched with --verbose flag? Perhaps here we can find more info useful for debugging process

ljaniec gravatar image ljaniec  ( 2022-12-09 07:25:05 -0500 )edit