I have been trying for the past week searching forums and documentation to solve this issue. I am trying to make a simple simulation using ros2 humble and webots 2023b. I had switched from Gazebo Fortress for the same issue, which tells me there's a bigger problem here.

My main issue is my ros2_control controllers (joint_state_broadcaster and joint_trajectory_controller) cannot seem to find the /controller_manager services no matter what I try. In my launch file, I currently:

  1. Launch webots with WebotsLauncher
  2. Spawn xacro robot with URDFSpawner
  3. Start robot state publisher
  4. ? Define robot driver with WebotsController
  5. Fail to start joint state broadcaster spawner

As far as I know #1, 2, 3 all succeed. I believe the issue lies somewhere with #5 not recognizing #4. ros2 service list does indeed show /controller_manager but only the following services and NOT load_controller, switch_controller, etc.

  • /controller_manager/describe_parameters
  • /controller_manager/get_parameter_types
  • /controller_manager/get_parameters
  • /controller_manager/list_parameters
  • /controller_manager/set_parameters
  • /controller_manager/set_parameters_atomically

And finally, this is the terminal output:

[INFO] [launch]: All log files can be found below /home/hylander/.ros/log/2024-02-05-14-33-38-200142-laptop-ubeast-176480
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [webots-1]: process started with pid [176481]
[INFO] [ros2_supervisor.py-2]: process started with pid [176483]
[INFO] [ros2-3]: process started with pid [176486]
[INFO] [robot_state_publisher-4]: process started with pid [176489]
[INFO] [spawner-5]: process started with pid [176491]
[robot_state_publisher-4] [INFO] [1707161618.404072091] [robot_state_publisher]: got segment 
[ros2_supervisor.py-2] The specified robot is not in the list of robots with <extern> controllers, retrying for another 50 seconds...
[spawner-5] [INFO] [1707161620.873216518] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist
[ros2_supervisor.py-2] [WARN] [1707161622.023178683] [Ros2Supervisor.Ros2Supervisor]: The URDF Spawner is deprecated. It will be replaced by a new PROTOSpawner in the future. See https://github.com/cyberbotics/webots_ros2/issues/818 for more information.
[ros2_supervisor.py-2] [INFO] [1707161622.036303445] [Ros2Supervisor.Ros2Supervisor]: Ros2Supervisor has imported the URDF robot named "holonomic_robot".
[INFO] [webots_controller_holonomic_robot-6]: process started with pid [176582]
[INFO] [ros2-3]: process has finished cleanly [pid 176486]
[webots_controller_holonomic_robot-6] [WARN] [1707161622.213335625] [holonomic_robot]: Passing robot description as a string is deprecated. Provide the URDF or Xacro file path instead.
[webots_controller_holonomic_robot-6] [INFO] [1707161622.219522904] [resource_manager]: Initialize hardware 'WebotsControl' 
[webots_controller_holonomic_robot-6] [INFO] [1707161622.219577044] [resource_manager]: Successful initialization of hardware 'WebotsControl'
[webots_controller_holonomic_robot-6] [INFO] [1707161622.219614751] [resource_manager]: 'configure' hardware 'WebotsControl' 
[webots_controller_holonomic_robot-6] [INFO] [1707161622.219627495] [resource_manager]: Successful 'configure' of hardware 'WebotsControl'
[webots_controller_holonomic_robot-6] [INFO] [1707161622.219645453] [resource_manager]: 'activate' hardware 'WebotsControl' 
[webots_controller_holonomic_robot-6] [INFO] [1707161622.219655734] [resource_manager]: Successful 'activate' of hardware 'WebotsControl'
[webots_controller_holonomic_robot-6] [INFO] [1707161622.227259532] [controller_manager]: Subscribing to '~/robot_description' topic for robot description file.
[webots_controller_holonomic_robot-6] [WARN] [1707161622.227503154] [holonomic_robot]: Desired controller update period (100ms / 10Hz) is different from the Webots timestep (32ms). Please adjust the `update_rate` parameter in the `controller_manager` or the `basicTimeStep` parameter in the Webots `WorldInfo` node.
[webots_controller_holonomic_robot-6] [INFO] [1707161622.227621054] [holonomic_robot]: Controller successfully connected to robot in Webots simulation.
[robot_state_publisher-4] [INFO] [1707161622.277857444] [robot_state_publisher]: got segment base_link
[robot_state_publisher-4] [INFO] [1707161622.277915771] [robot_state_publisher]: got segment solid0
[robot_state_publisher-4] [INFO] [1707161622.277921690] [robot_state_publisher]: got segment solid1
[robot_state_publisher-4] [INFO] [1707161622.277926058] [robot_state_publisher]: got segment solid2
[spawner-5] [INFO] [1707161622.884433658] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available

I didn't include the rest, because it just keeps searching for /controller_manager. We can also see /controller_manager subscribes to the /robot_description topic successfully.

What could possibly be going on? I would seriously appreciate any help as I am at my wits end with this issue.

Here's my repo which is updated: https://github.com/hylander2126/webots_ros2_delta_rho

  • $\begingroup$ I haven't used webots, but what do you mean by had switched from Gazebo Fortress for the same issue? $\endgroup$ Feb 6 at 7:54
  • $\begingroup$ @ChristophFroehlich I had the same issue in Gazebo and I initially thought it was due to ROS-Gazebo plugin issues, but now I've realized the problem has persisted in webots. $\endgroup$
    – hylander
    Feb 6 at 22:53
  • $\begingroup$ can you open a new question with the log from gazebo fortress? Or if you think it is related, please edit your initial question and add both logs. $\endgroup$ Feb 7 at 11:40
  • $\begingroup$ This bug can be easily reproduced with the current version of webots-ros2-epuck (2023.1.1-2jammy.20240208.073726) and webots-ros2-turtlebot (2023.1.1-2jammy.20240208.073729). For example with ROS2 Iron: sudo apt install ros-iron-webots-ros2-epuck ros2 launch webots_ros2_epuck robot_launch.py Exactly the situation as described by hylander is the result: [spawner-8] [INFO] [1708372747.489308492] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available [spawner-7] [INFO] [1708372747.506219529] [spawner_diffdrive_controller]: Waiting for '/controller_manager' s $\endgroup$
    – sgoetz
    Feb 19 at 20:11


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.