-3

I had been getting the error

I tried to run robot state publisher with this command:

ros2 run robot_state_publisher robot_state_publisher --ros-args -p robot_description:="$( xacro -/example_robot.urdf.xacro )"

according to this tutorial by articulated robotics (https://youtu.be/QyvHhY4Y_Y8?t=607) however i am getting the error:

Usage: xacro [options] <input>

xacro: error: no such option: -/
[ERROR] [1677169953.180432728] [rcl]: Failed to parse global arguments
terminate called after throwing an instance of 'rclcpp::exceptions::RCLInvalidROSArgsError'
  what():  failed to initialize rcl: Couldn't parse parameter override rule: '-p robot_description:='. Error: error not set, at /tmp/binarydeb/ros-foxy-rcl-1.1.14/src/rcl/arguments.c:325

Would you guys pls help me here? Also can i ask general quetions on my project here as project guidance? Thank you

Jonas
  • 121,568
  • 97
  • 310
  • 388
  • ["Can Someone Help Me?" is not an actual question](https://meta.stackoverflow.com/a/284237/162698) and [ask] – Rob Feb 24 '23 at 02:31

1 Answers1

0

I dont know if you're looking at this carefully, but you are supposed to use the '~' (tilde) character and not the '-'(hyphen) character.

Run this :

ros2 run robot_state_publisher robot_state_publisher --ros-args -p robot_description:="$( xacro ~/example_robot.urdf.xacro )"

P.S - Please make sure you have the urdf.xacro file present at the correct path when you run this.

A-T
  • 342
  • 2
  • 14