How to visualise IMU data in Rviz?
OS: Pop!_OS 22.04 LTS
ROS Version: ROS2 Humble
I have my Intel Realsense d435i camera publishing the following topic:
/camera/accel/imu_info
/camera/accel/metadata
/camera/accel/sample
/camera/color/camera_info
/camera/color/image_raw
/camera/color/image_raw/compressed
/camera/color/image_raw/compressedDepth
/camera/color/metadata
/camera/depth/camera_info
/camera/depth/color/points
/camera/depth/image_rect_raw
/camera/depth/image_rect_raw/compressed
/camera/depth/image_rect_raw/compressedDepth
/camera/depth/metadata
/camera/extrinsics/depth_to_accel
/camera/extrinsics/depth_to_color
/camera/extrinsics/depth_to_depth
/camera/extrinsics/depth_to_gyro
/camera/gyro/imu_info
/camera/gyro/metadata
/camera/gyro/sample
/camera/imu
/parameter_events
/rosout
/tf_static
I want to visualise the /camera/imu
topic in RViz. When the camera moves I would like to see the movement in Rviz. Currently when I open Rviz while the realsense2_camera
this is the view that I get:
While the Imu Status: Warn Topic: No messages received shows up the ros2 topic echo /camera/imu
publishes the following (showing only one message): gist
The rivz terminal spams with this INFO message:
[INFO] [1669385796.444049080] [rviz]: Message Filter dropping message: frame 'camera_imu_optical_frame' at time 1669385796.101 for reason 'discarding message because the queue is full'
I have the following option in Fixed Frame drop down menu:
camera_accel_fram
camera_accel_optical_frame
camera_color_frame
camera_depth_frame
camera_depth_optical_frame
camera_gyro_frame
camera_gyro_optical_frame
camera_link
and none of them show the movement of my camera.
Do I need to create a static_transfor_publisher? If I have to, I need to map the offset of base_link to minus of whatever the value published by /camera/imu
, right? Is this the way to go?
If I have to, I need to map the offset of base_link to minus of whatever the value published by /camera/imu, right?
No. The urdf (or static_transform_publisher) specifies the pose of the sensor (where it is mounted) relative to base_link. The data values output by the sensor have nothing to do with it.
@mike-scheutzow Doesn't the realsense2_camera publish the required tf? Am I supposed the setup the static transforms by myself?
You are supposed to set the tf connecting the camera frame and the base of your robot .I belive if this isn't properly done ,an error will pop up on rviz .
I do not have a robot. I just want to see the IMU data published in
/camera/imu
in Rviz.