ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

trajectory_filter_server crash using <robotname>_arm_navigation autogenerated by wizard

asked 2011-11-28 18:13:02 -0500

jluan gravatar image

updated 2011-11-28 18:13:46 -0500

Hi all,

Using the Planning Description Configuration Wizard, I autogenerated a robotname_arm_navigation package for my robot. However, when I go to test it in the visualizer, the "Filter Trajectory" command always causes the trajectory_filter_server to crash:

[ERROR] [1322552297.034016315]: Service call to filter trajectory failed.`


[ INFO] [1322549920.624581727, 1322549920.620624065]: Problem with trajectory filter
[trajectory_filter_server-7] process has died [pid 26444, exit code -11].

Digging deeper in gdb,

trajectory_filter_server: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->() const [with T = urdf::JointLimits]: Assertion `px != 0' failed.

A backtrace yields:

#0  0x00007ffff5f0d3a5 in raise () from /lib/x86_64-linux-gnu/
#1  0x00007ffff5f10b0b in abort () from /lib/x86_64-linux-gnu/
#2  0x00007ffff5f05d4d in __assert_fail () from /lib/x86_64-linux-gnu/
#3  0x000000000041c924 in boost::shared_ptr<urdf::JointLimits>::operator-> (this=<optimized out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:418
#4  0x000000000041f35d in operator-> (this=<optimized out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:418
#5  trajectory_filter_server::TrajectoryFilterServer::getLimits (this=0x7fffffffd100, trajectory=..., limits_out=...)
    at /tmp/buildd/ros-electric-arm-navigation-1.0.7/debian/ros-electric-arm-navigation/opt/ros/electric/stacks/arm_navigation/trajectory_filter_server/src/trajectory_filter_server.cpp:151
#6  0x0000000000420f9e in trajectory_filter_server::TrajectoryFilterServer::filterConstraints (this=0x7fffffffd100, req=..., resp=...)
    at /tmp/buildd/ros-electric-arm-navigation-1.0.7/debian/ros-electric-arm-navigation/opt/ros/electric/stacks/arm_navigation/trajectory_filter_server/src/trajectory_filter_server.cpp:109

Going to line 151 of arm_navigation/trajectory_filter_server/src/trajectory_filter_server.cpp,

limits.max_velocity = urdf_joint->limits->velocity;
limits.has_velocity_limits = true;

It seems like urdf_joint->limits is a boost::shared_ptr that has not been initialized. Does anyone know why this is happening even for the autogenerated arm_navigation package?

For more background, I've also tested it in my system with the robotname_arm_navigation.launch launchfile. Passing in a desired pose, it once again crashes at line 151. Furthermore, I autogenerated an arm_navigation package for the PR2 using the wizard as well, and it has the exact same problem. That should rule out my URDF file as a potential cause.

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-18 12:23:28 -0500

updated 2012-12-18 12:24:30 -0500

although an old question, i met the same problem. after i dig into it, i find that this is a bug in trajectory_filter_server/trajectory_filter_server.cpp. in the method getLimits(), there is:

limits.min_position = urdf_joint->limits->lower;
limits.max_position = urdf_joint->limits->upper;

if the urdf has continuous joint, this will cause a problem because continuous joints has no lower/upper limits defined. so the solution is simple, just add a check if(urdf_joint->type == urdf::Joint::CONTINUOUS) before

limits.min_position = urdf_joint->limits->lower
limits.max_position = urdf_joint->limits->upper;
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2011-11-28 18:13:02 -0500

Seen: 427 times

Last updated: Dec 18 '12