Ask Your Question
0

RViz segfaults upon receiving mesh marker

asked 2015-02-09 23:41:43 -0600

Bidski gravatar image

I am running RViz and a custom plugin inside of rqt and I am trying to publish an STL mesh marker from my custom plugin and have RViz display it. The following is the message that I send to RViz (captured using rostopic echo)

header: 
  seq: 0
  stamp: 
    secs: 0
    nsecs: 0
  frame_id: /base_link
ns: model_mesh
id: 0
type: 10
action: 0
pose: 
  position: 
    x: 0.0
    y: 0.0
    z: 0.0
  orientation: 
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0
scale: 
  x: 1.0
  y: 1.0
  z: 1.0
color: 
  r: 0.0
  g: 1.0
  b: 0.0
  a: 1.0
lifetime: 
  secs: 0
  nsecs: 0
frame_locked: False
points: []
colors: []
text: ''
mesh_resource: file:///home/bid019/models/CAD/exerciseBall.STL
mesh_use_embedded_materials: False

Whenever this message is sent RViz crashes. The following stack trace was obtained from gdb.

#0  0x00007fff9c4b0834 in ogre_tools::STLLoader::load(unsigned char*) () from /opt/ros/indigo/lib/librviz.so
#1  0x00007fff9c4937d8 in rviz::loadMeshFromResource(std::string const&) () from /opt/ros/indigo/lib/librviz.so
#2  0x00007fff8e443134 in rviz::MeshResourceMarker::onNewMessage(boost::shared_ptr<visualization_msgs::Marker_<std::allocator<void> > const> const&, boost::shared_ptr<visualization_msgs::Marker_<std::allocator<void> > const> const&) () from /opt/ros/indigo/lib/libdefault_plugin.so
#3  0x00007fff8e441a2f in rviz::MarkerBase::setMessage(boost::shared_ptr<visualization_msgs::Marker_<std::allocator<void> > const> const&) () from /opt/ros/indigo/lib/libdefault_plugin.so
#4  0x00007fff8e431e9b in rviz::MarkerDisplay::processAdd(boost::shared_ptr<visualization_msgs::Marker_<std::allocator<void> > const> const&) () from /opt/ros/indigo/lib/libdefault_plugin.so
#5  0x00007fff8e432513 in rviz::MarkerDisplay::processMessage(boost::shared_ptr<visualization_msgs::Marker_<std::allocator<void> > const> const&) () from /opt/ros/indigo/lib/libdefault_plugin.so
#6  0x00007fff8e4326bb in rviz::MarkerDisplay::update(float, float) () from /opt/ros/indigo/lib/libdefault_plugin.so
#7  0x00007fff9c467ff2 in rviz::DisplayGroup::update(float, float) () from /opt/ros/indigo/lib/librviz.so
#8  0x00007fff9c50857e in rviz::VisualizationManager::onUpdate() () from /opt/ros/indigo/lib/librviz.so
#9  0x00007ffff276887a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007ffff276ca31 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#11 0x00007ffff0bc7e2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#12 0x00007ffff0bce4a0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#13 0x00007ffff1bf2186 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#14 0x00007ffff27544dd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#15 0x00007ffff2784323 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#16 0x00007ffff2781629 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#17 0x00007ffff4233e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff4234048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff42340ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff27817a1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#21 0x00007ffff0c69bb6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007ffff27530af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#23 0x00007ffff27533a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-02-10 15:48:49 -0600

Bidski gravatar image

Ok, I figured out the cause of the segfault.

RViz only supports binary STL files and I was using ASCII STL files.

Perhaps RViz should be updated so that it detects and then cleanly rejects (or even better, to actually handle) ASCII STL files rather than segfaulting?

edit flag offensive delete link more

Comments

1

Perhaps submit this as a feature request to the rviz issue tracker?

gvdhoorn gravatar imagegvdhoorn ( 2015-02-12 02:50:00 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-02-09 23:41:43 -0600

Seen: 234 times

Last updated: Feb 10 '15