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

Segfault when validating MultiDOF trajectories #539

Closed
TroyCordie opened this issue Jun 27, 2017 · 5 comments
Closed

Segfault when validating MultiDOF trajectories #539

TroyCordie opened this issue Jun 27, 2017 · 5 comments

Comments

@TroyCordie
Copy link
Contributor

Description

Segfault when executing trajectory with custom action file. New to moveit so I'm hoping I might get pointed in the right direction or this might flag to someone in the know.

Your environment

  • ROS Distro: [Kinetic]
  • OS Version: Ubuntu 16.04
  • Source
  • 0744817

Steps to reproduce

I have been attempting to run the simulator located at https://github.com/wilselby/ROS_quadrotor_simulator.

Expected behaviour

the custom action file should implement a multi-degree of freedom joint and by all accounts has been working.

Actual behaviour

When executing a planned trajectory the code segfaults resulting in the following backtrace.

Backtrace or Console output

https://gist.github.com/TroyCordie/55de6da4ec32112981d7ba4c38512298

@v4hn
Copy link
Contributor

v4hn commented Jun 27, 2017

Ouch, the validation was added recently and apparently there is a bug w.r.t. MultiDOF trajectories.

You can skip it (and most likely therefore the segfault) by setting the validation tolerance to 0.0 here in your moveit config.

It would help us a lot if you could figure out in which line the segfault occurs or give us an example trajectory to debug this!

Very sorry for the inconvenience, this was an often requested safety feature, so we backported it to indigo.

@TroyCordie
Copy link
Contributor Author

Thank you for the response.
This fix does indeed skip the section of code that was segfaulting, I will see if I can dig in the next few days and find the culprit.

Though I am a bit confused by the topic the trajectory is now being output on /execute_trajectory/... I had assumed the topic /multi_dof_joint_trajectory_action/... would be the topic. This may just be a generic question so I will also ask it in the google groups.

@v4hn
Copy link
Contributor

v4hn commented Jun 28, 2017 via email

@TroyCordie
Copy link
Contributor Author

I do have a gazebo model I am trying to tie into moveit, when I get something happening between the two I'll dig deeper into the segfault.

@v4hn v4hn changed the title Implmenting a custom action file Segfault when validating MultiDOF trajectories Jul 5, 2017
@TroyCordie
Copy link
Contributor Author

I have finaly had a chance to follow this up and the issue is in
bool TrajectoryExecutionManager::validate(const TrajectoryExecutionContext& context) const located in moveit_ros/planning/trajectory_execution_manager/src/trajectory_execution_manager.cpp

specifically if (positions.size() != n) on line ~963.

The issue arises when planning for a multi dof joint with out any other joint as trajectory.joint_trajectory.points.front().positions is empty. c is not a strong point but this is a null pointer?

currently, my fix is to add the check

if(!trajectory.joint_trajectory.points.empty())
{
......
}
else if(!trajectory.multi_dof_joint_trajectory.points.empty())
{
ROS_INFO_NAMED("move_group", "multi dof joint trajectory valadation not implmented");
return true;
}

v4hn added a commit to v4hn/moveit that referenced this issue Nov 17, 2017
Also warn that MultiDOFJointTrajectory validation is not supported

Fixes moveit#539
v4hn added a commit to v4hn/moveit that referenced this issue Dec 7, 2017
Also warn that MultiDOFJointTrajectory validation is not supported

Fixes moveit#539
v4hn added a commit to v4hn/moveit that referenced this issue Dec 7, 2017
Also warn that MultiDOFJointTrajectory validation is not supported

Fixes moveit#539
@v4hn v4hn closed this as completed in #691 Dec 7, 2017
v4hn added a commit that referenced this issue Dec 7, 2017
Also warn that MultiDOFJointTrajectory validation is not supported

Fixes #539
JafarAbdi pushed a commit to JafarAbdi/moveit that referenced this issue Mar 24, 2022
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

No branches or pull requests

2 participants