lucasw / rviz_camera_stream

Custom rviz camera plugin that published rendered camera video stream
BSD 3-Clause "New" or "Revised" License
59 stars 47 forks source link

Segmentation Fault while adding image topic in RVIZ CameraPub #53

Open sh4rdrv opened 11 months ago

sh4rdrv commented 11 months ago

With the /camera_info topic set in RVIZ, I get a Segmentation Fault as soon as I add the image topic in RVIZ. Running RVIZ version 1.14.20 (noetic) compiled against Qt version 5.

Running with gdb shows the following: Thread 1 "rviz" received signal SIGSEGV, Segmentation fault.

lucasw commented 11 months ago

What does the camera_info contain? Can you rostopic echo -n 1 your camera info and paste the text here, or make a very short rosbag recording of it?

sh4rdrv commented 11 months ago

Here's a screen grab, and an Seg fault sample.

rostopic echo /camera_info -n 1 header: seq: 86 stamp: secs: 0 nsecs: 0 frame_id: "camera1" height: 480 width: 640 distortion_model: "plumb_bob" D: [0.0] K: [500.0, 0.0, 320.0, 0.0, 500.0, 240.0, 0.0, 0.0, 1.0] R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] P: [500.0, 0.0, 320.0, 0.0, 0.0, 500.0, 240.0, 0.0, 0.0, 0.0, 1.0, 0.0] binning_x: 0 binning_y: 0 roi: x_offset: 0 y_offset: 0 height: 480 width: 640 do_rectify: False

Screenshot from 2023-12-18 11-09-03

lucasw commented 11 months ago

Does the demo work- it looks like your camera info is the same as what the demo generates, but you've changed namespaces?

roslaunch rviz_camera_stream demo.launch

I just tried it out locally (ros & rviz built from source on Ubuntu 23.10) and it works okay, I tried changing image and input info topics.

Is there a good tf connection between map and camera1? Use the rviz tf plugin to view them there.

What are the first few lines of output after you launch rviz? I get these:

[I] [1702948630.998 ${node} ...iz/src/rviz/visualizer_app.cpp:114]: rviz version 1.14.20
[I] [1702948630.998 ${node} ...iz/src/rviz/visualizer_app.cpp:115]: compiled against Qt version 5.15.10
[I] [1702948630.998 ${node} ...iz/src/rviz/visualizer_app.cpp:116]: compiled against OGRE version 1.12.10 (Rhagorthua)
[I] [1702948631.004 /rviz_1702948630998006575 ...ogre_helpers/render_system.cpp:88]: Forcing OpenGl version 0.
[I] [1702948631.533 /rviz_1702948630998006575 ...ogre_helpers/render_system.cpp:475]: Stereo is NOT SUPPORTED
[I] [1702948631.533 /rviz_1702948630998006575 ...ogre_helpers/render_system.cpp:185]: OpenGL device: ...