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

TF display !pos.isNaN() && "Invalid vector supplied as parameter" assert #811

Closed
skohlbr opened this issue Sep 12, 2014 · 5 comments · Fixed by #1437
Closed

TF display !pos.isNaN() && "Invalid vector supplied as parameter" assert #811

skohlbr opened this issue Sep 12, 2014 · 5 comments · Fixed by #1437
Assignees

Comments

@skohlbr
Copy link

skohlbr commented Sep 12, 2014

Starting recently, we get the following segfault every few seconds with our Atlas setup:

rviz: /build/buildd/ogre-1.7.4/OgreMain/src/OgreNode.cpp:413: virtual void Ogre::Node::setPosition(const Ogre::Vector3&): Assertion `!pos.isNaN() && "Invalid vector supplied as parameter"' failed.

This error happens only if "world" is set as a fixed frame. If set it to a frame belonging to the robot, things work fine. This suggests that something about the transform between world and rest of the robot leads to the crash. Essentially there are two issues here:

  • rviz should not segfault as soon as some kind of invalid tf data is received and spit out a cryptic assert that gives the user no indication of what went wrong. Instead it should notify the user with a warning, but possibly keep on running.
  • There might or might not be a bug that leads rviz to crash even if it received "good" tf data (as detailed below I fail to see what is "bad" about our tf data so far).

A bag file that reproduces this crash easily is available for download here: https://drive.google.com/folderview?id=0B1hU91jkd7VwQ2ZQdXgzY2V6dFE&usp=sharing
Just playing back the bagfile (without --clock) and having rviz running with fixed frame "world" and a tf display active will crash rviz 1.5 seconds into the bagfile. We changed rviz sources to not assert but spit out an error to console, ignore the transforms and proceed. Apart from the error occuring every few seconds, things appear to run fine. We also use the transform between world and robot for various other parts in our system, and none of those crash. All of this leads me to believe that the observed behavior could be an issue with rviz (or how it uses tf).

A complete backtrace of rviz installed from .debs (Hydro/Precise/AMD64) of the resulting crash is this:

rviz: /build/buildd/ogre-1.7.4/OgreMain/src/OgreNode.cpp:413: virtual void Ogre::Node::setPosition(const Ogre::Vector3&): Assertion `!pos.isNaN() && "Invalid vector supplied as parameter"' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff645c4f5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff645c4f5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff645fc5b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff64551be in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff6455262 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff37d8ae6 in Ogre::Node::setPosition(Ogre::Vector3 const&) () from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.7.4
#5  0x00007fffa8aa424a in rviz::TFDisplay::updateFrame(rviz::FrameInfo*) () from /opt/ros/hydro/lib/libdefault_plugin.so
#6  0x00007fffa8aa65ba in rviz::TFDisplay::updateFrames() () from /opt/ros/hydro/lib/libdefault_plugin.so
#7  0x00007fffa8aa6826 in rviz::TFDisplay::update(float, float) () from /opt/ros/hydro/lib/libdefault_plugin.so
#8  0x00007ffff7aa4a91 in rviz::DisplayGroup::update(float, float) () from /opt/ros/hydro/lib/librviz.so
#9  0x00007ffff7b53749 in rviz::VisualizationManager::onUpdate() () from /opt/ros/hydro/lib/librviz.so
#10 0x00007ffff2b5e281 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#11 0x00007ffff2b63179 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#12 0x00007ffff6ec7894 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#13 0x00007ffff6ecc713 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#14 0x00007ffff2b49e9c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#15 0x00007ffff2b7b1f2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#16 0x00007ffff2b78c0d in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#17 0x00007ffff18ced13 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff18cf060 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff18cf124 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff2b793bf in QEventDispatcherGlib::processEvents(QFlags) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#21 0x00007ffff6f6fd5e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007ffff2b48c82 in QEventLoop::processEvents(QFlags) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#23 0x00007ffff2b48ed7 in QEventLoop::exec(QFlags) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#24 0x00007ffff2b4df67 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#25 0x0000000000400b0c in main ()
@skohlbr
Copy link
Author

skohlbr commented Sep 12, 2014

Note #808 describes a lot of the same symptoms, so might be same underlying issue.

@wjwwood wjwwood added the bug label Jan 28, 2015
@wjwwood
Copy link
Member

wjwwood commented Jan 28, 2015

Thanks for the bug report, and sorry for not initially responding. I think I originally passed on commenting on the assumption that it was somehow a duplicate of #808 as you suggested.

@wjwwood wjwwood added this to the untargeted milestone Oct 13, 2015
@wjwwood wjwwood removed this from the untargeted milestone May 10, 2018
@v-lopez
Copy link

v-lopez commented May 11, 2018

Same error but when using the Effort plugin.

Subscribing to a topic that has nans in it triggers this crash. This crashes in kinetic but works fine in indigo.

In our case, only part of the joints have torque information.

I'm attaching a rosbag with the /tf, the /joint_states and the /joint_torque_states topics.

The /joint_states can be visualized fine, because it has no nans.
The /joint_effort_states crashes rviz.

To reproduce:
rosparam load description.yaml /robot_description
rosbag play effort.bag

effort_crash.zip

@thomas-moulard
Copy link

@rhaschke
Copy link
Contributor

I can't reproduce the original issue on melodic-devel.
Regarding #811 (comment), NaNs were not handled yet. Fixed in #1437.

130s pushed a commit to 130s/rviz that referenced this issue Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants