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

Revision history [back]

click to hide/show revision 1
initial version

The name of the command line flag to pass ROS arguments is --ros-args (plural, and not --ros-arg)

So if you modify your first invocation with --ros-args it should work

ros2 run /mynode run --ros-args -p foo:=foo_val_cmdline

The name of the command line flag to pass ROS arguments is --ros-args (plural, and not --ros-arg)

So if you modify your first invocation with --ros-args it should work

ros2 run /mynode run --ros-args -p foo:=foo_val_cmdline

Edit: It looks like you are using ROS 2 dashing. The ability to pass parameters via commandline has been added in ROS Eloquent and is not available in dashing.

The name of the command line flag to pass ROS arguments is --ros-args (plural, and not --ros-arg)

So if you modify your first invocation with --ros-args it should work

ros2 run /mynode run mypackage mynode --ros-args -p foo:=foo_val_cmdline

Edit: It looks like you are using ROS 2 dashing. The ability to pass parameters via commandline has been added in ROS Eloquent and is not available in dashing.