[visual_slam_node]: Transform is impossible. canTransform(base_link->front_stereo_camera_left_optical) returns false

Hi there!

I am running Isaac Sim with ROS bridge on a container, looks ok.

  • I downloaded the Isaac Examples → ROS2 → Isaac ROS → Sample Scene.

  • I then run the Dev Contanier with Visual Slam using the run_dev.sh script and launch the visual slam node using ros2 launch isaac_ros_visual_slam isaac_ros_visual_slam_isaac_sim.launch.py.

  • On the dev container, I can see the simulation and vslam node publishing the topics:

/back_stereo_imu/imu
/chassis/imu
/chassis/odom
/clicked_point
/clock
/cmd_vel
/front_3d_lidar/lidar_points
/front_stereo_camera/left/camera_info
/front_stereo_camera/left/image_rect_color
/front_stereo_camera/right/camera_info
/front_stereo_camera/right/image_rect_color
/front_stereo_imu/imu
/goal_pose
/initialpose
/left_stereo_imu/imu
/parameter_events
/right_stereo_imu/imu
/rosout
/tf
/tf_static
/visual_slam/tracking/odometry
/visual_slam/tracking/slam_path
/visual_slam/tracking/vo_path
/visual_slam/vis/gravity
/visual_slam/vis/gravity_array
/visual_slam/vis/landmarks_cloud
/visual_slam/vis/loop_closure_cloud
/visual_slam/vis/observations_cloud
/visual_slam/vis/pose_graph_edges
/visual_slam/vis/pose_graph_edges2
/visual_slam/vis/pose_graph_edges2_array
/visual_slam/vis/pose_graph_edges_array
/visual_slam/vis/pose_graph_nodes
/visual_slam/vis/velocity
  • I also run rviz2 with the configurations from isaac_sim.cfg.rviz, setting the Global Options → Fixed Frame to base_link, I see the cameras streaming and the robot moving.

  • Expanding TF I see Status: OK, and all components shows Transform OK.

  • Listening to the /tf topic also shows the TF are properly published:

$ ros2 topic echo /tf I see proper publishing of TFs
transforms:
- header:
    stamp:
      sec: 1
      nanosec: 616666750
    frame_id: odom
  child_frame_id: base_link
  transform:
    translation:
      x: 0.0016629675261941293
      y: -8.179422032922156e-08
      z: -2.621147083945744e-06
    rotation:
      x: -4.6947013650158655e-07
      y: 7.45005632965058e-08
      z: -7.991802979175412e-07
      w: 0.9999999999995677
---
transforms:
- header:
    stamp:
      sec: 1
      nanosec: 616666750
    frame_id: base_link
  child_frame_id: chassis_link
  transform:
    translation:
      x: 0.0
      y: 0.0
      z: -0.0
    rotation:
      x: -8.222087899412145e-09
      y: -1.6094709280878305e-05
      z: -2.8014255804009736e-07
      w: 1.0000001192092896
---
transforms:
- header:
    stamp:
      sec: 1
      nanosec: 616666750
    frame_id: base_link
  child_frame_id: front_stereo_camera_right_optical
  transform:
    translation:
      x: 0.10030002892017365
      y: -0.07500199973583221
      z: 0.3459000587463379
    rotation:
      x: 0.5
      y: -0.5
      z: 0.4999999701976776
      w: -0.4999999701976776
- header:
    stamp:
      sec: 1
      nanosec: 616666750
    frame_id: base_link
  child_frame_id: front_stereo_camera_left_optical
  transform:
    translation:
      x: 0.10030005127191544
      y: 0.07499799877405167
      z: 0.3459000587463379
    rotation:
      x: 0.5
      y: -0.5
      z: 0.4999999701976776
      w: -0.4999999701976776
- header:
    stamp:
      sec: 1
      nanosec: 616666750
    frame_id: base_link
  child_frame_id: front_stereo_camera_imu

So where is the problem you ask??
For some reason, and after all the verifications above about proper TF configurations, the visual slam node says:

$ ros2 launch isaac_ros_visual_slam isaac_ros_visual_slam_isaac_sim.launch.py
[INFO] [launch]: All log files can be found below /home/admin/.ros/log/2024-07-24-13-34-30-665284-Ubuntu-22-31266
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [component_container-1]: process started with pid [31276]
[component_container-1] [INFO] [1721817270.959576961] [visual_slam_launch_container]: Load Library: /workspaces/isaac_ros-dev/install/isaac_ros_visual_slam/lib/libvisual_slam_node.so
[component_container-1] [INFO] [1721817270.998213558] [visual_slam_launch_container]: Found class: rclcpp_components::NodeFactoryTemplate<nvidia::isaac_ros::visual_slam::VisualSlamNode>
[component_container-1] [INFO] [1721817270.998256909] [visual_slam_launch_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nvidia::isaac_ros::visual_slam::VisualSlamNode>
[component_container-1] [INFO] [1721817271.004584547] [NitrosContext]: [NitrosContext] Loading extension: gxf/lib/std/libgxf_std.so
[component_container-1] [INFO] [1721817271.007748567] [NitrosContext]: [NitrosContext] Loading extension: gxf/lib/libgxf_isaac_gxf_helpers.so
[component_container-1] [INFO] [1721817271.009934256] [NitrosContext]: [NitrosContext] Loading extension: gxf/lib/libgxf_isaac_sight.so
[component_container-1] [INFO] [1721817271.012228678] [NitrosContext]: [NitrosContext] Loading extension: gxf/lib/libgxf_isaac_atlas.so
[component_container-1] 2024-07-24 13:34:31.019 WARN  external/com_nvidia_gxf/gxf/std/program.cpp@532: No GXF scheduler specified.
[component_container-1] [INFO] [1721817271.019751976] [NitrosContext]: [NitrosContext] Loading extension: gxf/lib/multimedia/libgxf_multimedia.so
[component_container-1] [INFO] [1721817271.023287444] [visual_slam_node.ManagedNitrosSubscriber]: Starting Managed Nitros Subscriber
[component_container-1] [INFO] [1721817271.023872940] [visual_slam_node.ManagedNitrosSubscriber]: Starting Managed Nitros Subscriber
[component_container-1] [INFO] [1721817271.031796809] [visual_slam_node]: cuVSLAM version: 12.2
[component_container-1] [INFO] [1721817271.086209433] [visual_slam_node]: Time taken by CUVSLAM_WarmUpGPU(): 0.054394
[component_container-1] [INFO] [1721817271.091074493] [visual_slam_node]: Initializing cuVSLAM.
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/visual_slam_node' in container '/visual_slam_launch_container'
[component_container-1] [ERROR] [1721817271.182657839] [visual_slam_node]: Transform is impossible. canTransform(base_link->front_stereo_camera_left_optical) returns false
[component_container-1] [INFO] [1721817278.169419587] [visual_slam_node]: Could not transform front_stereo_camera_left_optical to base_link: Lookup would require extrapolation into the past.  Requested time 64.766670 but the earliest data is at time 64.783337, when looking up transform from frame [front_stereo_camera_left_optical] to frame [base_link]
[component_container-1] terminate called after throwing an instance of 'std::runtime_error'
[component_container-1]   what():  Could not find the requested transform!
[ERROR] [component_container-1]: process has died [pid 31276, exit code -6, cmd '/opt/ros/humble/lib/rclcpp_components/component_container --ros-args -r __node:=visual_slam_launch_container -r __ns:=/'].

It says [visual_slam_node]: Transform is impossible. canTransform(base_link->front_stereo_camera_left_optical) returns false and [component_container-1] [INFO] [1721817278.169419587] [visual_slam_node]: Could not transform front_stereo_camera_left_optical to base_link ...

What is wrong here?
Thank you!

Hi @horowits

Thank you for your post.

I tested the demo again to ensure everything was working correctly and replicated a similar bug. I have reported this issue to the engineering team and will keep you posted.

Best,
Raffaello

Hi @horowits,

Could you please try reverse the order of the execution order in Tutorial for Visual SLAM with Isaac Sim — isaac_ros_docs documentation and see if the issue still reproducible?

Change:

  1. Press Play to start publishing data from the Isaac Sim.
  2. ros2 launch isaac_ros_visual_slam isaac_ros_visual_slam_isaac_sim.launch.py

to

  1. ros2 launch isaac_ros_visual_slam isaac_ros_visual_slam_isaac_sim.launch.py
  2. Press Play to start publishing data from the Isaac Sim,

Thanks.
-Todd

Greetings,

I have encountered the same error using the sample scene and following Tutorial for Visual SLAM with Isaac Sim. The reversed order didn’t change anything, I still get the same error:

[component_container-1] Warning: Invalid frame ID "left/camera_info" passed to canTransform argument source_frame - frame does not exist
[component_container-1]          at line 93 in ./src/buffer_core.cpp
[component_container-1] Warning: Invalid frame ID "left/camera_info" passed to canTransform argument source_frame - frame does not exist
[component_container-1]          at line 93 in ./src/buffer_core.cpp
[component_container-1] [ERROR] [1723817343.622480485] [visual_slam_node]: Transform is impossible. canTransform(base_link->left/camera_info) returns false
[component_container-1] [INFO] [1723817348.077131905] [visual_slam_node]: Could not transform left/camera_info to base_link: "left/camera_info" passed to lookupTransform argument source_frame does not exist. 
[component_container-1] terminate called after throwing an instance of 'std::runtime_error'
[component_container-1]   what():  Could not find the requested transform!

Thanks in advance.

Hi @upyzm ,

Thank you for your post.

Could you please share the version of GitHub - NVIDIA-ISAAC-ROS/isaac_ros_common: Common utilities, packages, scripts, Dockerfiles, and testing infrastructure for Isaac ROS packages. when you following the Tutorial?

Does it point to the latest commit message on github?
e8760a6 (HEAD, origin/main, origin/HEAD) Merge pull request #142 from NVIDIA-ISAAC-ROS/hotfix-release-3.0-2

Thanks,
-Todd

Hi
Sorry for not responding.
I didnt have chance to check what happens if I reverse the order, but I see that my isaac_ros_common is pointing to commit hash 855d408:

commit 855d4081b4f22eec0d39c73bcf357beaa03b5722 (HEAD -> main, tag: v3.0.1, origin/main, origin/HEAD)
Merge: d679b2a 0caf698
Author: Jaiveer Singh <84546269+jaiveersinghNV@users.noreply.github.com>
Date:   Fri Jun 14 15:20:04 2024 -0700

    Merge pull request #129 from NVIDIA-ISAAC-ROS/release-3.0
    
    Isaac ROS 3.0.1

Hey, thank you for your answer.

I believe I am on the right commit:

commit e8760a63dd9f4e428dbe01b597f265020792217c (HEAD -> main, origin/main, origin/HEAD, NVIDIA-ISAAC-ROS/hotfix-release-3.0-2)
Merge: 77777d3 5c9000a
Author: Jaiveer Singh <84546269+jaiveersinghNV@users.noreply.github.com>
Date:   Wed Jul 31 12:15:33 2024 -0700

    Merge pull request #142 from NVIDIA-ISAAC-ROS/hotfix-release-3.0-2
    
    Add pybindingtools dependency for MoveIt Task Constructor

In the sample scene, as well as my own scene, the following error occurs:

[component_container-1] Warning: Invalid frame ID "left/camera_info" passed to canTransform argument source_frame - frame does not exist
[component_container-1]          at line 93 in ./src/buffer_core.cpp
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[component_container-1] [INFO] [1724083659.398016557] [rclcpp]: signal_handler(signum=2)
[component_container-1] Warning: Invalid frame ID "left/camera_info" passed to canTransform argument source_frame - frame does not exist
[component_container-1]          at line 93 in ./src/buffer_core.cpp
[component_container-1] Warning: Invalid frame ID "left/camera_info" passed to canTransform argument source_frame - frame does not exist
[component_container-1]          at line 93 in ./src/buffer_core.cpp
[component_container-1] [ERROR] [1724083659.404093437] [visual_slam_node]: Transform is impossible. canTransform(base_link->left/camera_info) returns false
[component_container-1] [INFO] [1724083659.404204734] [visual_slam_node]: Could not transform left/camera_info to base_link: "left/camera_info" passed to lookupTransform argument source_frame does not exist. 
[component_container-1] terminate called after throwing an instance of 'std::runtime_error'
[component_container-1]   what():  Could not find the requested transform!

I checked the image publishing topic in my scene, which was /front_stereo_camera/left/image_raw. So I changed it to /front_stereo_camera/left/image_rect_color and restarted the whole process. Same error persisted. Then I passed the rectified_images:=false in the launch command. Now I am able to launch VSLAM without errors, however VSLAM does not get initialized, e.g. no topic created by it publishes anything.

In the sample scene, the same also error occurs with the correct topics, unless again the rectified flag is set to false. And again, nothing happens after launching.

Best,
upyzm

Okay, I found a solution for my case. The problem was that the ROS2 Camera Info Helper node publishes somehow a different frame id:

After manually changing it to correct frames in my rosbags, the VSLAM node could finally start properly.

Thanks everyone for their answers and best wishes,
upyzm

Hi @upyzm ,

Per your Isaac sim screen shot, the OmniGraphNode list in front_hawk looks a little bit different from mine.
Could you please share the git log of below repo and if it synced to latest remote tag?

Thanks,
-Todd

Hey @ToddT and thank you for your response. Sorry for the late answer.

I’ve recloned the repository. Now it definitely points to latest changes.
I start Isaac Sim with following commands:

source ~/workspaces/IsaacSim-ros_workspaces/humble_ws/install/local_setup.bash
RMW_IMPLEMENTATION=rmw_fastrtps_cpp
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.local/share/ov/pkg/isaac-sim-4.1.0/exts/omni.isaac.ros2_bridge/humble/lib
 . ~/.local/share/ov/pkg/isaac-sim-4.1.0/isaac-sim.sh

The action graph didn’t change and I am still getting the wrong frame name in the CameraInfo messages.

Best,
upyzm

Hello, I also get error due to transform though all the transforms are working and published.

but when I reversed the order, that is launch the vslam first and the hit the play button in the Isaac Sim, there is no error.

Why is that the case and how to sovle it such the I can the ordering does not matter ?