-
Notifications
You must be signed in to change notification settings - Fork 96
Realsense node crashes when subscribe to pointcloud #147
Comments
I tried to fix the problem by changing the stream profiles as mentioned in [1], but without success I modified the
|
Intel's plan is to release a new ROS2 wrapper, based on the ROS1 wrapper. |
Thanks for the response, we were using the "refactor" branch, which seemed to be the most recently active. We can try with the "eloquent" branch instead. |
@justinIRBT ,I meant, branch eloquent in the ROS1 repository: https://github.com/IntelRealSense/realsense-ros/tree/eloquent |
@doronhi We succesfully built and run the eloquent branch on a Raspberry Pi 4 wiht ROS 2 Foxy. In this branch the default is that the pointcloud message is not published. Do you have instructions for enabling it? |
add the following parameter: |
I was able to run with: I see the topic /depth/color/points, when I subscribe to it on rviz2, nothing shows up and I see increased console printouts along the lines of: When I killed the camera node and restarted it, it couldn't find the realsense anymore (when I disconnected/reconnected the cable it was fine again). I attached the console_output and dmesg. I tried more times and got different behavior. I confirmed I can see the camera images in rviz2 even with the initial errors printing. I had another run case where I didn't get the initial hardware errors and subscribed to the pointcloud in rviz without getting the large print messages. Instead I get errors: But I still don't see a pointcloud published in rviz, "ros2 topic hz /depth/color/points" on the device doesn't print anything either, so it seems like no messages are coming through. I confirmed that killing and restarting the camera node work in this run state. Any theories about what might be going on / alternate configurations to try? Thanks for all your help! |
Most of the errors you receive comes from using the RSUSB backend. Where did you get your librealsense2 from? If it was built from source you could try change the CMake flag FORCE_RSUSB_BACKEND to false. |
We build from source, I re-built with:
I am guessing the next step is to apply some of the patches for the uvcvideo module, as described here: https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md. We are running Raspbian Buster (kernel 5.4.51-v7l+), so I am assuming I will need to apply the patches by hand for the relevant files.
For ubuntu, I see:
Which patches should I focus on to get the pointcloud publishing? |
I manually patched the uvcvideo.ko module as described here: I am still not getting a point cloud publishing.
The realsense driver start shows
I see the "No stream match for pointcloud chosen texture" message when I subscribe to the pointcloud from rviz, but I saw on another forum that the error could be ignored. On a separate run, I got errors:
|
I ran some more experiments on a raspberry pi 4 with the patched uvcvideo module powered from the raspberry pi power adapter to eliminate power issues as an error source. I saw in another thread (IntelRealSense/realsense-ros#715) where someone was getting
you mentioned I tried running with
I no longer see the "error has occurred during frame callback", but I still don't get any publishing on the /depth/color/points topic. I also tried with depth enabled, but the two infra off. Some things I see in dmesg
Any suggestions of more things to try to get the point cloud publication? |
For pointcloud with color texture you need both color and depth. You don't need infra1 and infra2.
Assuming you can see in RViz (or other node) the video from both depth and color coming ok, the next think that comes to mind is that maybe it's a synchronization issue. Could you check the time tags? Run |
For the "No stream match for pointcloud chosen texture Process - Color", I was referring to this thread (IntelRealSense/realsense-ros#588) I ran:
I was able to view color and depth stream in rviz. I attached a side by side of the 2 topics echos you requested, the timestamps are not an exact match. |
The timestamps show that the images are published every 110 millisecond (around 9Hz), instead of the expected rate of 30Hz (based on the log you published previously). |
Interestingly, I was randomly testing something else and a single pointcloud publication made it through and displayed on rviz2. I was running without any of the throttling parameters, just filters:=pointcloud. I was also subscribed to the depth and color images. I waved my hand in front of it after the point cloud showed up, but it never updated. The color and depth images were showing my hand moving. I tried topic hz after I saw it and it never published anything. I wasn't able to reproduce after a couple of restarts. |
I made an executable based off of rs-pointcloud just using librealsense2 (I am running headless, so I can't use the example off the shelf.) My code is:
It prints:
Which is about the 9+ Hz rate we were seeing the image frames come in at when we didn't throttle the FPS. I am assuming this implies the device is working properly on my Raspberry Pi setup and the issue is somewhere in the ROS driver implementation? |
I am running the realsense node with a d435 on a Raspberry Pi 4 using the latest OS based on Debian Buster and ROS2 foxy. I am able to view the depth and RGB images on rviz2, but when I subscribe to the pointcloud, the node crashes. I get the following backtrace:
0xb5d5b850 in librealsense::align::create_aligned_profile (this=0xaeb25b64, original_profile=...,
to_profile=...) at /root/librealsense/src/proc/align.cpp:167
167 /root/librealsense/src/proc/align.cpp: No such file or directory.
(gdb) bt
#0 0xb5d5b850 in librealsense::align::create_aligned_profile (this=0xaeb25b64,
original_profile=..., to_profile=...) at /root/librealsense/src/proc/align.cpp:167
#1 0xb5d5bf84 in librealsense::align::allocate_aligned_frame (this=0xaeb25b64, source=...,
from=..., to=...) at /root/librealsense/src/proc/align.cpp:227
#2 0xb5d5c678 in librealsense::align::process_frame (this=0xaeb25b64, source=..., f=...)
at /root/librealsense/src/proc/align.cpp:287
#3 0xb5d922f4 in librealsense::generic_processing_block::<lambda(rs2::frame, const rs2::frame_source&)>::operator()(rs2::frame, const rs2::frame_source &) const (__closure=0xaeb0bfbc, f=...,
source=...) at /root/librealsense/src/proc/synthetic-stream.cpp:75
#4 0xb5d9d728 in rs2::frame_processor_callback<librealsense::generic_processing_block::generic_processing_block(char const*)::<lambda(rs2::frame, const rs2::frame_source&)> >::on_frame(rs2_frame *, rs2_source *) (this=0xaeb0bfb8, f=0xa395e048, source=0xaeb09338)
at /root/librealsense/build/../include/librealsense2/hpp/rs_processing.hpp:128
#5 0xb5d91edc in librealsense::processing_block::invoke (this=0xaeb25b64, f=...)
at /root/librealsense/src/proc/synthetic-stream.cpp:43
#6 0xb5b0e8f8 in rs2_process_frame (block=0xaeb20858, frame=0xa395e048, error=0x9db224a8)
at /root/librealsense/src/rs.cpp:2073
#7 0xb5ac552e in rs2::filter::process(rs2::frame) const ()
from /home/pi/install/lib/librealsense_ros.so
#8 0xb5ae3f4c in realsense::RealSenseD435::publishTopicsCallback(rs2::frame const&) ()
from /home/pi/install/lib/librealsense_ros.so
aligned_profile and aligned_profile->get() are valid pointers, but aligned_profile->get()->profile is a nullptr.
The text was updated successfully, but these errors were encountered: