Rosanswers logo

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)

  seq: 0
    secs: 0
    nsecs: 0
  frame_id: /base_link
ns: model_mesh
id: 0
type: 10
action: 0
    x: 0.0
    y: 0.0
    z: 0.0
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0
  x: 1.0
  y: 1.0
  z: 1.0
  r: 0.0
  g: 1.0
  b: 0.0
  a: 1.0
  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/lib/x86_64-linux-gnu/libQtCore.so.4
#24 0x00007ffff2758b79 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#25 0x00007ffff1bae1f0 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#26 0x000000000052c6d5 in PyEval_EvalFrameEx ()
#27 0x000000000055c594 in PyEval_EvalCodeEx ()
#28 0x000000000052ca8d in PyEval_EvalFrameEx ()
#29 0x000000000055c594 in PyEval_EvalCodeEx ()
#30 0x000000000052ca8d in PyEval_EvalFrameEx ()
#31 0x000000000055c594 in PyEval_EvalCodeEx ()
#32 0x00000000005b7392 in PyEval_EvalCode ()
#33 0x0000000000469663 in ?? ()
#34 0x00000000004699e3 in PyRun_FileExFlags ()
#35 0x0000000000469f1c in PyRun_SimpleFileExFlags ()
#36 0x000000000046ab81 in Py_Main ()
#37 0x00007ffff7817ec5 in __libc_start_main (main=0x46ac3f <main>, argc=2, argv=0x7fffffffdb48, init=<optimised out>, fini=<optimised out>, rtld_fini=<optimised out>, stack_end=0x7fffffffdb38) at libc-start.c:287
#38 0x000000000057497e in _start ()

I also tried to have RViz running by itself and my plugin running in rqt, but this error still occurs. Can anyone tell me what is causing this error?

I am running Ubuntu 14.04 with the latest packages from apt-get. Here is the STL file that is causing me problems (other meshes cause issues as well) STL file And here is the RViz config file that I am using. This also has a MarkerArray and a PointCloud2 display set up, but at the moment no messages are being published to those displays.

Originally posted by Bidski on ROS Answers with karma: 96 on 2015-02-10

Post score: 0


1 Answer 1


Rosanswers logo

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?

Originally posted by Bidski with karma: 96 on 2015-02-10

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by gvdhoorn on 2015-02-12:
Perhaps submit this as a feature request to the rviz issue tracker?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.