From 3b3dd14266ade45124112e794221467250ee4867 Mon Sep 17 00:00:00 2001 From: Wyatt Rees Date: Fri, 3 Jun 2022 10:39:51 -0600 Subject: [PATCH] Add KinematicsQueryOptions property in CartesianPath solver (#370) --- core/src/solvers/cartesian_path.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/solvers/cartesian_path.cpp b/core/src/solvers/cartesian_path.cpp index d247831a3..e3140f9d7 100644 --- a/core/src/solvers/cartesian_path.cpp +++ b/core/src/solvers/cartesian_path.cpp @@ -41,6 +41,7 @@ #include #include +#include #include using namespace trajectory_processing; @@ -56,6 +57,8 @@ CartesianPath::CartesianPath() { p.declare("step_size", 0.01, "step size between consecutive waypoints"); p.declare("jump_threshold", 1.5, "acceptable fraction of mean joint motion per step"); p.declare("min_fraction", 1.0, "fraction of motion required for success"); + p.declare("kinematics_options", kinematics::KinematicsQueryOptions(), + "KinematicsQueryOptions to pass to CartesianInterpolator"); } void CartesianPath::init(const core::RobotModelConstPtr& /*robot_model*/) {} @@ -96,7 +99,8 @@ bool CartesianPath::plan(const planning_scene::PlanningSceneConstPtr& from, cons double achieved_fraction = moveit::core::CartesianInterpolator::computeCartesianPath( &(sandbox_scene->getCurrentStateNonConst()), jmg, trajectory, &link, target, true, moveit::core::MaxEEFStep(props.get("step_size")), - moveit::core::JumpThreshold(props.get("jump_threshold")), is_valid); + moveit::core::JumpThreshold(props.get("jump_threshold")), is_valid, + props.get("kinematics_options")); assert(!trajectory.empty()); // there should be at least the start state result = std::make_shared(sandbox_scene->getRobotModel(), jmg);