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

Realsense2 doesn't show image in rviz2 #2112

Closed
dennyvt opened this issue Oct 11, 2021 · 8 comments
Closed

Realsense2 doesn't show image in rviz2 #2112

dennyvt opened this issue Oct 11, 2021 · 8 comments
Labels

Comments

@dennyvt
Copy link

dennyvt commented Oct 11, 2021

hello i am running ubuntu20.04 with ROS2 foxy
with Intel RealSense D435
when launching

ros2 launch realsense2_camera rs_launch.py

and running

ros2 topic echo /camera/color/image_raw 

it shows me that it is receiving data:
a small example of the data:

header:
stamp:
sec: 1633950418
nanosec: 576558848
frame_id: camera_color_optical_frame
height: 480
width: 640
encoding: rgb8
is_bigendian: 0
step: 1920
data:

  • 90
  • 81
  • 76
  • 90
  • 81
  • 76
  • 92
  • 81
  • 76
  • 89
  • 78
  • 73
  • 80
  • 81
    but when opening rviz it doesn't show me images.
    image
    anyone else have this problem or can help me fix that problem?
    thanks in advance!
@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 11, 2021

Hi @dennyvt I see from your message title that you are using RViz2. Can you confirm please that you launched it using ros2 run rviz2 rviz2

@dennyvt
Copy link
Author

dennyvt commented Oct 11, 2021

Hi @MartyG-RealSense
thanks for your reply. i normally launch it just like:

rviz2

but when launching it with the command you were advising, i still get the same. received data in the terminal but still no image showing in rviz2.
So i tried your command and can confirm that i launched it using

ros2 run rviz2 rviz2

@MartyG-RealSense
Copy link
Collaborator

Do you get an image if you set Fixed Frame to camera_link instead of camera_color_optical_frame

@dennyvt
Copy link
Author

dennyvt commented Oct 11, 2021

if i set fixed frame to camera_link
and add image on rviz2 with topic /camera/color/image_raw
i still do not get an image unfortunately

@MartyG-RealSense
Copy link
Collaborator

There was another case in #1970 of a RealSense ROS user who could not obain images in RViz2 when using the ROS2 Foxy wrapper and camera_color_optical_frame. In that particular case, they ended up changing to the ROS1 wrapper and Noetic instead.

Which librealsense SDK version and ROS2 wrapper version are you uaing, please?

@dennyvt
Copy link
Author

dennyvt commented Oct 12, 2021

my bad i did not saw that other case.
In my case ROS2 is what i have to work with.
I am using librealsense 2.48.0 (Built with LibRealSense v2.48.0)
and ROS2 wrapper I cloned the ROS2 branch. (RealSense ROS v3.2.2)

@dennyvt
Copy link
Author

dennyvt commented Oct 12, 2021

i just fixed it.
I saw this issue on Rviz git page ros2/rviz#782
it is a bug in foxy release 6.
Removing foxy release 6 en installing foxy release 5 did the job for me.
thanks for your help.

@dennyvt dennyvt closed this as completed Oct 12, 2021
@MartyG-RealSense
Copy link
Collaborator

That's excellent news that you found a solution, @dennyvt - thanks very much for the update!

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