Base class of trajectory generators.
More...
#include <trajectory_generator.h>
|
void | checkCartesianGoalConstraint (const moveit_msgs::Constraints &constraint, const std::string &group_name) const |
|
void | checkForValidGroupName (const std::string &group_name) const |
|
void | checkGoalConstraints (const moveit_msgs::MotionPlanRequest::_goal_constraints_type &goal_constraints, const std::vector< std::string > &expected_joint_names, const std::string &group_name) const |
|
void | checkJointGoalConstraint (const moveit_msgs::Constraints &constraint, const std::vector< std::string > &expected_joint_names, const std::string &group_name) const |
|
void | checkStartState (const moveit_msgs::RobotState &start_state) 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 |
|
void | convertToRobotTrajectory (const trajectory_msgs::JointTrajectory &joint_trajectory, const moveit_msgs::RobotState &start_state, robot_trajectory::RobotTrajectory &robot_trajectory) const |
|
virtual void | extractMotionPlanInfo (const planning_interface::MotionPlanRequest &req, MotionPlanInfo &info) const =0 |
| Extract needed information from a motion plan request in order to simplify further usages. More...
|
|
virtual void | plan (const planning_interface::MotionPlanRequest &req, const MotionPlanInfo &plan_info, const double &sampling_time, trajectory_msgs::JointTrajectory &joint_trajectory)=0 |
|
void | setFailureResponse (const ros::Time &planning_start, planning_interface::MotionPlanResponse &res) const |
|
void | setSuccessResponse (const std::string &group_name, const moveit_msgs::RobotState &start_state, 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 |
| 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 69 of file trajectory_generator.h.
pilz::TrajectoryGenerator::TrajectoryGenerator |
( |
const robot_model::RobotModelConstPtr & |
robot_model, |
|
|
const pilz::LimitsContainer & |
planner_limits |
|
) |
| |
|
inline |
virtual pilz::TrajectoryGenerator::~TrajectoryGenerator |
( |
| ) |
|
|
virtualdefault |
std::unique_ptr< KDL::VelocityProfile > pilz::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 241 of file trajectory_generator.cpp.
void pilz::TrajectoryGenerator::checkAccelerationScaling |
( |
const double & |
scaling_factor | ) |
|
|
staticprivate |
void pilz::TrajectoryGenerator::checkCartesianGoalConstraint |
( |
const moveit_msgs::Constraints & |
constraint, |
|
|
const std::string & |
group_name |
|
) |
| const |
|
private |
void pilz::TrajectoryGenerator::checkForValidGroupName |
( |
const std::string & |
group_name | ) |
const |
|
private |
void pilz::TrajectoryGenerator::checkGoalConstraints |
( |
const moveit_msgs::MotionPlanRequest::_goal_constraints_type & |
goal_constraints, |
|
|
const std::vector< std::string > & |
expected_joint_names, |
|
|
const std::string & |
group_name |
|
) |
| const |
|
private |
void pilz::TrajectoryGenerator::checkJointGoalConstraint |
( |
const moveit_msgs::Constraints & |
constraint, |
|
|
const std::vector< std::string > & |
expected_joint_names, |
|
|
const std::string & |
group_name |
|
) |
| const |
|
private |
void pilz::TrajectoryGenerator::checkStartState |
( |
const moveit_msgs::RobotState & |
start_state | ) |
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 72 of file trajectory_generator.cpp.
void pilz::TrajectoryGenerator::checkVelocityScaling |
( |
const double & |
scaling_factor | ) |
|
|
staticprivate |
void pilz::TrajectoryGenerator::convertToRobotTrajectory |
( |
const trajectory_msgs::JointTrajectory & |
joint_trajectory, |
|
|
const moveit_msgs::RobotState & |
start_state, |
|
|
robot_trajectory::RobotTrajectory & |
robot_trajectory |
|
) |
| const |
|
private |
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 responce
Definition at line 262 of file trajectory_generator.cpp.
bool pilz::TrajectoryGenerator::isCartesianGoalGiven |
( |
const moveit_msgs::Constraints & |
constraint | ) |
|
|
inlinestaticprivate |
- Returns
- True if ONE position + ONE orientation constraint given, otherwise false.
Definition at line 240 of file trajectory_generator.h.
bool pilz::TrajectoryGenerator::isJointGoalGiven |
( |
const moveit_msgs::Constraints & |
constraint | ) |
|
|
inlinestaticprivate |
bool pilz::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 250 of file trajectory_generator.h.
bool pilz::TrajectoryGenerator::isScalingFactorValid |
( |
const double & |
scaling_factor | ) |
|
|
inlinestaticprivate |
void pilz::TrajectoryGenerator::setSuccessResponse |
( |
const std::string & |
group_name, |
|
|
const moveit_msgs::RobotState & |
start_state, |
|
|
const trajectory_msgs::JointTrajectory & |
joint_trajectory, |
|
|
const ros::Time & |
planning_start, |
|
|
planning_interface::MotionPlanResponse & |
res |
|
) |
| const |
|
private |
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 198 of file trajectory_generator.cpp.
constexpr double pilz::TrajectoryGenerator::MAX_SCALING_FACTOR {1.} |
|
staticprotected |
constexpr double pilz::TrajectoryGenerator::MIN_SCALING_FACTOR {0.0001} |
|
staticprotected |
const robot_model::RobotModelConstPtr pilz::TrajectoryGenerator::robot_model_ |
|
protected |
constexpr double pilz::TrajectoryGenerator::VELOCITY_TOLERANCE {1e-8} |
|
staticprotected |
The documentation for this class was generated from the following files: