IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.59k stars 1.76k forks source link

IMU problems for the D455 #3208

Closed louislelay closed 1 month ago

louislelay commented 1 month ago

Issue Description

Required Info Details
Camera Model D455
Firmware Version 5.15.0.2
Operating System & Version Ubuntu 22.04
Kernel Version (Linux Only) 6.8.0-40
Platform PC
Librealsense SDK Version 2.55.1
Language N/A
Segment Robot
ROS Distro Humble
RealSense ROS Wrapper Version 4.55.1

Hello, I’m working with a RealSense D455 camera and encountered some issues when trying to use the IMU topic.

Steps to Reproduce:

  1. I launched the rs_launch.py file without any arguments. I noticed that the expected /camera/camera/imu topic doesn't appear. From my inspection, it seems that this topic is not enabled by default. If this is intended behavior, I suggest updating the README to reflect the change.

  2. I then tried to enable the IMU by running the following command:

    ros2 launch realsense2_camera rs_launch.py enable_accel:=true enable_gyro:=true unite_imu_method:=2

Issues Observed:

Confusion:

Thanks in advance!

IRONCROWY commented 1 month ago

If what i remembered is not wrong, D455 has no orientation output.

MartyG-RealSense commented 1 month ago

Hi @louislelay Thanks very much for your questions.

  1. You are correct, the accel and gyro IMU topics are disabled by default, because not everyone has a RealSense camera equipped with an IMU.

The IMU streams being disabled by default is referenced in the following line of the documentation on the wrapper's main page.

enable_: Choose whether to enable a specified stream or not. Default is true for images and false for orientation streams.

  1. The recollection of @IRONCROWY above regarding orientation values not being provided is correct, at least for the ROS1 wrapper - please see https://github.com/IntelRealSense/realsense-ros/issues/1210#issuecomment-634465607

One ROS1 user at https://github.com/IntelRealSense/realsense-ros/issues/1694#issuecomment-779736012 installed an additional package to obtain the orientation.

In regard to IMU support in the ROS2 wrapper, it also only supports gyro, accel and the unite_imu_method parameter that publishes the /imu topic.

louislelay commented 1 month ago

Hi @MartyG-RealSense, thank you so much for the detailed response!

I’ll go over everything in the next few days, but I do think the README might need a small update. It seems to suggest that the IMU topic is published without any parameters, which isn’t accurate from what you say. It’s a minor change, but it would make things clearer. Also, I now understand why the other messages in the topic aren't updating. That said, do you think it would be a good idea to add a node in the repository to publish orientation if needed?

MartyG-RealSense commented 1 month ago

You are very welcome!

If you would like to suggest a change to the documentation or create and submit a mechanism to publish orientation then contributions to the RealSense wrapper from users via a Pull Request (PR) are welcomed. Please see https://github.com/IntelRealSense/realsense-ros/pulls

louislelay commented 1 month ago

I'll experiment with a few approaches and, if I find a promising solution, I'll be sure to propose it! Since all my questions have been answered, I'll close this issue. Thanks again @MartyG-RealSense!

MartyG-RealSense commented 1 month ago

You are very welcome, @louislelay - thanks very much for the update. Good luck!