Ask Your Question
0

[ROS2] rviz crash when visualizing camera image

asked 2020-01-29 06:51:11 -0500

alsora gravatar image

Hi,

I'm running a ROS 2 node that publishes sensor_msgs::msg::Image on the image topic. The image is a greyscale image and I can visualize it without problems using rqt.

However, if I try to visualize it in rviz, I'm able to visualize only few frames (e.g. 1 or 2 seconds at 10hz) before rviz crashes due to the following assertion

rviz2: /tmp/binarydeb/ros-eloquent-rviz-ogre-vendor-7.0.3/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreSceneManager.cpp:1384: virtual void Ogre::SceneManager::_renderScene(Ogre::Camera*, Ogre::Viewport*, bool): Assertion `camVisObjIt != mCamVisibleObjectsMap.end() && "Should never fail to find a visible object bound for a camera, " "did you override SceneManager::createCamera or something?"' failed.

This is an example of an image message

header:
  stamp:
    sec: 1580302089
    nanosec: 820627761
  frame_id: camera
height: 480
width: 640
encoding: mono8
is_bigendian: 0
step: 640
data: [19, 16, 16, 19, 31, 46, 56, 60, 62, 58, 61, 62, 60, 59, 61, 62, 62, 62, 59, 62, 57, 61, 61, 58, 60, 59, 61, 61, 59, 57, 60, 60, 34, 22, 19, 17, 16, 28, 37, 55, 57, 60, 58, 59, 60, 61, 58, 62, 60, 60, 62, 60, 56, 56, 58, 37, 18, 18, 16, 17, '...']

I tried to also publish synchronized sensor_msgs::msg::CameraInfo on the image/camera_info topic, but the result is the same. I'm actually not really sure of what to put in the info message as I don't have any frames or other things in my ROS system, just the camera publisher. Anyhow, this is an example of a camera info message

header:
  stamp:
    sec: 1580301405
    nanosec: 487794112
  frame_id: camera
height: 480
width: 640
distortion_model: ''
d: []
k: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
r: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
p: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
binning_x: 0
binning_y: 0
roi:
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: false
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-01-29 06:57:50 -0500

alsora gravatar image

updated 2020-01-29 06:58:07 -0500

Ok found out it's a known bug on github

https://github.com/ros2/rviz/issues/486

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-01-29 06:51:11 -0500

Seen: 399 times

Last updated: Jan 29 '20