Open danielmaier opened 10 years ago
Have you fixed the problem? I have the same problem right now.
Finally i fixed this problem.
The solution is the virtual_joint Joint Type which we create in moveit setup assistant should be set to fixed or you should set the robot initial positions for grid in RVIZ. As far as i understand initially it sets a robot position in the grid and when the robot position is outside of the grid RVIZ crashes.
Do you have an idea of what needs to be changed in the code to prevent this problem in the future?
Ogre tends to use assertions to enforce valid numeric values. This may be what you want in games, which is what Ogre is written for.
In RViz, we receive data from many unknown sources, and we run 3rd-party plugins. We really don't want it to crash like this whenever someone forgot to initialize something or when their math has a singularity.
The proper solution, in my mind, is to go through all of RViz source and replace every instance of scene_node->setPosition(pos)
with some wrapper function like safeSetPosition(scene_node, pos)
, where "safeSetPosition()" looks like:
if(isfinite(pos.x) && isfinite(pos.y) && isfinite(pos.z))
{
scene_node->setPosition(pos);
}
And of course also setOrientation() needs to be wrapped as well, and possibly other functions.
Unfortunately, RViz exposes the Ogre APIs to plugin writers, so there is no way to prevent plugin writers from causing this.
Huh, just read this thread: http://www.ogre3d.org/forums/viewtopic.php?t=40634
They argue both ways for and against the assertions, mostly "for". The other thing to notice is that they say the assertions only happen when ogre is compiled in debug mode. Maybe we can change rviz to use a release version of Ogre?
I recently experienced more crashes than usual of Rviz and I think they are related to the moveit_ros_visualization/RobotState display. 3-5 months ago, I have not observed this problem but I also have not used Moveit since a few days ago.
Even tough the problem occured with my own robot/moveit config, it can be reproduced with the PR2 moveit configs/tutorials. To do so:
add a new RobotState display or use the one inside the MotionPlanning Display and set the topic to /tutorial_robot_state
--> Rviz will crash with the error message
If it does not crash, uncheck and re-check the Display and call the state_display_tutorial.launch again. Repeat multiple times and at some point, Rviz will crash.
My system is up to date with ROS hydro and ubuntu 12.04 64 bit. I also checked that the capability move_group/MoveGroupGetPlanningSceneService is present in the move_group.launch file.
Especially unchecking und re-checking the RobotState Display seems to cause problems (i.e. rivz crashes). With my robot config, I often observe a crash and this error message: