Skip to content

[Bug]: parser error Couldn't parse parameter override rule: '--param robot_description #81

@asaj

Description

@asaj

What happened?

I'm trying to load a locobot in gazebo with this command:

ros2 launch interbotix_xslocobot_sim xslocobot_gz_classic.launch.py robot_model:=locobot_px100 base_type:=create3

I get the following error:

asaoines@ros2-humble-vm:/locobot/workspace$ ros2 launch interbotix_xslocobot_sim xslocobot_gz_classic.launch.py robot_model:=locobot_px100 base_type:=create3
[INFO] [launch]: All log files can be found below /home/asaoines/.ros/log/2024-11-08-22-30-20-623563-ros2-humble-vm-48567
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gzserver-1]: process started with pid [48569]
[INFO] [gzclient-2]: process started with pid [48571]
[INFO] [spawn_entity.py-3]: process started with pid [48573]
[INFO] [robot_state_publisher-4]: process started with pid [48575]
[INFO] [rviz2-5]: process started with pid [48577]
[gzserver-1] xcb_connection_has_error() returned true
[gzserver-1] xcb_connection_has_error() returned true
[ERROR] [rviz2-5]: process has died [pid 48577, exit code -6, cmd '/opt/ros/humble/lib/rviz2/rviz2 -d /locobot/workspace/install/interbotix_xslocobot_sim/share/interbotix_xslocobot_sim/rviz/xslocobot_gz_classic.rviz -f locobot/base_link --ros-args -r __node:=rviz2 -r __ns:=/locobot --params-file /tmp/launch_params_v54x4flz'].
[gzserver-1] [INFO] [1731105023.827951106] [gazebo_ros2_control]: Loading gazebo_ros2_control plugin
[gzserver-1] [INFO] [1731105023.833508752] [locobot.gazebo_ros2_control]: Starting gazebo_ros2_control plugin in namespace: /locobot
[gzserver-1] [INFO] [1731105023.833818578] [locobot.gazebo_ros2_control]: Starting gazebo_ros2_control plugin in ros 2 node: gazebo_ros2_control
[gzserver-1] [INFO] [1731105023.838555252] [locobot.gazebo_ros2_control]: connected to service!! robot_state_publisher
[gzserver-1] [INFO] [1731105023.839792022] [locobot.gazebo_ros2_control]: Received urdf from param server, parsing...
[gzserver-1] [INFO] [1731105023.839864951] [locobot.gazebo_ros2_control]: Loading parameter files /locobot/workspace/install/interbotix_xslocobot_sim/share/interbotix_xslocobot_sim/config/create3_version/locobot_px100_controllers.yaml
[gzserver-1] [rcutils|error_handling.c:65] an error string (message, file name, or formatted message) will be truncated
[gzserver-1] [ERROR] [1731105023.841246228] [locobot.gazebo_ros2_control]: parser error Couldn't parse parameter override rule: '--param robot_description:=<?xml version="1.0" ?>
[gzserver-1] <!-- =================================================================================== -->
[gzserver-1] <!-- |    This document was autogenerated by xacro from /locobot/workspace/install/interbotix_xslocobot_descriptions/share/interbotix_xslocobot_descriptions/urdf/locobot.urdf.xacro | -->
[gzserver-1] <!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
[gzserver-1] <!-- =================================================================================== -->
[gzserver-1] <robot name="locobot">
[gzserver-1]   <material name="interbotix_black">
[gzserver-1]     <texture filename="package://interbotix_common_sim/media/materials/textures/interbotix_black.png"/>
[gzserver-1]   </material>
[gzserver-1]   <!-- kobuki -->
[gzserver-1]   <!-- Much of, at ./src/rcl/arguments.c:343
[gzserver-1] 
[INFO] [spawn_entity.py-3]: process has finished cleanly [pid 48573]

Robot Model

locobot_px100 but with gazebo so it's a bit moot

Operating System

Ubuntu 22.04

ROS Distro

ROS 2 Humble

Steps To Reproduce

No response

Relevant log output

No response

Additional Info

It works if I edit DeclareInterbotixXSLoCoBotRobotDescriptionLaunchArgument in xs_launch.py to have the default robot_description be sourced from a URDF file (via Command(['cat'...])) that I generated with this command, which strips out comments from the URDF:

sh -c "/opt/ros/humble/bin/xacro /locobot/workspace/install/interbotix_xslocobot_descriptions/share/interbotix_xslocobot_descriptions/urdf/locobot.urdf.xacro arm_model:=mobile_px100 robot_name:=locobot base_model:=create3 robot_model:=locobot_px100 robot_name:=locobot use_gripper:=true show_ar_tag:=true show_gripper_bar:=true show_gripper_fingers:=true use_lidar:=false external_urdf_loc:= hardware_type:=gz_classic" | sed -e '/<\!--/,/-->/d'

I tried to edit that function to automatically strip out comments after generating the URDF from Xacro but I couldn't get it to work.

This approach was inspired by ros-controls/gazebo_ros2_control#295

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions