kinematic_constraints::KinematicConstraintSet Class Reference

A class that contains many different constraints, and can check RobotState *versus the full set. A set is satisfied if and only if all constraints are satisfied. More...

`#include <kinematic_constraint.h>`

## Public Member Functions | |

bool | add (const moveit_msgs::Constraints &c, const robot_state::Transforms &tf) |

Add all known constraints. | |

bool | add (const std::vector< moveit_msgs::JointConstraint > &jc) |

Add a vector of joint constraints. | |

bool | add (const std::vector< moveit_msgs::PositionConstraint > &pc, const robot_state::Transforms &tf) |

Add a vector of position constraints. | |

bool | add (const std::vector< moveit_msgs::OrientationConstraint > &oc, const robot_state::Transforms &tf) |

Add a vector of orientation constraints. | |

bool | add (const std::vector< moveit_msgs::VisibilityConstraint > &vc, const robot_state::Transforms &tf) |

Add a vector of visibility constraints. | |

void | clear () |

Clear the stored constraints. | |

ConstraintEvaluationResult | decide (const robot_state::RobotState &state, bool verbose=false) const |

Determines whether all constraints are satisfied by state, returning a single evaluation result. | |

ConstraintEvaluationResult | decide (const robot_state::RobotState &state, std::vector< ConstraintEvaluationResult > &results, bool verbose=false) const |

Determines whether all constraints are satisfied by state, returning a vector of results through a parameter in addition to a summed result. | |

bool | empty () const |

Returns whether or not there are any constraints in the set. | |

bool | equal (const KinematicConstraintSet &other, double margin) const |

Whether or not another KinematicConstraintSet is equal to this one. | |

const moveit_msgs::Constraints & | getAllConstraints () const |

Get all constraints in the set. | |

const std::vector < moveit_msgs::JointConstraint > & | getJointConstraints () const |

Get all joint constraints in the set. | |

const std::vector < moveit_msgs::OrientationConstraint > & | getOrientationConstraints () const |

Get all orientation constraints in the set. | |

const std::vector < moveit_msgs::PositionConstraint > & | getPositionConstraints () const |

Get all position constraints in the set. | |

const std::vector < moveit_msgs::VisibilityConstraint > & | getVisibilityConstraints () const |

Get all visibility constraints in the set. | |

KinematicConstraintSet (const robot_model::RobotModelConstPtr &model) | |

Constructor. | |

void | print (std::ostream &out=std::cout) const |

Print the constraint data. | |

~KinematicConstraintSet () | |

## Protected Attributes | |

moveit_msgs::Constraints | all_constraints_ |

Messages corresponding to all internal constraints. | |

std::vector < moveit_msgs::JointConstraint > | joint_constraints_ |

Messages corresponding to all internal joint constraints. | |

std::vector < KinematicConstraintPtr > | kinematic_constraints_ |

Shared pointers to all the member constraints. | |

std::vector < moveit_msgs::OrientationConstraint > | orientation_constraints_ |

Messages corresponding to all internal orientation constraints. | |

std::vector < moveit_msgs::PositionConstraint > | position_constraints_ |

Messages corresponding to all internal position constraints. | |

robot_model::RobotModelConstPtr | robot_model_ |

The kinematic model used for by the Set. | |

std::vector < moveit_msgs::VisibilityConstraint > | visibility_constraints_ |

Messages corresponding to all internal visibility constraints. |

A class that contains many different constraints, and can check RobotState *versus the full set. A set is satisfied if and only if all constraints are satisfied.

The set may contain any number of different kinds of constraints. All constraints, including invalid ones, are stored internally.

Definition at line 858 of file kinematic_constraint.h.

kinematic_constraints::KinematicConstraintSet::KinematicConstraintSet | ( | const robot_model::RobotModelConstPtr & | model | ) | ` [inline]` |

Constructor.

**Parameters:**-
[in] model The kinematic model used for constraint evaluation

Definition at line 870 of file kinematic_constraint.h.

Definition at line 875 of file kinematic_constraint.h.

bool kinematic_constraints::KinematicConstraintSet::add | ( | const moveit_msgs::Constraints & | c, |

const robot_state::Transforms & | tf |
||

) |

Add all known constraints.

**Parameters:**-
[in] c A message potentially contain vectors of constraints of add types

**Returns:**- Whether or not all constraints could be successfully configured given the contents of the message. The KinematicConstraintSet can still be used even if the addition returns false.

Definition at line 1102 of file kinematic_constraint.cpp.

bool kinematic_constraints::KinematicConstraintSet::add | ( | const std::vector< moveit_msgs::JointConstraint > & | jc | ) |

Add a vector of joint constraints.

**Parameters:**-
[in] jc A vector of joint constraints

**Returns:**- Will return true only if all constraints are valid, and false otherwise

Definition at line 1042 of file kinematic_constraint.cpp.

bool kinematic_constraints::KinematicConstraintSet::add | ( | const std::vector< moveit_msgs::PositionConstraint > & | pc, |

const robot_state::Transforms & | tf |
||

) |

Add a vector of position constraints.

**Parameters:**-
[in] pc A vector of position constraints

**Returns:**- Will return true only if all constraints are valid, and false otherwise

Definition at line 1057 of file kinematic_constraint.cpp.

bool kinematic_constraints::KinematicConstraintSet::add | ( | const std::vector< moveit_msgs::OrientationConstraint > & | oc, |

const robot_state::Transforms & | tf |
||

) |

Add a vector of orientation constraints.

**Parameters:**-
[in] oc A vector of orientation constraints

**Returns:**- Will return true only if all constraints are valid, and false otherwise

Definition at line 1072 of file kinematic_constraint.cpp.

bool kinematic_constraints::KinematicConstraintSet::add | ( | const std::vector< moveit_msgs::VisibilityConstraint > & | vc, |

const robot_state::Transforms & | tf |
||

) |

Add a vector of visibility constraints.

**Parameters:**-
[in] vc A vector of visibility constraints

**Returns:**- Will return true only if all constraints are valid, and false otherwise

Definition at line 1087 of file kinematic_constraint.cpp.

Clear the stored constraints.

Definition at line 1032 of file kinematic_constraint.cpp.

kinematic_constraints::ConstraintEvaluationResult kinematic_constraints::KinematicConstraintSet::decide | ( | const robot_state::RobotState & | state, |

bool | verbose = `false` |
||

) | const |

Determines whether all constraints are satisfied by state, returning a single evaluation result.

**Parameters:**-
[in] state The state to test [in] verbose Whether or not to make each constraint give debug output

**Returns:**- A single constraint evaluation result, where it will report satisfied only if all constraints are satisfied, and with a distance that is the sum of all individual distances.

Definition at line 1111 of file kinematic_constraint.cpp.

kinematic_constraints::ConstraintEvaluationResult kinematic_constraints::KinematicConstraintSet::decide | ( | const robot_state::RobotState & | state, |

std::vector< ConstraintEvaluationResult > & | results, |
||

bool | verbose = `false` |
||

) | const |

Determines whether all constraints are satisfied by state, returning a vector of results through a parameter in addition to a summed result.

**Parameters:**-
[in] state The state to test [out] results The individual results from constraint evaluation on each constraint contained in the set. [in] verbose Whether to print the results of each constraint check.

**Returns:**- A single constraint evaluation result, where it will report satisfied only if all constraints are satisfied, and with a distance that is the sum of all individual distances.

Definition at line 1124 of file kinematic_constraint.cpp.

bool kinematic_constraints::KinematicConstraintSet::empty | ( | ) | const` [inline]` |

Returns whether or not there are any constraints in the set.

**Returns:**- True if there are no constraints, otherwise false.

Definition at line 1049 of file kinematic_constraint.h.

bool kinematic_constraints::KinematicConstraintSet::equal | ( | const KinematicConstraintSet & | other, |

double | margin |
||

) | const |

Whether or not another KinematicConstraintSet is equal to this one.

Equality means that for each constraint in this set there is a constraint in the other set for which equal() is true with the given margin. Multiple constraints in this set can be matched to single constraints in the other set. Some constraints in the other set may not be matched to constraints in this set.

**Parameters:**-
[in] other The other set against which to test [in] margin The margin to apply to all individual constraint equality tests

**Returns:**- True if all constraints are matched, false otherwise

Definition at line 1147 of file kinematic_constraint.cpp.

const moveit_msgs::Constraints& kinematic_constraints::KinematicConstraintSet::getAllConstraints | ( | ) | const` [inline]` |

Get all constraints in the set.

**Returns:**- All constraints in a single message

Definition at line 1038 of file kinematic_constraint.h.

const std::vector<moveit_msgs::JointConstraint>& kinematic_constraints::KinematicConstraintSet::getJointConstraints | ( | ) | const` [inline]` |

Get all joint constraints in the set.

**Returns:**- All joint constraints

Definition at line 1016 of file kinematic_constraint.h.

const std::vector<moveit_msgs::OrientationConstraint>& kinematic_constraints::KinematicConstraintSet::getOrientationConstraints | ( | ) | const` [inline]` |

Get all orientation constraints in the set.

**Returns:**- All orientation constraints

Definition at line 1005 of file kinematic_constraint.h.

const std::vector<moveit_msgs::PositionConstraint>& kinematic_constraints::KinematicConstraintSet::getPositionConstraints | ( | ) | const` [inline]` |

Get all position constraints in the set.

**Returns:**- All position constraints

Definition at line 994 of file kinematic_constraint.h.

const std::vector<moveit_msgs::VisibilityConstraint>& kinematic_constraints::KinematicConstraintSet::getVisibilityConstraints | ( | ) | const` [inline]` |

Get all visibility constraints in the set.

**Returns:**- All visibility constraints

Definition at line 1027 of file kinematic_constraint.h.

void kinematic_constraints::KinematicConstraintSet::print | ( | std::ostream & | out = `std::cout` | ) | const |

Print the constraint data.

**Parameters:**-
[in] out The file stream for printing

Definition at line 1140 of file kinematic_constraint.cpp.

moveit_msgs::Constraints kinematic_constraints::KinematicConstraintSet::all_constraints_` [protected]` |

Messages corresponding to all internal constraints.

Definition at line 1063 of file kinematic_constraint.h.

std::vector<moveit_msgs::JointConstraint> kinematic_constraints::KinematicConstraintSet::joint_constraints_` [protected]` |

Messages corresponding to all internal joint constraints.

Definition at line 1059 of file kinematic_constraint.h.

std::vector<KinematicConstraintPtr> kinematic_constraints::KinematicConstraintSet::kinematic_constraints_` [protected]` |

Shared pointers to all the member constraints.

Definition at line 1057 of file kinematic_constraint.h.

std::vector<moveit_msgs::OrientationConstraint> kinematic_constraints::KinematicConstraintSet::orientation_constraints_` [protected]` |

Messages corresponding to all internal orientation constraints.

Definition at line 1061 of file kinematic_constraint.h.

std::vector<moveit_msgs::PositionConstraint> kinematic_constraints::KinematicConstraintSet::position_constraints_` [protected]` |

Messages corresponding to all internal position constraints.

Definition at line 1060 of file kinematic_constraint.h.

robot_model::RobotModelConstPtr kinematic_constraints::KinematicConstraintSet::robot_model_` [protected]` |

The kinematic model used for by the Set.

Definition at line 1056 of file kinematic_constraint.h.

std::vector<moveit_msgs::VisibilityConstraint> kinematic_constraints::KinematicConstraintSet::visibility_constraints_` [protected]` |

Messages corresponding to all internal visibility constraints.

Definition at line 1062 of file kinematic_constraint.h.

The documentation for this class was generated from the following files:

moveit_core

Author(s): Ioan Sucan, Sachin Chitta , Acorn Pooley

autogenerated on Thu Aug 27 2015 13:58:53

Author(s): Ioan Sucan

autogenerated on Thu Aug 27 2015 13:58:53