NVIDIA-ISAAC-ROS / NVIDIA-ISAAC-ROS/isaac_ros_visual_slam
Parameter `input_base_frame` not working: base -> camera transform not taken into account?
@swapnesh-wani-nvidia is already working on this.
Since Aug 1, 2022.
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Description
Hi, first of all many thanks for sharing this great repository! Unfortunately I am having some issues obtaining odometry messages that account for the transformation between the robot and camera coordinate frames.
I am currently working with a ground robot and trying to track its position using a Realsense camera positioned on top of the robot, looking slightly down as so:

From the documentation, I seem to understand that your implementation is designed to allow tracking successive poses of the robot (i.e. frame base_link), despite computing these poses in the camera frame (i.e. frame front_camera_link). Namely, the Visual Odometry node parameter input_base_frame seems to be responsible for this:
input_base_frame: 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.
However, by launching the node with 'input_base_frame': 'base_link' as follows:
visual_slam_node = ComposableNode(
name='visual_slam_node',
namespace='front_camera',
package='isaac_ros_visual_slam',
plugin='isaac_ros::visual_slam::VisualSlamNode',
parameters=[{
'enable_rectified_pose': True,
'denoise_input_images': False,
'rectified_images': True,
'enable_debug_mode': False,
'debug_dump_path': '/tmp/elbrus',
'enable_slam_visualization': True,
'enable_landmarks_view': True,
'enable_observations_view': True,
'publish_tf': False,
'map_frame': 'map',
'odom_frame': 'odom',
'base_frame': 'base_link',
'input_base_frame': 'base_link',
'input_left_camera_frame': 'front_camera_infra1_frame',
'input_right_camera_frame': 'front_camera_infra2_frame',
}],
remappings=[('stereo_camera/left/image', 'infra1/image_rect_raw'),
('stereo_camera/left/camera_info', 'infra1/camera_info'),
('stereo_camera/right/image', 'infra2/image_rect_raw'),
('stereo_camera/right/camera_info', 'infra2/camera_info')]
)
the camera position with respect to the robot frame does not seem to be taken into account. As a matter of fact, unless I am mistaken it seems that the ROS parameter input_base_frame is not used at all in the source code.
Here is an example where I start the VO tracking, and move the hand-held camera straight forward (positive X direction in the front_camera_link frame):

Overlooking the jitter caused by my hand motion, I would expect the odometry arrows to be directed "into to ground" / co-linear to the front_camera_frame's X axis. Instead, the arrows seem to be directed along the X axis of the base_link frame i.e. the VO node considers the camera to be position at the robot's center?
Have I misunderstood the usage of the node's parameters or am I overlooking something? How can I track the motion of the robot instead of the camera's? Any help would be greatly appreciate! Thanks in advance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.