Isaac_ros_vslam parameters clarification


First, thanks for the awesome project!

I would like some clarification regarding the different frames defined that isaac_ros_vslam uses when creating a map and achieving loop closure, as well as navigating:

We are trying to build a map using “force_planar_mode” active, and in our configuration (unlike the isaac_ros_vslam examples), the camera is not at the robot’s center.

We have the following TF frames defined:

  • map_frame: “map”

  • odom_frame: “odom”

  • base_frame: {our robot’s base link}

We also see the following frame parameters listed in the API with descriptions:

input_base_frame std::string "" Name of the frame (baselink) to calculate transformation between the baselink and the left camera. Default is empty, which means the value of the base_frame will be used. If input_base_frame and base_frame are both empty, the left camera is assumed to be in the robot’s center.
input_left_camera_frame std::string "" The name of the left camera frame. the default value is empty, which means the left camera is in the robot’s center and left_pose_right will be calculated from CameraInfo.

We have set the input camera frame to point to the left camera as defined and linked in our TF tree, as we are using the infrared streams for vslam.

  • input_left_camera_frame: “camera_infra1_frame”

Using the above configuration, when we run vslam and log the output of the z (height) position value, we see that the “force_planar_mode” does not work to keep the position at 0 height and it is constantly fluctuating. In addition, we also didn’t see loop closure corrections in the graph. The enable_localization_n_mapping parameter is set to true.

When we leave this parameter (input_left_camera_frame) empty (which is not accurate for our system), the forced planar mode works…

Please clarify how this parameter should be used (perhaps in conjunction with the other parameter, so that we can achieve forced planar mode even when our camera is not at the robot’s center?

Additionally, we tested setting the input_base_frame parameter, which is described as used “to calculate transformation between the baselink and the left camera,” but we are unsure how this parameter is meant to be used…

Which direction is this “transformation” intended? Should this parameter point to the robot’s center {our robot’s base link}, or should it be the camera frame (i.e.,camera_infra1_frame)?

Note, when we tested the former, planar mode did not work, while when we tested the latter, it did…

How does input_base_frame interact with base_frame ? Does it override the other? If it is set, what frame(s) are the calculated slam_odometry values in relation to?

Any clarification regarding these two frame parameters and how they interact with the core TF frames to successfully achieve planar mode and a closed loop system would be greatly appreciated.

Thank you!

For your case, keep the value of input_base_frame the same as base_frame. Your configuration seems fine.
It is a complete TF tree
map → odom → base_link → input_left_camera_frame

I think the force_planar_mode will try to give the poses that are planar with respect to the base_link where it was originally started. If base_link is hovering over the ground (let’s say z = 0.5m) then all the poses will report z~0.5 in case force_planar_mode is enabled. If you need the o/p poses to be at the ground (z=0) then you may have to move the base_frame location to the ground. Usually, it is called base_footprint. In that case set the base_frame = base_footprint and tf tree should look like

map -> odom -> base_link -> input_left_camera_frame
                         -> base_footprint

Thank you for your prompt reply!

That’s great that our configuration, based on testing isaac_visual_slam and simulations in Isaac Sim has been confirmed as correct.

Let me clarify one thing.

Do we need to specify the input_left_camera_frame parameter? Just when this parameter is assigned, the planar mode stops working.

OR do not input anything in this particular parameter, and then the transformation between the left eye (left_camera_frame) and the base_link frame is calculated by taking a link in Camera info messages and looking in the TF tree chain.
But at the same time, I see from the API that if input_left_camera_frame parameter value is empty, it means the left camera is in the robot’s center. But it’s not our case.

Could you please clarify this as well?

Thank you!