Skip to content
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

Can't not display compressed RGB/Depth in RViz #3111

Closed
pengzhenghao opened this issue May 28, 2024 · 6 comments
Closed

Can't not display compressed RGB/Depth in RViz #3111

pengzhenghao opened this issue May 28, 2024 · 6 comments
Labels

Comments

@pengzhenghao
Copy link

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model D435i
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version Linux (Ubuntu 22)
Kernel Version (Linux Only) (e.g. 5.4)
Platform PC + NVIDIA Jetson
Librealsense SDK Version { 2.. }
Language {C/C#/labview/opencv/pcl/python/unity }
Segment {Robot/Smartphone/VR/AR/others }
ROS Distro {Iron/Humble/Rolling/etc.. }
RealSense ROS Wrapper Version {4.51.1, 4.54.1, etc..}

Issue Description

<Describe your issue / question / feature request / etc..>

Hi, I want to display the compressed RGB stream in RViz and it says:

image

Expecting Camera Info on topic [/camera/depth/image_rect_raw/camera_info]. No CameraInfo received. Topic may not exist.

But I found that the camera info is already there.

image

I can display the video stream with raw, but not compressed. If using raw video stream, the fluency seems to be identical to the image stream. Is there any recommandation way to visualize? Thanks!

@pengzhenghao
Copy link
Author

I just found that when I monitor the FPS with ros2 topic hz xxxx, turn on RViz and render images in real time will greatly reduce the FPS. Sorry for asking some dump questions. Seems like RViz can greatly reduce the FPS? In my understanding RViz is just a consumer why it can reduce the FPS (I am with a high-end PC so let's assume the time spent on rendering is trivial)...

@MartyG-RealSense
Copy link
Collaborator

Hi @pengzhenghao It is not a dumb question at all, so don't worry. :)

Does it make a positive difference to FPS if you set RViz to use compressed data in the 'Create visualization' settings, as described at #1903 (comment)

@pengzhenghao
Copy link
Author

On the problem of dropped FPS

Setup

I have installed D435i in the nvidia Jetson, which is connected to a router. I have a PC which is also connected to the router and can access D435i topics via network. Launch:

ros2 launch realsense2_camera rs_launch.py \
depth_module.profile:=848x480x15 rgb_camera.profile:=848x480x15

Profile the FPS without RVIZ

Here is the profile result, without rviz. I will This result is mainly for measuring the network bandwidth:

  • ros2 topic hz /camera/color/image_raw
    • Jetson: 14.995 HZ
    • PC: 9.586 HZ
  • ros2 topic hz /camera/depth/image_rect_raw
    • Jetson: 14.983 HZ
    • PC: 14.370 HZ

The above results shows the RGB images might fails to be transported to the PC (maybe because it use 3 channels to represent colors vs 1 channel for depth).

So let's use compression:

  • ros2 topic hz /camera/color/image_raw
    • PC: 9.587 HZ
  • ros2 topic hz /camera/color/image_raw/compressed
    • PC: 14.995 HZ

So using compressed RGB images will not make the network becomes bottleneck.

What happen when using RViz?

After launching RViz and monitoring /camera/depth/image_rect_raw and /camera/color/image_raw (without compression!), the FPS from:

  • ros2 topic hz /camera/color/image_raw/compressed
    • PC: 14.995 HZ

To:

  • ros2 topic hz /camera/color/image_raw/compressed
    • PC: 3.967 HZ

Shown here:

image

The reasong I am monitoring /camera/color/image_raw instead of /camera/color/image_raw/compressed is because the compressed version can not be displayed as indicated in this issue.

On the problem of using RViz visualize compressed images

As you suggested if you set RViz to use compressed data in the 'Create visualization' settings, I try to do it.

First, I found that there is no compressed option available for /camera/color/image_raw/Image, it is only available for /camera/color/image_raw/Camera:

image

Second, if I create the pannel for /camera/color/image_raw/Camera (compressed) as:
image

it shows nothing:
image

The error message indicates the camera_info is not properly read by RViz.

@MartyG-RealSense
Copy link
Collaborator

As you are using a router and a network connection, are you using wireless wi-fi communication instead of a wired connection to the router?

If you are on wi-fi, IntelRealSense/librealsense#10730 (comment) has advice. It also refers to how nearby wireless devices such as a wireless mouse can negatively impact performance.

@MartyG-RealSense
Copy link
Collaborator

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

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants