How to get the x, y and z values in real by Isaac-ROS-Apriltag

I have some questions.
I calibrated a built-in camera of my laptop and run Isaac-ROS-Apriltag.

However, the values of the output, x, y and z in position, were different from the values what I measured in real.
For instance, the distance between the camera of laptop and apriltag marker was 50 cm, but the value of z that Isaac-ROS-Apriltag showed was 2.37.

In addition, I sent a .png file that was made by Blender to Isaac-ROS-Apriltag.
The focal length was 13.8mm and image size was 1920 x 1080.
So, I set parameters below as camera_info.k.

camera_info.k = [
    736., 0.,   960.,
    0.,   621., 540,
    0.,   0.,   1.,

The outputs of Isaac-ROS-Apriltag was {‘x’: -0.3213535249233246, ‘y’: 0.14823968708515167, ‘z’: 0.6875213980674744}.

But the difference of coordinates between the apriltag and camera in Blender was [0.16572, (-)0.2582, 0.2565], its unit is meter.

coordinates of camera

coordinates of apriltag

So, there is the difference between the expected coordinates’ values and the output, x, y and z in position, from Isaac-ROS-Apriltag.

I checked ROS Parameters and changed not size but tag_dimensions because I could not find size in /workspaces/isaac_ros-dev/src/isaac_ros_apriltag/isaac_ros_apriltag/config/apriltag_node.yaml.

- name: cuda_april_tag_detector
  type: nvidia::isaac::CudaAprilTagDetector
    camera_image: camera_image_info_in
    april_tags: april_tags_out
    allocator: pool
    max_tags: 64
    tile_size: 4
    tag_dimensions: 0.08  # I use 8cm x 8cm Apriltag marker.

Then run colcon build.

$ cd /workspaces/isaac_ros-dev && \
  colcon build --symlink-install && \
  source install/setup.bash

Nevertheless I chenged the parameter, tag_dimensions, and colcon build, nothing was changed.

What do I miss for this?
Are the values of position from Isac-ROS-Apriltag different from the values in real?
If so, do I need to take some measures like matrix calculations, for example using quaternion, to get the correct values for real?

Thank you.

Hi @uma7

I’m still investigating, and I’m reporting your issue on the documentation to the engineering department.

Meanwhile, I also looked at the source code, and size is a parameter available.
Instead of using tag_dimensions, add size on the yaml file and test if works.

Let me know


1 Like

Hi, @Raffaello .

Thank you always.
I really appreciate your help.

I changed apriltag_node.yaml and added size parameter as your advice, but unfortunatelly nothing changed.
Screenshot from 2024-02-13 18-46-58

I also changed size in apriltag_node.cpp and colcon build, but the output was same.

admin@7-ssd:/workspaces/isaac_ros-dev$ cd /workspaces/isaac_ros-dev && colcon build --symlink-install && source install/setup.bash

In addition, I set ros param, but outputs was not changed either.

A terminal
$ ros2 launch isaac_ros_apriltag
Another terminal
$ ros2 param set /apriltag size 0.08
Set Parameter successful
$ ros2 param get /apriltag size
Double value is: 0.08

I am sorry, I should have uploades a image for detection, so let me add a new image.

Then you might be able to check what I asked.
This image is what I send to Isaac-ROS-Apriltag.
The distance, z values, should be around 26cm(difference between y value of camera and y value of apriltag marker), but the z value in /header/pose/position from Isaac-ROS-Apriltag is 0.6875.

I changed several parameters, but I could not solve this.
So, I guessed the coordinate frames(?) is different from our real world.
Then I asked if it is different, how I can get the real world coordinates.
I searched about tf, Point, quaternion and so on, but I have no idea what to do now.


Hi @uma7

Can you verify if the configuration result has changed on the system by checking from another terminal?

All you need to do is open a new terminal and run the command below

cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \

and run:


You will read an output like that

I have tested and verified that the parameters have been changed correctly.

1 Like

Thank your for your reply, @Raffaello .
In my case, even if I open another terminal and run my code, the configuration result was not changed.
But I could reach the conclusion.
I changed the size parameter in
However, the output was not changed only by that.
I needed to use colcon build every time I open the Docker image.
Then the result was shown correctly.

Thank you for your help.
I really appreciated it.