Base class of trajectory generators.
More...
#include <trajectory_generator.h>
|
std::unique_ptr< KDL::VelocityProfile > | cartesianTrapVelocityProfile (const double max_velocity_scaling_factor, const double max_acceleration_scaling_factor, const std::unique_ptr< KDL::Path > &path) const |
| build cartesian velocity profile for the path More...
|
|
|
void | checkCartesianGoalConstraint (const moveit_msgs::Constraints &constraint, const moveit::core::RobotState &robot_state, const moveit::core::JointModelGroup *const jmg) const |
|
void | checkForValidGroupName (const std::string &group_name) const |
|
void | checkGoalConstraints (const moveit_msgs::MotionPlanRequest::_goal_constraints_type &goal_constraints, const std::string &group_name, const moveit::core::RobotState &rstate) const |
|
void | checkJointGoalConstraint (const moveit_msgs::Constraints &constraint, const std::string &group_name) const |
|
void | checkStartState (const moveit_msgs::RobotState &start_state, const std::string &group) const |
| Validate that the start state of the request matches the requirements of the trajectory generator. More...
|
|
virtual void | cmdSpecificRequestValidation (const planning_interface::MotionPlanRequest &req) const |
|
virtual void | extractMotionPlanInfo (const planning_scene::PlanningSceneConstPtr &scene, const planning_interface::MotionPlanRequest &req, MotionPlanInfo &info) const =0 |
| Extract needed information from a motion plan request in order to simplify further usages. More...
|
|
sensor_msgs::JointState | filterGroupValues (const sensor_msgs::JointState &robot_state, const std::string &group) const |
|
virtual void | plan (const planning_scene::PlanningSceneConstPtr &scene, const planning_interface::MotionPlanRequest &req, const MotionPlanInfo &plan_info, double sampling_time, trajectory_msgs::JointTrajectory &joint_trajectory)=0 |
|
void | setFailureResponse (const ros::Time &planning_start, planning_interface::MotionPlanResponse &res) const |
|
void | setSuccessResponse (const moveit::core::RobotState &start_rs, const std::string &group_name, const trajectory_msgs::JointTrajectory &joint_trajectory, const ros::Time &planning_start, planning_interface::MotionPlanResponse &res) const |
| set MotionPlanResponse from joint trajectory More...
|
|
void | validateRequest (const planning_interface::MotionPlanRequest &req, const moveit::core::RobotState &rstate) const |
| Validate the motion plan request based on the common requirements of trajectroy generator Checks that: More...
|
|
Base class of trajectory generators.
Note: All derived classes cannot have a start velocity
Definition at line 90 of file trajectory_generator.h.
◆ TrajectoryGenerator()
◆ ~TrajectoryGenerator()
virtual pilz_industrial_motion_planner::TrajectoryGenerator::~TrajectoryGenerator |
( |
| ) |
|
|
virtualdefault |
◆ cartesianTrapVelocityProfile()
std::unique_ptr< KDL::VelocityProfile > pilz_industrial_motion_planner::TrajectoryGenerator::cartesianTrapVelocityProfile |
( |
const double |
max_velocity_scaling_factor, |
|
|
const double |
max_acceleration_scaling_factor, |
|
|
const std::unique_ptr< KDL::Path > & |
path |
|
) |
| const |
|
protected |
build cartesian velocity profile for the path
Uses the path to get the cartesian length and the angular distance from start to goal. The trap profile returns uses the longer distance of translational and rotational motion.
Definition at line 301 of file trajectory_generator.cpp.
◆ checkAccelerationScaling()
void pilz_industrial_motion_planner::TrajectoryGenerator::checkAccelerationScaling |
( |
const double |
scaling_factor | ) |
|
|
staticprivate |
◆ checkCartesianGoalConstraint()
◆ checkForValidGroupName()
void pilz_industrial_motion_planner::TrajectoryGenerator::checkForValidGroupName |
( |
const std::string & |
group_name | ) |
const |
|
private |
◆ checkGoalConstraints()
void pilz_industrial_motion_planner::TrajectoryGenerator::checkGoalConstraints |
( |
const moveit_msgs::MotionPlanRequest::_goal_constraints_type & |
goal_constraints, |
|
|
const std::string & |
group_name, |
|
|
const moveit::core::RobotState & |
rstate |
|
) |
| const |
|
private |
◆ checkJointGoalConstraint()
void pilz_industrial_motion_planner::TrajectoryGenerator::checkJointGoalConstraint |
( |
const moveit_msgs::Constraints & |
constraint, |
|
|
const std::string & |
group_name |
|
) |
| const |
|
private |
◆ checkStartState()
void pilz_industrial_motion_planner::TrajectoryGenerator::checkStartState |
( |
const moveit_msgs::RobotState & |
start_state, |
|
|
const std::string & |
group |
|
) |
| const |
|
private |
Validate that the start state of the request matches the requirements of the trajectory generator.
These requirements are:
- Names of the joints and given joint position match in size and are non-zero
- The start state is withing the position limits
- The start state velocity is below TrajectoryGenerator::VELOCITY_TOLERANCE
Definition at line 142 of file trajectory_generator.cpp.
◆ checkVelocityScaling()
void pilz_industrial_motion_planner::TrajectoryGenerator::checkVelocityScaling |
( |
const double |
scaling_factor | ) |
|
|
staticprivate |
◆ cmdSpecificRequestValidation()
◆ extractMotionPlanInfo()
◆ filterGroupValues()
sensor_msgs::JointState pilz_industrial_motion_planner::TrajectoryGenerator::filterGroupValues |
( |
const sensor_msgs::JointState & |
robot_state, |
|
|
const std::string & |
group |
|
) |
| const |
|
private |
◆ generate()
generate robot trajectory with given sampling time
- Parameters
-
req | motion plan request |
res | motion plan response |
sampling_time | sampling time of the generate trajectory |
- Returns
- motion plan succeed/fail, detailed information in motion plan response
Definition at line 320 of file trajectory_generator.cpp.
◆ isCartesianGoalGiven()
bool pilz_industrial_motion_planner::TrajectoryGenerator::isCartesianGoalGiven |
( |
const moveit_msgs::Constraints & |
constraint | ) |
|
|
inlinestaticprivate |
- Returns
- True if ONE position + ONE orientation constraint given, otherwise false.
Definition at line 283 of file trajectory_generator.h.
◆ isJointGoalGiven()
bool pilz_industrial_motion_planner::TrajectoryGenerator::isJointGoalGiven |
( |
const moveit_msgs::Constraints & |
constraint | ) |
|
|
inlinestaticprivate |
◆ isOnlyOneGoalTypeGiven()
bool pilz_industrial_motion_planner::TrajectoryGenerator::isOnlyOneGoalTypeGiven |
( |
const moveit_msgs::Constraints & |
constraint | ) |
|
|
inlinestaticprivate |
- Returns
- True if ONLY joint constraint or ONLY cartesian constraint (position+orientation) given, otherwise false.
Definition at line 293 of file trajectory_generator.h.
◆ isScalingFactorValid()
bool pilz_industrial_motion_planner::TrajectoryGenerator::isScalingFactorValid |
( |
const double |
scaling_factor | ) |
|
|
inlinestaticprivate |
◆ plan()
virtual void pilz_industrial_motion_planner::TrajectoryGenerator::plan |
( |
const planning_scene::PlanningSceneConstPtr & |
scene, |
|
|
const planning_interface::MotionPlanRequest & |
req, |
|
|
const MotionPlanInfo & |
plan_info, |
|
|
double |
sampling_time, |
|
|
trajectory_msgs::JointTrajectory & |
joint_trajectory |
|
) |
| |
|
privatepure virtual |
◆ setFailureResponse()
◆ setSuccessResponse()
◆ validateRequest()
Validate the motion plan request based on the common requirements of trajectroy generator Checks that:
- req.max_velocity_scaling_factor [0.0001, 1], moveit_msgs::MoveItErrorCodes::INVALID_MOTION_PLAN on failure
- req.max_acceleration_scaling_factor [0.0001, 1] , moveit_msgs::MoveItErrorCodes::INVALID_MOTION_PLAN on failure
- req.group_name is a JointModelGroup of the Robotmodel, moveit_msgs::MoveItErrorCodes::INVALID_GROUP_NAME on failure
- req.start_state.joint_state is not empty, moveit_msgs::MoveItErrorCodes::INVALID_ROBOT_STATE on failure
- req.start_state.joint_state is within the limits, moveit_msgs::MoveItErrorCodes::INVALID_ROBOT_STATE on failure
- req.start_state.joint_state is all zero, moveit_msgs::MoveItErrorCodes::INVALID_ROBOT_STATE on failure
- req.goal_constraints must have exactly 1 defined cartesian oder joint constraint moveit_msgs::MoveItErrorCodes::INVALID_GOAL_CONSTRAINTS on failure A joint goal is checked for:
- StartState joint-names matching goal joint-names, moveit_msgs::MoveItErrorCodes::INVALID_GOAL_CONSTRAINTS on failure
- Beeing defined in the req.group_name JointModelGroup
- Beeing with the defined limits A cartesian goal is checked for:
- A defined link_name for the constraint, moveit_msgs::MoveItErrorCodes::INVALID_GOAL_CONSTRAINTS on failure
- Matching link_name for position and orientation constraints, moveit_msgs::MoveItErrorCodes::INVALID_GOAL_CONSTRAINTS on failure
- A IK solver exists for the given req.group_name and constraint link_name, moveit_msgs::MoveItErrorCodes::NO_IK_SOLUTION on failure
- A goal pose define in position_constraints[0].constraint_region.primitive_poses, moveit_msgs::MoveItErrorCodes::INVALID_GOAL_CONSTRAINTS on failure
- Parameters
-
Definition at line 267 of file trajectory_generator.cpp.
◆ MAX_SCALING_FACTOR
constexpr double pilz_industrial_motion_planner::TrajectoryGenerator::MAX_SCALING_FACTOR { 1. } |
|
staticconstexprprotected |
◆ MIN_SCALING_FACTOR
constexpr double pilz_industrial_motion_planner::TrajectoryGenerator::MIN_SCALING_FACTOR { 0.0001 } |
|
staticconstexprprotected |
◆ planner_limits_
◆ robot_model_
const robot_model::RobotModelConstPtr pilz_industrial_motion_planner::TrajectoryGenerator::robot_model_ |
|
protected |
◆ VELOCITY_TOLERANCE
constexpr double pilz_industrial_motion_planner::TrajectoryGenerator::VELOCITY_TOLERANCE { 1e-8 } |
|
staticconstexprprotected |
The documentation for this class was generated from the following files: