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

free_gait_rviz_plugin: Skip stance display if no foot is in ground contact. #39

Merged
merged 1 commit into from
Aug 3, 2017

Conversation

remod
Copy link
Contributor

@remod remod commented Aug 3, 2017

When no foot is in ground contact a stance marker was created containing no polygons. This lead to a crash of the plugin (and therefore rviz) as soon as the marker was destroyed (see gdb output). This fix prohibits the creation of an empty stance marker and solves the issue.

(gdb)

#0  0x00007ffff69e0428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff69e202a in __GI_abort () at abort.c:89
#2  0x00007ffff701a84d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff70186b6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff70176a9 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff7018005 in __gxx_personality_v0 () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff6d84f83 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#7  0x00007ffff6d852eb in _Unwind_RaiseException () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#8  0x00007ffff701890c in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x00007ffff3b7ea16 in Ogre::SceneManager::destroyMovableObject(Ogre::MovableObject*) ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#10 0x00007fffa439280f in rviz::TriangleListMarker::~TriangleListMarker() () from /opt/ros/kinetic/lib/librviz_default_plugin.so
#11 0x00007fffa43928d9 in rviz::TriangleListMarker::~TriangleListMarker() () from /opt/ros/kinetic/lib/librviz_default_plugin.so
#12 0x00007fff79f6e8e6 in free_gait_rviz_plugin::FreeGaitPreviewVisual::hideStances() ()
   from /home/remod/projects/anymal/catkin_ws/devel/lib//libfree_gait_rviz_plugin.so
#13 0x00007fff79f700a0 in free_gait_rviz_plugin::FreeGaitPreviewVisual::update() ()
   from /home/remod/projects/anymal/catkin_ws/devel/lib//libfree_gait_rviz_plugin.so
#14 0x00007fff79f4802a in free_gait_rviz_plugin::FreeGaitPreviewDisplay::update(float, float) ()
   from /home/remod/projects/anymal/catkin_ws/devel/lib//libfree_gait_rviz_plugin.so
#15 0x00007ffff7a8265d in rviz::DisplayGroup::update(float, float) () from /opt/ros/kinetic/lib/librviz.so
#16 0x00007ffff7a8265d in rviz::DisplayGroup::update(float, float) () from /opt/ros/kinetic/lib/librviz.so
#17 0x00007ffff7b4c885 in rviz::VisualizationManager::onUpdate() () from /opt/ros/kinetic/lib/librviz.so
#18 0x00007ffff217bd2a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff21885c8 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff217cbb3 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff746805c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff746d516 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff214d38b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007ffff21a25ed in QTimerInfoList::activateTimers() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007ffff21a2af1 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007ffff16a4197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007ffff16a43f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007ffff16a449c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ffff21a37eb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007ffff214ab4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007ffff2152bec in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x0000000000400c99 in main ()

@remod remod requested a review from pfankhauser August 3, 2017 10:44
@remod
Copy link
Contributor Author

remod commented Aug 3, 2017

The method free_gait::RosVisualization::getStanceMarker might be extended by a check if the stance is empty. However, I would then move the return object to a reference argument and return a bool instead indicating if the creation succeeded.

@pfankhauser
Copy link
Contributor

👍

@pfankhauser pfankhauser merged commit 517eb1c into master Aug 3, 2017
@pfankhauser pfankhauser deleted the fix/do_not_display_empty_stances branch August 3, 2017 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants