ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why has foxy upgrade put controller manager in name space?

asked 2023-03-27 10:19:37 -0500

sreed23 gravatar image

TLDR

I had my sim up and running and then I ran a sudo apt upgrade last Thursday (23/03/23) and now the controller manager is in a namespace.

Setup

  • Ubuntu 20.04
  • ROS2 Foxy
  • Gazebo11

This has been replicated on a docker image.

Description

After a sudo apt upgrade ([latest release announcement](https://discourse.ros.org/t/new-packages-and-patch-release-for-foxy-fitzroy-2023-03-22/30489)) gazebo ros control plugin has started launching the controller manager in the same name space as my other nodes. The name space is given to the plugin, but it's never used it before:

<gazebo>
  <plugin name="gazebo_ros2_control" filename="libgazebo_ros2_control.so" >
    <namespace>${namespace}</namespace>
    <parameters>$(find robot_descriptions)/config/robot_control.yaml</parameters>
  </plugin>

</gazebo>

My system relies on launching the controllers using the command interface (ros2 control load_controller ...) and this tries to contact the controller manager without a namespace. I can contact the services (i.e. ros2 service call /namespace/controller_manager/load_controller ...), but after running this something is still broken, as the robot still doesn't respond to commands.

Does anyone know why it's suddenly started launching in a namespace or has an idea of where to look? I have had a look in the repos for gazebo_ros2_control and ros2_control, but can't see any recent updates to the foxy branches.

I am new to ROS 2 (was on ROS 1 previously) so if you have suggestions it would be greatly appreciated. I am also curious if just moving to Humble will fix it.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-29 05:36:41 -0500

sreed23 gravatar image

I have "fixed it" by embracing the namespace and using the service instead of the control interface during launch:

ld = launch.actions.ExecuteProcess(
        cmd=[[
            FindExecutable(name='ros2'),
            " service call ",
            "/"+ namespace +"/controller_manager/load_and_start_controller ",
            "controller_manager_msgs/srv/LoadStartController ",
            '"{name: \'joint_state_broadcaster\'}"',
        ]],
        shell=True
    ),
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-03-27 10:19:37 -0500

Seen: 130 times

Last updated: Mar 29 '23