IntelRealSense / realsense-ros

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

camera_imu_optical_frame is not connected with the camera_link #2215

Closed haquebd closed 2 years ago

haquebd commented 2 years ago

The "camera_imu_optical_frame" is attached with the "odom" frame and its not moving along with the camera_link (which is required).

` ~/catkin_ws$ rostopic echo -n1 /tf_static transforms:

frames.pdf

MartyG-RealSense commented 2 years ago

Hi @haquebd In your ROS launch log, do you have any IMU-related warnings such as the ones described in https://github.com/IntelRealSense/realsense-ros/issues/1224#issue-629530480

haquebd commented 2 years ago

I am getting the following Warning while running the rs_camera.launch file using initial_reset:=true. I am getting data at rostopic echo /camera/imu

10/01 22:50:47,684 WARNING [547406999936] (ds5-motion.cpp:473) IMU Calibration is not available, default intrinsic and extrinsic will be used. [ WARN] [1641873047.693797523]: document.pdf

10/01 22:50:47,693 WARNING [547247604096] (backend-hid.cpp:715) HID set_power 1 failed for /sys/devices/3610000.xhci/usb2/2-3/2-3.2/2-3.2:1.5/0003:8086:0B3A.0004/HID-SENSOR-200073.1.auto/iio:device1/buffer/enable [ INFO] [1641873047.755575616]: SELECTED BASE:Depth, 0 [ WARN] [1641873047.851886384]: Publishing dynamic camera transforms (/tf) at 10 Hz [ INFO] [1641873047.871539195]: RealSense Node Is Up! [ WARN] [1641873048.306809757]: Hardware Notification:Motion Module failure,1.64187e+12,Error,Hardware Error

==================================== When I am using the opensource_tracking.launch I am getting the below errors which is much larger. Here the TF is generating the Tree which is not intended as IMU frame is still connected to the "Odom" along with the "camera_imu_optical_frame" frame When using the "IMU_Filter_madgwick" which is required with the "camera_link" document(1).pdf

[ INFO] [1641874220.452906605]: Device Sensors: [ WARN] [1641874220.455839049]: Warning: Some linear velocity entries in parameter imu0_config are listed true, but an sensor_msgs/Imu contains no information about linear velocities [ INFO] [1641874220.460920721]: Stereo Module was found. [ INFO] [1641874220.488396066]: RGB Camera was found. [ INFO] [1641874220.489619739]: Motion Module was found. [ INFO] [1641874220.489907296]: (Confidence, 0) sensor isn't supported by current device! -- Skipping... [ INFO] [1641874220.491847752]: num_filters: 1 [ INFO] [1641874220.491950826]: Setting Dynamic reconfig parameters. [ WARN] [1641874220.657742561]: Failed to meet update rate! Took 0.010302977000000001356 [ WARN] [1641874220.658062855]: Failed to meet update rate! Took 0.0074035720000000006247 [ INFO] [1641874220.938722470]: Done Setting Dynamic reconfig parameters. [ INFO] [1641874220.940031008]: depth stream is enabled - width: 640, height: 480, fps: 30, Format: Z16 [ INFO] [1641874220.941316539]: color stream is enabled - width: 640, height: 480, fps: 30, Format: RGB8 [ INFO] [1641874220.944113876]: gyro stream is enabled - fps: 200 [ WARN] [1641874220.944233046]: No mathcing profile found for accel with fps=200 [ WARN] [1641874220.944296535]: Using default profile instead. [ INFO] [1641874220.944351128]: accel stream is enabled - fps: 63

[ INFO] [1641874220.971528931]: Expected frequency for depth = 30.00000 [ WARN] [1641874220.981324299]: Failed to meet update rate! Took 0.0066826180000000004119 [ INFO] [1641874221.217219057]: Expected frequency for color = 30.00000 QXcbConnection: XCB error: 148 (Unknown), sequence: 173, resource id: 0, major code: 140 (Unknown), minor code: 20 [ WARN] [1641874221.641727866]: Failed to meet update rate! Took 0.0070761070000000007504 [ INFO] [1641874221.820780410]: Expected frequency for aligned_depth_to_color = 30.00000 [ WARN] [1641874222.025629351]: Failed to meet update rate! Took 0.0076535130000000006767 [ INFO] [1641874222.323760760]: Start publisher IMU

10/01 23:10:22,358 WARNING [547536884096] (ds5-motion.cpp:473) IMU Calibration is not available, default intrinsic and extrinsic will be used. [ INFO] [1641874222.447548014]: SELECTED BASE:Depth, 0 [ WARN] [1641874222.493646328]: [ INFO] [1641874222.515754458]: Starting node... [ WARN] [1641874222.621343742]: Could not obtain transform from camera_imu_optical_frame to camera_link. Error was "camera_link" passed to lookupTransform argument target_frame does not exist.

[ WARN] [1641874222.723275063]: Failed to meet update rate! Took 0.0086297800000000000897 [ INFO] [1641874222.727680689]: RealSense Node Is Up! [ WARN] [1641874222.741500458]: Failed to meet update rate! Took 0.0096928200000000012959 [ WARN] [1641874222.742423901]: Failed to meet update rate! Took 0.0078085720000000006027 [ WARN] [1641874222.755231041]: Failed to meet update rate! Took 0.010177918000000001075

MartyG-RealSense commented 2 years ago

There is little documentation available about the Failed to meet update rate! error. When ROS does generate this error though, it sometimes provides this advice: "Try decreasing the rate, limiting sensor output frequency, or limiting the number of sensors". The IMU configuration settings that are being applied by opensource_tracking.launch do not seem to be very demanding though.

When using rs_camera.launch you should add terms to the roslaunch instruction to enable the gyro and accel IMU topics, as they are disabled by default in that launch file. For example:

roslaunch realsense2_camera rs_camera.launch enable_gyro:=true enable_accel:=true unite_imu_method:=linear_interpolation

haquebd commented 2 years ago

Thanks @MartyG-RealSense for your response. Would you let me know which example script is available for a realsense D435i for SLAM as I am trying to implement the camera with a RTab SLAM?

Can you suggest any ideal IMU settings for Opensource_tracking.launch file or shall I follow the rs_camera setting as a base and add 3 more parameters as you told?

MartyG-RealSense commented 2 years ago

Intel has a D435i SLAM tutorial that makes use of opensource_tracking.launch and rtabmap_ros.

https://github.com/IntelRealSense/realsense-ros/wiki/SLAM-with-D435i

Include the IMU enabling terms mentioned above in the opensource_tracking.launch roslaunch instruction, as the guide was published before the IMU topics were disabled by default.

roslaunch realsense2_camera opensource_tracking.launch enable_gyro:=true enable_accel:=true

A RealSense user created an adaptation of this guide that adds localization and tracking of the camera's position.

https://shinkansan.github.io/2019-UGRP-DPoom/SLAM

If you experience performance problems with the IMU when using opensource_tracking.launch then you may find that changing the unite_imu_method setting from 'linear_interpolation' to 'copy' improves stability.

https://github.com/IntelRealSense/realsense-ros/blob/development/realsense2_camera/launch/opensource_tracking.launch#L7

MartyG-RealSense commented 2 years ago

Hi @haquebd Do you require further assistance with this case, please? Thanks!

MartyG-RealSense commented 2 years ago

Case closed due to no further comments received.