Configure custom image topic as an input for apriltag_node

Hi,

I’ve currently configured an environment where I launch the isaa-ros-apriltag detector in a custom docker container and I feed it with a Image topic from the realsense-camera ROS node. I’m remmaping the ouput topic from the realsense ROS node to /image and /camera_info as these are the topics expected by isaac-ros-apriltag node.

I’ve also seen that this values (the expected topic names) are defined in apriltag_node.cpp as INPUT_TOPIC_NAME_CAM and INPUT_TOPIC_NAME_CAM_INFO.

My problem is that I want to place 2 cameras on my robot, and there should be one apriltag detector node for each camera, so I can’t remap both cameras to the /image and /camera_info topics.

Is there some way to launch the isaac-ros-apriltag node with custom input topics without making two different compilations?

Hi @maciekPR

The best approach is to create your own ROS 2 launch file and remap the input or output for each Isaac ROS AprilTag.

On the official documentation you can see: Using Python, XML, and YAML for ROS 2 Launch Files — ROS 2 Documentation: Humble documentation

    # perform remap so both turtles listen to the same command topic
    forward_turtlesim_commands_to_second_turtlesim_node = Node(
            package='turtlesim',
            executable='mimic',
            name='mimic',
            remappings=[
                ('/input/pose', '/turtlesim1/turtle1/pose'),
                ('/output/cmd_vel', '/turtlesim2/turtle1/cmd_vel'),
            ]
        )

You can use the parameter: remappings

I hope I helped you.
Best,
Raffaello

Hi @Raffaello ,

I’ve already tried the remapping option. If I remap the output topic on the realsense camera node it works

            remappings=[
                ('/front/camera/color/image_raw', '/image'),
                ('/front/camera/color/camera_info', '/camera_info')],

But this is not the best solution for me, as I need to have two different realsense nodes (front and back camera) so I cannot map both nodes to the /image topic.

If I try to do the remmap the topics in isaac_ros_apriltag.launch.py when launching apriltag_node it doesn’t seem to work properly and apriltag_node doesn’t seem to receive the image topic

Hi @maciekPR

Can you please share your launch.py file and the ros topic list?

Thank you in advance,
Raffaello