intel / ros2_intel_realsense

This project is deprecated and no more maintained. Please visit https://github.com/IntelRealSense/realsense-ros for ROS2 wrapper.
Apache License 2.0
140 stars 96 forks source link

T265 on Jetson AGX Xavier with ROS2 Dashing #175

Closed AndreaEirale closed 3 years ago

AndreaEirale commented 3 years ago

I can't make T265 work on Jetson AGX Xavier with Ubuntu 18.04 and ROS2 Dashing, installing the Dashing branch from this repository.

The error I encounter when I run rs_camera.launch.py is:

[INFO] [launch]: All log files can be found below /home/me/.ros/log/2021-01-26-16-54-34-349447-me-desktop-17650
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [realsense_node-1]: process started with pid [17666]
[realsense_node-1] terminate called after throwing an instance of 'rs2::error'
[realsense_node-1]   what():  No device connected
[ERROR] [realsense_node-1]: process has died [pid 17666, exit code -6, cmd '/home/me/ros2_ws/install/realsense_node/lib/realsense_node/realsense_node __ns:=/'].

On my pc, running Ubuntu 18.04, I solved this problem by adding: dev_.hardware_reset(); in function RealSenseBase::startPipeline() of rs_base.cpp, but the same workaround did not work on Jetson, probably for the different Kernel supported for Jetson which require a different RealSense SDK.

On Jetson, the camera is seen from realsense-viewer and also from rs-enumerate-devices.

Can you help me with this problem?

SuperShinyEyes commented 3 years ago

Hi @AndreaEirale. Have you fixed the issue?

AndreaEirale commented 3 years ago

Hi @SuperShinyEyes

I managed to make the camera work by reinstalling all RealSense libraries and making the changes written in my previous message. However, now I have an even bigger problem. When I launch the rs_demo_t265.launch.py file rviz2 is automatically opened and I can see all TF correctly, including camera_pose_optical_frame and odom_frame. My problem is, if I close that rviz, all TF are not published anymore. So, if I open rviz again, I can't see the camera's TF. How is this possible? I have really never seen such a behavior in ROS2 in my whole life! Can you please explain me what is happening? Thank you very much!

AndreaEirale commented 3 years ago

Ok, I managed to find the problem here. You have necessarily to add the voice "Odometry" in Rviz, subscribing to the topic "/camera/odom/sample". If this subscription is not done, the camera odometry is not published, and as a consequence also TFs are not published.

There are no other problems, I close the discussion

SuperShinyEyes commented 3 years ago

@AndreaEirale Thank you for the update. Glad you got it working :)