-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/camera/color/image_raw topic not publishing messages when pointcloud is enabled #1962
Comments
Also on this specific image that I have on the SD card However, we can still confirm the camera works through ROS wrapper when running: And the point cloud messages are being published when running: But when running: No camera images are being published at from the /camera/color/image_raw topic. |
Hi @Nick-Kou Could you try using RS2_STREAM_COLOR instead of RS2_STREAM_ANY please and check whether doing so makes a positive difference? |
#1938 (comment). With RS2_STREAM_COLOR the same issue 1938 persists where there is no pointcloud in rviz and the color transformation options are blank. |
The RealSense ROS wrapper's documentation states that using the pointcloud filter should cause a topic called /camera/depth/color/points to be added. Are you able to obtain any data from that topic if you perform a rostopic echo of it or add it in RViz? |
After running: A [ WARN] [1625357506.310201328]: No stream match for pointcloud chosen texture Process - Color was shown in the output summary as shown below towards the end of the log: ubuntu@ubuntu:~$ roslaunch realsense2_camera rs_camera.launch camera:=camera1 filters:=pointcloud depth_width:=424 color_width:=424 depth_height:=240 color_height:=240 depth_fps:=30 color_fps:=30 pointcloud_texture_stream:=RS2_STREAM_COLOR started roslaunch server http://192.168.2.144:36579/ SUMMARYPARAMETERS
NODES ROS_MASTER_URI=http://192.168.2.64:11311 process[camera1/realsense2_camera_manager-1]: started with pid [2586] [ INFO] [1625357491.534924420]: Device with physical ID 1-1.2-7 was found. The Camera was initially publishing image in rviz but then as I was waving my hand in in front of it, the frame eventually froze and a Status: No image frame received showed up in rviz as shown in the image below. The message is shown in yellow on the left panel underneath the "Image" drop down section in rviz : As for the pointcloud2 message there isn't any warning other than the one " [WARN] [1625357506.310201328]: No stream match for pointcloud chosen texture Process - Color " shown in the summary which I am not sure if it effects anything. rostopic echo /camera1/depth/color/points shown in the image below shows no PointCloud2 messages are being published.
in the camera:=camera1 parameter which also shouldn't have any effect. |
So in summary, when you launch with roslaunch realsense2_camera rs_camera.launch then the /camera/color/image_raw topic is published correctly. But the /camera/color/image_raw topic is not published when you perform a pointcloud-equipped launch with the roslaunch instruction below: roslaunch realsense2_camera rs_camera.launch filters:=pointcloud depth_width:=424 color_width:=424 depth_height:=240 color_height:=240 depth_fps:=15 color_fps:=15 pointcloud_texture_stream:=RS2_STREAM_ANY However, pointcloud2 messages are publishing correctly. Going through the launch log, I note that the launch decided that setting depth to 424x240 at 30 FPS was invalid and instead set it to 640x480 at 15 FPS (whilst color remained at the 424x240 set by the custom-resolution roslaunch instruction). So you now had a mismatch of both resolution and FPS between depth and color. This was likely caused because the camera is on a USB 2 connection due to the use of a Raspberry Pi 3B+ (Pi models before Pi 4 only had USB 2 instead of USB 3). RealSense cameras on a USB 2 connection have a limited range of supported resolution and FPS modes compared to the full range of capabilities on a USB 3 connection. This is described in Intel's document about USB 2 operation at the link below. https://www.intelrealsense.com/usb2-support-for-intel-realsense-technology/ The list of depth and color resolution and FPS modes currently supported on USB 2 with a D435i at the time of writing this is shown in the image below, which illustrates that whilst 424x240 color is supported, 424x240 depth is not. I would therefore suggest trying a roslaunch with both color and depth set to 640x480 at 30 FPS. |
A common factor that I identified between this case and two other cases that had no Color Transformer options available was that they were on computing boards with Arm processors (your one on Pi 3B+, and the other two on Nvidia Jetson Xavier NX). |
Posted this on #1967 as well since these seem to be related: I've encountered this same issue with a D415 on a RPI 4; I'm able to view the depth image but the RGB image and color point clouds do not get published. Inspecting the /camera/color/image_raw and /camera/depth/color/points topics shows nothing being published on either topic. This issue showed up recently, so I reverted to a manually-built earlier version of librealsense and realsense-ros which fixed the issue. Maybe there's a regression or incompatibility with the recent libraries on ARM? I reverted to v2.41.0 of librealsense, and version 2.2.21 of realsense-ros and rebuilt from git on the Raspberry Pi. This combination does not exhibit this issue. There's likely some issue with the resolution/bit depth, USB type, etc. since I'm getting the same warning messages as others above, but the camera still works with no configuration changes on the older version of the software libraries. |
@MartyG-RealSense Thanks for the response. However, I will only be in the lab on Saturday again to try this. |
@Nick-Kou Yeah, it certainly takes a while, about ~1hr for me on a RPi 4B, but that seems typical for a large project. You could probably reduce the compile time by not compiling any of the examples/tools. Make sure you're using a decent SD card, good power supply, sufficient cooling, just to eliminate any potential throttling. I just left the compilation running in the background and came back later :) |
Thanks again for your advice @chrisdalke :) @Nick-Kou I look forward to your update about your lab results after Saturday. Good luck! |
After setting 640x480 and 30fps for each I obtain the following summary: roslaunch realsense2_camera rs_camera.launch camera:=camera1 filters:=pointcloud depth_width:=640 color_width:=640 depth_height:=480 color_height:=480 depth_fps:=30 color_fps:=30 pointcloud_texture_stream:=RS2_STREAM_ANY started roslaunch server http://192.168.0.113:45327/ SUMMARYPARAMETERS
NODES ROS_MASTER_URI=http://192.168.0.107:11311 process[camera1/realsense2_camera_manager-1]: started with pid [2248] [ INFO] [1625954844.738227467]: Device with physical ID 1-1.3-6 was found. Point Cloud Message appears in rviz however image_raw topic is still not received, however, the image_rect_raw topic is received. |
After trying the same except the RS2_STREAM_COLOR, the pointcloud message status is fine however is not displaying anything in rviz as mentioned before. Also the color/image_raw topic is still not being received as shown in the left panel of rviz. started roslaunch server http://192.168.0.113:37785/ SUMMARYPARAMETERS
NODES ROS_MASTER_URI=http://192.168.0.107:11311 process[camera1/realsense2_camera_manager-1]: started with pid [2456] [ INFO] [1625956241.779675219]: Device with physical ID 1-1.3-6 was found. |
I guess I should give @chrisdalke's suggestion a shot as it seemed to have worked for him. Thanks for all the suggestions @MartyG-RealSense @chrisdalke |
You are very welcome @Nick-Kou - good luck, and please do let us know how it turns out! |
Hey. I have a similar issue. I have a Raspi4, running Ubuntu 20.04, kernel 5.4 connected to a D435 via USB3. ROS distribution: noetic I'm running the following command When doing so, I am able to stream in RVIZ the pointclouds, but they don't have color. In addition, streaming /camera1/color/image_raw in RVIZ shows the image for 2-3 seconds, then it freezes, and the output of the command line prints: I have tried to downgrade to 15 fps for the color, but nothing changed. Also, sometimes, this printout appears, although I am not sure the issues are related: I then tried to run the command with pointcloud_texture_stream:=RS2_STREAM_COLOR:
Then, the pointclouds are not published at all and the following warning appears: I guess I could downgrade to an earlier version @chrisdalke suggested, but it will be great if this issue can be fixed for the latest updates and versions. |
Hi @lupusorina Under the PointCloud2 options in RViz, do you have any Color Transformer options available or are they absent like they were for @Nick-Kou please? If the temperature can be read normally most of the time and the Asic Temperature value is not valid! warning only appears sometimes then it is likely just a timing hiccup where the camera was not ready to respond at that particular instance when the temperature was being polled. You can monitor Asic, Projector and Motion Module temperatures using the /diagnostics topic of the RealSense ROS wrapper. |
Hi @Nick-Kou and @lupusorina Do either of you require further assistance with this case, please? Thanks! |
Hi @MartyG-RealSense I didn't really get a chance to try the older libraries, but I assume they should work. Thanks for all the assistance. |
@MartyG-RealSense I do not have any Color Transformer, as well. I tried the same setup using a Jetson Nano. It seems that with the RS2_STREAM_COLOR, the pointclouds are not published, but with RS2_STREAM_ANY, they are black and white, as they were on the Raspberry Pi. So same thing happens. The librealsense is OK because I tried the pointcloud example, which works. Thank you! |
Hi @lupusorina In another case on Jetson where there were no Color Transformer options available, Doronhi the RealSense ROs wrapper developer commented "The issue definitely seems related to the fact that no color images reach realsense2_camera driver". In a comment directly below the linked-to one above, a RealSense ROS user who was a Raspberry Pi user (which has an Arm processor like Jetson boards do) said that they had the same problem and solved it by manually building the earlier 2.41.0 version of librealsense and the matching 2.2.21 version of the RealSense ROS wrapper. |
@MartyG-RealSense the latest driver librealsense definitely outputs colored pointclouds. I tried to run on the Jetson nano
See the output below: So I guess the issue is on the ros driver. |
Hi @lupusorina Do you still require assistance with the problem above, please? Thanks! |
@MartyG-RealSense thank you for your help. I think the problem was not solved yet. My workaround was to use a Jetson Nano and try to use the black and white pointclouds, but it will be great if the RGB would work. "building the earlier 2.41.0 version of librealsense and the matching 2.2.21 version of the RealSense ROS wrapper" didn't really work for me, but I can try more. |
Thanks very much @lupusorina for the update - please do post the results of further tests here. Good luck! |
Hi @lupusorina Do you have an update about this case that you can provide, please? Thanks! |
Case closed due to no further comments received. |
I have a similar problem, but in sitl. /fastplanner_ws$ rostopic info camera/depth/image_raw Type: sensor_msgs/Image Publishers: None Subscribers:
no data in rviz, how to resolve it. |
For the current project I am working on I am using a Raspberry Pi 3B+ with the Ros Noetic Image taken from: https://emanual.robotis.com/docs/en/platform/turtlebot3/sbc_setup/
Details are:
After successfully the SDK:
And then:
sudo apt-get install ros-$ROS_DISTRO-realsense2-camera
I managed to operate the Intel Realsense D435i camera.
When I do a simple launch:
roslaunch realsense2_camera rs_camera.launch
The /camera/color/image_raw topic seems to be publishing fine at the desired FPS shown in rviz.
However, when I to run with point cloud enabled for example:
roslaunch realsense2_camera rs_camera.launch filters:=pointcloud depth_width:=424 color_width:=424 depth_height:=240 color_height:=240 depth_fps:=15 color_fps:=15 pointcloud_texture_stream:=RS2_STREAM_ANY
The pointcloud2 messages are being published, however, the /camera/color/image_raw topic doesn't seem to be publishing anymore as shown in the image below
I was wondering why the topics (point cloud and camera image) can't be published together.
roslaunch realsense2_camera rs_camera.launch filters:=pointcloud depth_width:=424 color_width:=424 depth_height:=240 color_height:=240 depth_fps:=15 color_fps:=15 pointcloud_texture_stream:=RS2_STREAM_ANY
... logging to /home/ubuntu/.ros/log/de7d655e-da4a-11eb-9870-b92bd22f468a/roslaunch-ubuntu-3539.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://192.168.2.144:41675/
SUMMARY
PARAMETERS
NODES
/camera/
realsense2_camera (nodelet/nodelet)
realsense2_camera_manager (nodelet/nodelet)
ROS_MASTER_URI=http://192.168.2.64:11311
process[camera/realsense2_camera_manager-1]: started with pid [3548]
process[camera/realsense2_camera-2]: started with pid [3549]
[ INFO] [1625130099.784038928]: Initializing nodelet with 4 worker threads.
[ INFO] [1625130100.359931146]: RealSense ROS v2.3.0
[ INFO] [1625130100.360102500]: Built with LibRealSense v2.45.0
[ INFO] [1625130100.360197344]: Running with LibRealSense v2.45.0
[ INFO] [1625130100.459219170]:
[ INFO] [1625130100.777955941]: Device with serial number 102122071816 was found.
[ INFO] [1625130100.778154274]: Device with physical ID 1-1.3-6 was found.
[ INFO] [1625130100.778241930]: Device with name Intel RealSense D435I was found.
[ INFO] [1625130100.781179064]: Device with port number 1-1.3 was found.
[ INFO] [1625130100.781414845]: Device USB type: 2.1
[ WARN] [1625130100.781563908]: Device 102122071816 is connected using a 2.1 port. Reduced performance is expected.
[ INFO] [1625130100.789421612]: getParameters...
[ INFO] [1625130101.092074328]: setupDevice...
[ INFO] [1625130101.092231307]: JSON file is not provided
[ INFO] [1625130101.092343442]: ROS Node Namespace: camera
[ INFO] [1625130101.092432505]: Device Name: Intel RealSense D435I
[ INFO] [1625130101.092510942]: Device Serial No: 102122071816
[ INFO] [1625130101.092587765]: Device physical port: 1-1.3-6
[ INFO] [1625130101.092663130]: Device FW version: 05.12.14.50
[ INFO] [1625130101.092739328]: Device Product ID: 0x0B3A
[ INFO] [1625130101.092820630]: Enable PointCloud: On
[ INFO] [1625130101.092896880]: Align Depth: Off
[ INFO] [1625130101.092969588]: Sync Mode: On
[ INFO] [1625130101.093232452]: Device Sensors:
[ INFO] [1625130101.127821758]: Stereo Module was found.
[ INFO] [1625130101.154911016]: RGB Camera was found.
[ INFO] [1625130101.155694713]: Motion Module was found.
[ INFO] [1625130101.155912890]: (Confidence, 0) sensor isn't supported by current device! -- Skipping...
[ INFO] [1625130101.156086640]: Add Filter: pointcloud
[ INFO] [1625130101.159371014]: num_filters: 1
[ INFO] [1625130101.159627420]: Setting Dynamic reconfig parameters.
[ WARN] [1625130101.620750058]: Param '/camera/stereo_module/auto_exposure_limit' has value 0 that is not in range [1, 165000]. Removing this parameter from dynamic reconfigure options.
[ WARN] [1625130101.634526926]: Param '/camera/stereo_module/auto_gain_limit' has value 0 that is not in range [16, 248]. Removing this parameter from dynamic reconfigure options.
[ INFO] [1625130101.816659754]: Done Setting Dynamic reconfig parameters.
[ WARN] [1625130101.817328555]: Given stream configuration is not supported by the device! Stream: Depth, Stream Index: 0, Width: 424, Height: 240, FPS: 15, Format: Z16
[ WARN] [1625130101.817485482]: Using default profile instead.
[ INFO] [1625130101.819077929]: depth stream is enabled - width: 640, height: 480, fps: 15, Format: Z16
[ INFO] [1625130101.820159023]: color stream is enabled - width: 424, height: 240, fps: 15, Format: RGB8
[ INFO] [1625130101.820398970]: setupPublishers...
[ INFO] [1625130101.830058862]: Expected frequency for depth = 15.00000
[ INFO] [1625130101.845519062]: Expected frequency for color = 15.00000
[ INFO] [1625130101.854709735]: setupStreams...
[ INFO] [1625130101.866893531]: insert Depth to Stereo Module
[ INFO] [1625130101.867145093]: insert Color to RGB Camera
01/07 09:01:41,988 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
[ INFO] [1625130102.039215582]: SELECTED BASE:Depth, 0
[ INFO] [1625130102.087559152]: RealSense Node Is Up!
[ WARN] [1625130102.228498353]:
01/07 09:01:42,230 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,280 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,331 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,381 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,432 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,483 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,533 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,585 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,636 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,686 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,737 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,788 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,838 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,889 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,940 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:42,990 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:43,041 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:43,092 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:43,142 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
01/07 09:01:43,193 WARNING [281472158134640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
^C[camera/realsense2_camera-2] killing on exit
[camera/realsense2_camera_manager-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
The text was updated successfully, but these errors were encountered: