mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
Avoid segfault if TimeParameterization is not set
This commit is contained in:
parent
b1336dc210
commit
a84479cc58
@ -121,8 +121,9 @@ PlannerInterface::Result CartesianPath::plan(const planning_scene::PlanningScene
|
||||
result->addSuffixWayPoint(waypoint, 0.0);
|
||||
|
||||
auto timing = props.get<TimeParameterizationPtr>("time_parameterization");
|
||||
timing->computeTimeStamps(*result, props.get<double>("max_velocity_scaling_factor"),
|
||||
props.get<double>("max_acceleration_scaling_factor"));
|
||||
if (timing)
|
||||
timing->computeTimeStamps(*result, props.get<double>("max_velocity_scaling_factor"),
|
||||
props.get<double>("max_acceleration_scaling_factor"));
|
||||
|
||||
if (achieved_fraction < props.get<double>("min_fraction")) {
|
||||
return { false, "min_fraction not met. Achieved: " + std::to_string(achieved_fraction) };
|
||||
|
||||
@ -103,8 +103,9 @@ PlannerInterface::Result JointInterpolationPlanner::plan(const planning_scene::P
|
||||
return { false, "Goal state is out of bounds!" };
|
||||
|
||||
auto timing = props.get<TimeParameterizationPtr>("time_parameterization");
|
||||
timing->computeTimeStamps(*result, props.get<double>("max_velocity_scaling_factor"),
|
||||
props.get<double>("max_acceleration_scaling_factor"));
|
||||
if (timing)
|
||||
timing->computeTimeStamps(*result, props.get<double>("max_velocity_scaling_factor"),
|
||||
props.get<double>("max_acceleration_scaling_factor"));
|
||||
|
||||
// set max_effort on first and last waypoint (first, because we might reverse the trajectory)
|
||||
const auto& max_effort = properties().get("max_effort");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user