-
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
Incredibly slow with librealsense 2.45, realsense_ros 2.3.0 #1903
Comments
Hi @bibbygoodwin Let's focus on the RealSense Viewer performance first. Could you try disabling the Viewer's two GLSL options in its Settings interface please using the instructions in the link below to see whether doing so speeds up your computer. |
Hello, |
Hi @hardesh Do you also experience a CPU usage increase in the RealSense Viewer like @bibbygoodwin does, please? |
Hi @MartyG-RealSense, |
Thanks very much for the information @hardesh |
Hi @hardesh Do you have an update about this case that you can provide, please? Thanks! |
Hi @MartyG-RealSense, |
No problem at all @hardesh - I will keep this case open for a further time period. Thanks for the update! |
Hi, I have a similar issue here. My SW setup is:
My hardware is:
My issue: I am wondering if this is normal or if I am doing something wrong here. I also tried (with no improvement):
Any suggestion would be very much appreciated. Cheers! |
Hi @Giggus Could you try the alternative launch instruction below please for rs_camera.launch, which should generate an ordered pointcloud like rs_rgbd does. Does this instruction provide any improvement in CPU usage? roslaunch realsense2_camera rs_camera.launch filters:=colorizer,pointcloud align_depth:=true pointcloud_texture_stream:=RS2_STREAM_COLOR ordered_pc:=true |
Hi @MartyG-RealSense thanks for the quick reply. By running your command I get CPU usage up to 140% for realsense2_camera_manager and 130% for rviz P.s. I am using a L515 camera (I don't know if it does make a difference) |
Use of the L515 model should not make a difference with ROS. A standard first step though in diagnosing problems related to L515 is to unplug the USB cable from the base of the camera (not from the computer end), turn it around in the opposite orientation and re-insert it (USB-C cables are two-way insertion at the micro-sized end). Is CPU usage the same afterwards? |
If I plugged it reversed I can only get very low resolution streams (i.e. depth only at 320x240) - so I always plug in the orientation that gives me access to high resolution rgb and depth streams. Any other hints on what could it be causing this high CPU usage? |
Okay, you had the micro-sized end in the appropriate orientation already then if you could only access 320x240 when rotating the connector. Thanks very much. Does the L515's outer casing feel hot to the touch after the camera has been running for a few minutes? |
Yes it does why? |
Rapid overheating can indicate that there is an electrical problem with the USB system that is heating up the camera. This may be caused by a bad USB cable or a glitch on the USB port that the camera is plugged into. |
what I observe is sometimes the full camera just stopping to work and then come back live. Do you think the heating is related to the high CPU usage? |
It is certainly abnormal that the camera casing is hot to the touch after only a few minutes of streaming. Could you launch the camera in the RealSense Viewer, enable the depth stream and observe the temperatures (shown as yellow bars) in the Controls section of the 'L500 Depth Sensor' side-panel options and see what the temperature is after a few minutes? |
Thank you. The internal temperatures are on the high side but not extremely so. Do you have an alternative USB 3.2 port that you can try the camera in on the laptop? My understanding is that if there is an electrical overheating issue on a port then it affects devices with a high power draw (e.g external disk drives) rather than simple devices such as keyboard and mouse. |
I already tested the device on all usb 3.2 ports and nothings changes |
I located a case in which similarly high processor usage such as 113% was occuring on a gaming laptop, whilst usage on a different desktop PC was less than 30%. Curiously, usage was 41% when simply reading the topic with rostopic echo, but shot up to 113% when RViz was being used. |
Thanks for the link.. It seems to be exactly the same issue I have. |
Hi @MartyG-RealSense, after installing If I subscribe to the pointcloud the CPU jumps back to crazy values Might it be because a transport package for the pointcloud is required? |
Hi @Giggus It's excellent to hear that you made positive progress. image_transport is associated with transmission of compressed data and is not required by default for pointcloud generation. |
I made some progress but using pointcloud is still not possible with such CPU consumption. I am trying to understand where such high CPU usage comes from.. |
A RealSense ROS user in the link below had similarly high CPU usage with pointcloud and reduced it significantly by applying a Decimation Filter, at the cost of a reduction in resolution. |
Thanks @MartyG-RealSense. I tried but didn't see any difference. Do you think that decimation filter does actually apply also to the L515 camera (since depth is obtained by the embedded Lidar rather than from stereo cameras)? |
Although the Decimation filter does not appear in the list of depth post-processing filters in my RealSense Viewer, i did confirm that the rs-post-processing C++ SDK example program could access and control decimation of the depth image with an L515. The images below show an L515 image with the Decimation filter's Filter Magnitude setting set to '2' (upper image) and '4' (lower image). |
Hi @MartyG-RealSense , thanks for the reply!! For the moment the only solution I found to reduce the CPU usage is to reduce the color_fps to 6 (I can't decrease the depth_fps with the L515 apparently). Cheers! |
Thanks very much @Giggus - yes, depth and infrared FPS is fixed at 30 on the L515. |
Hi @Giggus Do you require further assistance with your question above, please? Thanks! |
Hi @MartyG-RealSense, thanks for your assistance. For the moment I "solved" the problem by reducing the color frame rate to 6 fps (consequently the point cloud rate reduces as well). This result is not optimal since the same script loads the CPU a third on a different PC. So I do think there is still a problem (maybe PC related). But at least with current configs I can keep working with some CPU resources still available. Cheers! |
You are very welcome, @Giggus |
@hardesh You also had problems on this case - is your problem now resolved, please? Thanks! |
Hi @MartyG-RealSense, sorry i haven't tried installing librealsense 2.45. v2.42 with realsense-ros 2.2.22 is giving us good results, so we're sticking to that |
Okay @hardesh thanks - as long as you are satisfied with your current setup with librealsense 2.42.0 and wrapper 2.2.22 then that's totally fine. |
As everyone is satisifed with their outcomes, I will close the case. You are welcome to add further comments after closure if you have additional enquiries abut the topics covered in this dscussion. Thanks again! |
Hi,
As this is my first realsense installation, I have no frame of reference, but launching
rs_rgbd.launch
orrs_camera.launch
cause ~140% CPU usage by nodelet, and present frames at ~2fps in RViz. The entire computer (8-core 2.9GHz, 16GB ram) becomes almost unusable.I'm on librealsense 2.45, realsense_ros 2.3.0, using a D435i. I installed with:
This seems to be a problem reported by others e.g. at #1887
I have tried switching off as much processing in the launchfiles as I can, but this doesn't seem to change anything
realsense-viewer
uses ~95% CPU with just the stereo module on, and frame drops are around 65% there.The text was updated successfully, but these errors were encountered: