Skip to content

Commit

Permalink
Update stomp planning interface
Browse files Browse the repository at this point in the history
  • Loading branch information
sjahr committed May 17, 2023
1 parent 6fe8af4 commit 20c9e39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ struct PlannerConfigurationSettings
/** \brief Map from PlannerConfigurationSettings.name to PlannerConfigurationSettings */
typedef std::map<std::string, PlannerConfigurationSettings> PlannerConfigurationMap;

using StateCostFn = std::function<double(const moveit::core::RobotState& robot_state, const MotionPlanRequest& request,
const planning_scene::PlanningSceneConstPtr& planning_scene)>;
using StateCostFn = std::function<double(const std::vector_double& state_vector)>;

MOVEIT_CLASS_FORWARD(PlanningContext); // Defines PlanningContextPtr, ConstPtr, WeakPtr... etc

Expand Down
5 changes: 3 additions & 2 deletions moveit_planners/stomp/src/stomp_moveit_smoothing_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ class StompSmoothingAdapter : public planning_request_adapter::PlanningRequestAd

bool adaptAndPlan(const PlannerFn& planner, const planning_scene::PlanningSceneConstPtr& ps,
const planning_interface::MotionPlanRequest& req, planning_interface::MotionPlanResponse& res,
std::vector<std::size_t>& /*added_path_index*/) const override
std::vector<std::size_t>& /*added_path_index*/,
const planning_interface::StateCostFn& state_cost_function) const override
{
// Following call to planner() calls the motion planner defined for the pipeline and stores the trajectory inside
// the MotionPlanResponse res variable which is then passed to STOMP for optimization
if (!planner(ps, req, res))
if (!planner(ps, req, res, state_cost_function))
{
return false;
}
Expand Down

0 comments on commit 20c9e39

Please sign in to comment.