Robotics StackExchange | Archived questions

starting node from launch file results in ros-args error

I am trying to start the cameracalibrator node of the camera_calibration package from a .launch.xml file, but I keep getting the following error:

cameracalibrator: error: no such option: --ros-args
[ERROR] [cameracalibrator-1]: process has died [pid 260262, exit code 2, cmd '/opt/ros/foxy/lib/camera_calibration/cameracalibrator --ros-args --params-file /tmp/launch_params_jx416aia --params-file /tmp/launch_params_9dnocsan']

The cmd I am basically trying to produce is this, but it seems that the launch file introduces a '--ros-args' which is causing problems:

ros2 run camera_calibration cameracalibrator --size 7x9 --square 0.20 image:=/some/topic camera:=/some_camera

Here is my .launch.xml:

<!-- blackfly_calibration.launch.xml -->

<launch>
  <!-- start the clibration node -->
  <node pkg="camera_calibration" exec="cameracalibrator">
    <param name="image" value="/some/topic"/>
    <param name="camera" value="some_camera"/>
    <arg name="size" value="7x9"/>
    <arg name="square" value="0.020"/>
  </node>
</launch>

I am using Foxy

Asked by rosnoob145 on 2021-08-17 11:30:29 UTC

Comments

This is fixed, but hasn't been released in Foxy. https://github.com/ros-perception/image_pipeline/pull/597

Asked by clyde on 2021-10-18 16:30:50 UTC

Answers