ros2 launch depthai_ros_driver camera.launch.py camera_model:=OAK-D-W params_file:=/home/pi/GoPi5Go/ros2ws/params/camera.yaml publishes:

/oak/rgb/image_raw  
/oak/rgb/camera_info

and ros2 launch aruco_opencv aruco_tracker.launch.xml expects:

/camera/image_raw
/camera/camera_info

The ROS2 launch command does not allow --ros-args --remap /oak/rgb:=/camera
(and setting the camera base topic in aruco_tracker.yaml does not work:

/**:
  ros__parameters:
    # cam_base_topic: camera/image_raw
    cam_base_topic: oak/rgb

Any hints on how to do this?
Do I have to write my own depthai_ros_driver/launch/aruco_camera.launch.py to do the remap?

    • Best Answerset by cycob

    I got it working with a custom launch file:

    slowrunner/GoPi5Goblob/main/systests/aruco/aruco_camera.launch.py

    header:
      stamp:
        sec: 1734286796
        nanosec: 425563519
      frame_id: oak_rgb_camera_optical_frame
    markers:
    - marker_id: 5
      pose:
        position:
          x: 0.05173255350509175
          y: -0.029103121047933316
          z: 0.5412244950190088
        orientation:
          x: 0.9975646146976297
          y: 0.026159965251779892
          z: -0.054218249093173264
          w: 0.035226086732218505
    boards: []


I got it working with a custom launch file:

slowrunner/GoPi5Goblob/main/systests/aruco/aruco_camera.launch.py

header:
  stamp:
    sec: 1734286796
    nanosec: 425563519
  frame_id: oak_rgb_camera_optical_frame
markers:
- marker_id: 5
  pose:
    position:
      x: 0.05173255350509175
      y: -0.029103121047933316
      z: 0.5412244950190088
    orientation:
      x: 0.9975646146976297
      y: 0.026159965251779892
      z: -0.054218249093173264
      w: 0.035226086732218505
boards: []