Skip to content

use robot description from parameter instead of topic if provided - #3483

Open
christianrauch wants to merge 1 commit into
ros-controls:masterfrom
christianrauch:robot_description_param
Open

use robot description from parameter instead of topic if provided#3483
christianrauch wants to merge 1 commit into
ros-controls:masterfrom
christianrauch:robot_description_param

Conversation

@christianrauch

@christianrauch christianrauch commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Description

This adds the robot_description parameter back, allowing to simplify something like:

from launch import LaunchDescription
from launch_ros.actions import Node

URDF = """<?xml version="1.0"?><robot name="minimal"><link name="base_link"/><ros2_control name="FakeSystem" type="system"><hardware><plugin>mock_components/GenericSystem</plugin></hardware></ros2_control></robot>"""


def generate_launch_description():
    return LaunchDescription(
        [
            Node(
                package="robot_state_publisher",
                executable="robot_state_publisher",
                parameters=[{"robot_description": URDF}],
            ),
            Node(
                package="controller_manager",
                executable="ros2_control_node",
            ),
        ]
    )

to:

from launch import LaunchDescription
from launch_ros.actions import Node

URDF = """<?xml version="1.0"?><robot name="minimal"><link name="base_link"/><ros2_control name="FakeSystem" type="system"><hardware><plugin>mock_components/GenericSystem</plugin></hardware></ros2_control></robot>"""


def generate_launch_description():
    return LaunchDescription(
        [
            Node(
                package="controller_manager",
                executable="ros2_control_node",
                parameters=[{"robot_description": URDF}],
            )
        ]
    )

or even:

/opt/ros/lyrical/lib/controller_manager/ros2_control_node --ros-args -p robot_description:='<?xml version="1.0"?><robot name="minimal"><link name="base_link"/><ros2_control name="FakeSystem" type="system"><hardware><plugin>mock_components/GenericSystem</plugin></hardware></ros2_control></robot>'

which makes the ros2_control_node start and stop super fast.

I am not adding documentation or tests just now and only want to get feeback on the functionality.

Fixes #3480

Is this user-facing behavior change?

Yes. It adds a new parameter.

Did you use Generative AI?

No.

Additional Information

I will add documentation etc. if this gets accepted.

TODOs

To send us a pull request, please:

  • Fork the repository.
  • Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
  • Ensure local tests pass. (colcon test and pre-commit run (requires you to install pre-commit by pip3 install pre-commit)
  • Commit to your fork using clear commit messages.
  • Send a pull request, answering any default questions in the pull request interface.
  • Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

@christianrauch
christianrauch force-pushed the robot_description_param branch from 0d2f666 to 621f9b3 Compare July 17, 2026 21:40

@saikishor saikishor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After we conclude this approach. If we decide to move further, then I will be asking you to add a test case for this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bring back the robot_description parameter

2 participants