Class PlanComponentsBuilder

Class Documentation

class PlanComponentsBuilder

Helper class to encapsulate the merge and blend process of trajectories.

Public Functions

inline void setBlender(std::unique_ptr<pilz_industrial_motion_planner::TrajectoryBlender> blender)

Sets the blender used to blend two trajectories.

inline void setModel(const moveit::core::RobotModelConstPtr &model)

Sets the robot model needed to create new trajectory elements.

void append(const planning_scene::PlanningSceneConstPtr &planning_scene, const robot_trajectory::RobotTrajectoryPtr &other, const double blend_radius)

Appends the specified trajectory to the trajectory container under construction.

The appending complies to the following rules:

  • A trajectory is simply added/attached to the previous trajectory:

    • if they are from the same group and

    • if the specified blend_radius is zero.

  • A trajectory is blended together with the previous trajectory:

    • if they are from the same group and

    • if the specified blend_radius is GREATER than zero.

  • A new trajectory element is created and the given trajectory is appended/attached to the newly created empty trajectory:

    • if the given and previous trajectory are from different groups.

Parameters:
  • planning_scene – The scene planning is occurring in.

  • other – Trajectories which has to be added to the trajectory container under construction.

  • blend_radius – The blending radius between the previous and the specified trajectory.

inline void reset()

Clears the trajectory container under construction.

std::vector<robot_trajectory::RobotTrajectoryPtr> build() const
Returns:

The final trajectory container which results from the append calls.