kinematic_constraint.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2011, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Author: Ioan Sucan */
36 
37 #pragma once
38 
44 
46 #include <moveit_msgs/Constraints.h>
47 
48 #include <iostream>
49 #include <vector>
50 
53 {
56 {
65  ConstraintEvaluationResult(bool result_satisfied = false, double dist = 0.0)
66  : satisfied(result_satisfied), distance(dist)
67  {
68  }
69 
70  bool satisfied;
71  double distance;
72 };
73 
74 MOVEIT_CLASS_FORWARD(KinematicConstraint); // Defines KinematicConstraintPtr, ConstPtr, WeakPtr... etc
75 
78 {
79 public:
81  enum ConstraintType
82  {
88  };
89 
95  KinematicConstraint(const moveit::core::RobotModelConstPtr& model);
96  virtual ~KinematicConstraint();
97 
99  virtual void clear() = 0;
100 
109  virtual ConstraintEvaluationResult decide(const moveit::core::RobotState& state, bool verbose = false) const = 0;
110 
116  virtual bool enabled() const = 0;
117 
129  virtual bool equal(const KinematicConstraint& other, double margin) const = 0;
130 
137  ConstraintType getType() const
138  {
139  return type_;
140  }
141 
147  virtual void print(std::ostream& out = std::cout) const
148  {
149  (void)out;
150  }
151 
159  double getConstraintWeight() const
160  {
161  return constraint_weight_;
162  }
163 
170  const moveit::core::RobotModelConstPtr& getRobotModel() const
171  {
172  return robot_model_;
173  }
174 
175 protected:
177  moveit::core::RobotModelConstPtr robot_model_;
178  double constraint_weight_;
180 };
181 
182 MOVEIT_CLASS_FORWARD(JointConstraint); // Defines JointConstraintPtr, ConstPtr, WeakPtr... etc
183 
203 class JointConstraint : public KinematicConstraint
204 {
205 public:
211  JointConstraint(const moveit::core::RobotModelConstPtr& model)
213  {
215  }
216 
230  bool configure(const moveit_msgs::JointConstraint& jc);
231 
247  bool equal(const KinematicConstraint& other, double margin) const override;
248 
249  ConstraintEvaluationResult decide(const moveit::core::RobotState& state, bool verbose = false) const override;
250  bool enabled() const override;
251  void clear() override;
252  void print(std::ostream& out = std::cout) const override;
253 
260  {
261  return joint_model_;
262  }
271  const std::string& getLocalVariableName() const
272  {
273  return local_variable_name_;
274  }
275 
283  const std::string& getJointVariableName() const
284  {
285  return joint_variable_name_;
286  }
287 
288  int getJointVariableIndex() const
289  {
290  return joint_variable_index_;
291  }
292 
299  double getDesiredJointPosition() const
300  {
301  return joint_position_;
302  }
303 
310  double getJointToleranceAbove() const
311  {
312  return joint_tolerance_above_;
313  }
314 
321  double getJointToleranceBelow() const
322  {
323  return joint_tolerance_below_;
324  }
325 
326 protected:
328  bool joint_is_continuous_;
329  std::string local_variable_name_;
330  std::string joint_variable_name_;
333 };
334 
335 MOVEIT_CLASS_FORWARD(OrientationConstraint); // Defines OrientationConstraintPtr, ConstPtr, WeakPtr... etc
336 
356 {
357 public:
358  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
359 
360 public:
366  OrientationConstraint(const moveit::core::RobotModelConstPtr& model)
367  : KinematicConstraint(model), link_model_(nullptr)
368  {
370  }
371 
385  bool configure(const moveit_msgs::OrientationConstraint& oc, const moveit::core::Transforms& tf);
386 
403  bool equal(const KinematicConstraint& other, double margin) const override;
404 
405  void clear() override;
406  ConstraintEvaluationResult decide(const moveit::core::RobotState& state, bool verbose = false) const override;
407  bool enabled() const override;
408  void print(std::ostream& out = std::cout) const override;
409 
417  {
418  return link_model_;
419  }
420 
427  const std::string& getReferenceFrame() const
428  {
430  }
431 
438  bool mobileReferenceFrame() const
439  {
440  return mobile_frame_;
441  }
442 
450  const Eigen::Matrix3d& getDesiredRotationMatrixInRefFrame() const
451  {
452  // validity of the rotation matrix is enforced in configure()
453  return desired_R_in_frame_id_;
454  }
455 
463  const Eigen::Matrix3d& getDesiredRotationMatrix() const
464  {
465  // validity of the rotation matrix is enforced in configure()
467  }
468 
475  double getXAxisTolerance() const
476  {
478  }
479 
486  double getYAxisTolerance() const
487  {
489  }
490 
497  double getZAxisTolerance() const
498  {
500  }
501 
502  int getParameterizationType() const
503  {
504  return parameterization_type_;
505  }
506 
507 protected:
509  Eigen::Matrix3d desired_R_in_frame_id_;
510  Eigen::Matrix3d desired_rotation_matrix_;
511  Eigen::Matrix3d desired_rotation_matrix_inv_;
512  std::string desired_rotation_frame_id_;
513  bool mobile_frame_;
517 };
518 
519 MOVEIT_CLASS_FORWARD(PositionConstraint); // Defines PositionConstraintPtr, ConstPtr, WeakPtr... etc
520 
535 {
536 public:
537  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
538 
539 public:
545  PositionConstraint(const moveit::core::RobotModelConstPtr& model) : KinematicConstraint(model), link_model_(nullptr)
546  {
548  }
549 
566  bool configure(const moveit_msgs::PositionConstraint& pc, const moveit::core::Transforms& tf);
567 
591  bool equal(const KinematicConstraint& other, double margin) const override;
592 
593  void clear() override;
594  ConstraintEvaluationResult decide(const moveit::core::RobotState& state, bool verbose = false) const override;
595  bool enabled() const override;
596  void print(std::ostream& out = std::cout) const override;
597 
605  {
606  return link_model_;
607  }
608 
615  const Eigen::Vector3d& getLinkOffset() const
616  {
617  return offset_;
618  }
619 
627  bool hasLinkOffset() const
628  {
629  if (!enabled())
630  return false;
631  return has_offset_;
632  }
633 
640  const std::vector<bodies::BodyPtr>& getConstraintRegions() const
641  {
642  return constraint_region_;
643  }
644 
651  const std::string& getReferenceFrame() const
652  {
653  return constraint_frame_id_;
654  }
655 
663  bool mobileReferenceFrame() const
664  {
665  if (!enabled())
666  return false;
667  return mobile_frame_;
668  }
669 
670 protected:
672  bool has_offset_;
673  std::vector<bodies::BodyPtr> constraint_region_;
676  bool mobile_frame_;
677  std::string constraint_frame_id_;
679 };
680 
681 MOVEIT_CLASS_FORWARD(VisibilityConstraint); // Defines VisibilityConstraintPtr, ConstPtr, WeakPtr... etc
682 
781 {
782 public:
783  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
784 
785 public:
791  VisibilityConstraint(const moveit::core::RobotModelConstPtr& model);
792 
805  bool configure(const moveit_msgs::VisibilityConstraint& vc, const moveit::core::Transforms& tf);
806 
824  bool equal(const KinematicConstraint& other, double margin) const override;
825  void clear() override;
826 
835 
847  void getMarkers(const moveit::core::RobotState& state, visualization_msgs::MarkerArray& markers) const;
848 
849  bool enabled() const override;
850  ConstraintEvaluationResult decide(const moveit::core::RobotState& state, bool verbose = false) const override;
851  void print(std::ostream& out = std::cout) const override;
852 
853 protected:
863  bool decideContact(const collision_detection::Contact& contact) const;
864 
865  collision_detection::CollisionEnvPtr collision_env_;
867  bool mobile_sensor_frame_;
868  bool mobile_target_frame_;
869  std::string target_frame_id_;
870  std::string sensor_frame_id_;
871  Eigen::Isometry3d sensor_pose_;
873  Eigen::Isometry3d target_pose_;
874  unsigned int cone_sides_;
876  double target_radius_;
877  double max_view_angle_;
878  double max_range_angle_;
879 };
880 
881 MOVEIT_CLASS_FORWARD(KinematicConstraintSet); // Defines KinematicConstraintSetPtr, ConstPtr, WeakPtr... etc
882 
891 class KinematicConstraintSet
892 {
893 public:
894  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
895 
896 public:
902  KinematicConstraintSet(const moveit::core::RobotModelConstPtr& model) : robot_model_(model)
903  {
904  }
905 
907  {
908  clear();
909  }
910 
912  void clear();
913 
924  bool add(const moveit_msgs::Constraints& c, const moveit::core::Transforms& tf);
925 
933  bool add(const std::vector<moveit_msgs::JointConstraint>& jc);
934 
942  bool add(const std::vector<moveit_msgs::PositionConstraint>& pc, const moveit::core::Transforms& tf);
943 
951  bool add(const std::vector<moveit_msgs::OrientationConstraint>& oc, const moveit::core::Transforms& tf);
952 
960  bool add(const std::vector<moveit_msgs::VisibilityConstraint>& vc, const moveit::core::Transforms& tf);
961 
973  ConstraintEvaluationResult decide(const moveit::core::RobotState& state, bool verbose = false) const;
974 
994  std::vector<ConstraintEvaluationResult>& results, bool verbose = false) const;
995 
1011  bool equal(const KinematicConstraintSet& other, double margin) const;
1012 
1018  void print(std::ostream& out = std::cout) const;
1019 
1026  const std::vector<moveit_msgs::PositionConstraint>& getPositionConstraints() const
1027  {
1028  return position_constraints_;
1029  }
1030 
1037  const std::vector<moveit_msgs::OrientationConstraint>& getOrientationConstraints() const
1038  {
1039  return orientation_constraints_;
1040  }
1041 
1048  const std::vector<moveit_msgs::JointConstraint>& getJointConstraints() const
1049  {
1050  return joint_constraints_;
1051  }
1052 
1059  const std::vector<moveit_msgs::VisibilityConstraint>& getVisibilityConstraints() const
1060  {
1061  return visibility_constraints_;
1062  }
1063 
1070  const moveit_msgs::Constraints& getAllConstraints() const
1071  {
1072  return all_constraints_;
1073  }
1074 
1081  bool empty() const
1082  {
1083  return kinematic_constraints_.empty();
1084  }
1085 
1086 protected:
1087  moveit::core::RobotModelConstPtr robot_model_;
1088  std::vector<KinematicConstraintPtr>
1091  std::vector<moveit_msgs::JointConstraint> joint_constraints_;
1093  std::vector<moveit_msgs::PositionConstraint> position_constraints_;
1095  std::vector<moveit_msgs::OrientationConstraint> orientation_constraints_;
1097  std::vector<moveit_msgs::VisibilityConstraint> visibility_constraints_;
1099  moveit_msgs::Constraints all_constraints_;
1100 };
1101 } // namespace kinematic_constraints
kinematic_constraints::OrientationConstraint::decide
ConstraintEvaluationResult decide(const moveit::core::RobotState &state, bool verbose=false) const override
Decide whether the constraint is satisfied in the indicated state.
Definition: kinematic_constraint.cpp:700
moveit::core::LinkModel
A link from the robot. Contains the constant transform applied to the link and its geometry.
Definition: link_model.h:71
kinematic_constraints::KinematicConstraint::POSITION_CONSTRAINT
@ POSITION_CONSTRAINT
Definition: kinematic_constraint.h:117
kinematic_constraints::KinematicConstraint::robot_model_
moveit::core::RobotModelConstPtr robot_model_
The kinematic model associated with this constraint.
Definition: kinematic_constraint.h:209
kinematic_constraints::KinematicConstraintSet::robot_model_
moveit::core::RobotModelConstPtr robot_model_
The kinematic model used for by the Set.
Definition: kinematic_constraint.h:1119
kinematic_constraints::OrientationConstraint::getDesiredRotationMatrix
const Eigen::Matrix3d & getDesiredRotationMatrix() const
The rotation target in the reference or tf frame.
Definition: kinematic_constraint.h:495
kinematic_constraints::JointConstraint::getJointVariableIndex
int getJointVariableIndex() const
Definition: kinematic_constraint.h:320
kinematic_constraints::JointConstraint::enabled
bool enabled() const override
This function returns true if this constraint is configured and able to decide whether states do meet...
Definition: kinematic_constraint.cpp:329
kinematic_constraints::VisibilityConstraint::max_range_angle_
double max_range_angle_
Storage for the max range angle.
Definition: kinematic_constraint.h:910
kinematic_constraints::OrientationConstraint::getZAxisTolerance
double getZAxisTolerance() const
Gets the Z axis tolerance.
Definition: kinematic_constraint.h:529
EigenSTL::vector_Isometry3d
std::vector< Eigen::Isometry3d, Eigen::aligned_allocator< Eigen::Isometry3d > > vector_Isometry3d
kinematic_constraints::JointConstraint::joint_tolerance_above_
double joint_tolerance_above_
Definition: kinematic_constraint.h:364
kinematic_constraints::ConstraintEvaluationResult::ConstraintEvaluationResult
ConstraintEvaluationResult(bool result_satisfied=false, double dist=0.0)
Constructor.
Definition: kinematic_constraint.h:129
kinematic_constraints::KinematicConstraintSet::getJointConstraints
const std::vector< moveit_msgs::JointConstraint > & getJointConstraints() const
Get all joint constraints in the set.
Definition: kinematic_constraint.h:1080
kinematic_constraints::KinematicConstraint::enabled
virtual bool enabled() const =0
This function returns true if this constraint is configured and able to decide whether states do meet...
kinematic_constraints::KinematicConstraintSet::equal
bool equal(const KinematicConstraintSet &other, double margin) const
Whether or not another KinematicConstraintSet is equal to this one.
Definition: kinematic_constraint.cpp:1320
kinematic_constraints::VisibilityConstraint::target_radius_
double target_radius_
Storage for the target radius.
Definition: kinematic_constraint.h:908
kinematic_constraints::OrientationConstraint::mobileReferenceFrame
bool mobileReferenceFrame() const
Whether or not a mobile reference frame is being employed.
Definition: kinematic_constraint.h:470
kinematic_constraints::KinematicConstraintSet::all_constraints_
moveit_msgs::Constraints all_constraints_
Messages corresponding to all internal constraints.
Definition: kinematic_constraint.h:1131
kinematic_constraints::OrientationConstraint::absolute_z_axis_tolerance_
double absolute_z_axis_tolerance_
Definition: kinematic_constraint.h:548
kinematic_constraints::PositionConstraint::getReferenceFrame
const std::string & getReferenceFrame() const
Returns the reference frame.
Definition: kinematic_constraint.h:683
kinematic_constraints::JointConstraint::joint_variable_index_
int joint_variable_index_
The index of the joint variable name in the full robot state.
Definition: kinematic_constraint.h:363
kinematic_constraints::KinematicConstraintSet::getOrientationConstraints
const std::vector< moveit_msgs::OrientationConstraint > & getOrientationConstraints() const
Get all orientation constraints in the set.
Definition: kinematic_constraint.h:1069
kinematic_constraints::PositionConstraint::constraint_frame_id_
std::string constraint_frame_id_
The constraint frame id.
Definition: kinematic_constraint.h:709
kinematic_constraints
Representation and evaluation of kinematic constraints.
Definition: kinematic_constraint.h:52
kinematic_constraints::OrientationConstraint::desired_R_in_frame_id_
Eigen::Matrix3d desired_R_in_frame_id_
Definition: kinematic_constraint.h:541
kinematic_constraints::JointConstraint::getLocalVariableName
const std::string & getLocalVariableName() const
Gets the local variable name if this constraint was configured for a part of a multi-DOF joint.
Definition: kinematic_constraint.h:303
kinematic_constraints::KinematicConstraintSet::decide
ConstraintEvaluationResult decide(const moveit::core::RobotState &state, bool verbose=false) const
Determines whether all constraints are satisfied by state, returning a single evaluation result.
Definition: kinematic_constraint.cpp:1284
kinematic_constraints::VisibilityConstraint::mobile_target_frame_
bool mobile_target_frame_
True if the target is a non-fixed frame relative to the transform frame.
Definition: kinematic_constraint.h:900
kinematic_constraints::OrientationConstraint::equal
bool equal(const KinematicConstraint &other, double margin) const override
Check if two orientation constraints are the same.
Definition: kinematic_constraint.cpp:667
kinematic_constraints::JointConstraint::equal
bool equal(const KinematicConstraint &other, double margin) const override
Check if two joint constraints are the same.
Definition: kinematic_constraint.cpp:284
kinematic_constraints::PositionConstraint::hasLinkOffset
bool hasLinkOffset() const
If the constraint is enabled and the link offset is substantially different than zero.
Definition: kinematic_constraint.h:659
kinematic_constraints::JointConstraint::decide
ConstraintEvaluationResult decide(const moveit::core::RobotState &state, bool verbose=false) const override
Decide whether the constraint is satisfied in the indicated state.
Definition: kinematic_constraint.cpp:296
kinematic_constraints::VisibilityConstraint::decideContact
bool decideContact(const collision_detection::Contact &contact) const
Function that gets passed into collision checking to allow some collisions.
Definition: kinematic_constraint.cpp:1166
class_forward.h
kinematic_constraints::KinematicConstraintSet::orientation_constraints_
std::vector< moveit_msgs::OrientationConstraint > orientation_constraints_
Messages corresponding to all internal orientation constraints.
Definition: kinematic_constraint.h:1127
kinematic_constraints::JointConstraint::configure
bool configure(const moveit_msgs::JointConstraint &jc)
Configure the constraint based on a moveit_msgs::JointConstraint.
Definition: kinematic_constraint.cpp:152
kinematic_constraints::JointConstraint::getJointToleranceAbove
double getJointToleranceAbove() const
Gets the upper tolerance component of the joint constraint.
Definition: kinematic_constraint.h:342
kinematic_constraints::PositionConstraint::print
void print(std::ostream &out=std::cout) const override
Print the constraint data.
Definition: kinematic_constraint.cpp:561
moveit::core::RobotState
Representation of a robot's state. This includes position, velocity, acceleration and effort.
Definition: robot_state.h:155
kinematic_constraints::JointConstraint::joint_variable_name_
std::string joint_variable_name_
The joint variable name.
Definition: kinematic_constraint.h:362
kinematic_constraints::ConstraintEvaluationResult::satisfied
bool satisfied
Whether or not the constraint or constraints were satisfied.
Definition: kinematic_constraint.h:134
kinematic_constraints::KinematicConstraintSet::position_constraints_
std::vector< moveit_msgs::PositionConstraint > position_constraints_
Messages corresponding to all internal position constraints.
Definition: kinematic_constraint.h:1125
kinematic_constraints::KinematicConstraint::print
virtual void print(std::ostream &out=std::cout) const
Print the constraint data.
Definition: kinematic_constraint.h:179
shapes::Mesh
collision_detection::Contact
Definition of a contact point.
Definition: include/moveit/collision_detection/collision_common.h:105
kinematic_constraints::JointConstraint::getJointVariableName
const std::string & getJointVariableName() const
Gets the joint variable name, as known to the moveit::core::RobotModel.
Definition: kinematic_constraint.h:315
robot_model.h
kinematic_constraints::VisibilityConstraint::target_pose_
Eigen::Isometry3d target_pose_
The target pose transformed into the transform frame.
Definition: kinematic_constraint.h:905
kinematic_constraints::JointConstraint::local_variable_name_
std::string local_variable_name_
The local variable name for a multi DOF joint, if any.
Definition: kinematic_constraint.h:361
kinematic_constraints::PositionConstraint::equal
bool equal(const KinematicConstraint &other, double margin) const override
Check if two constraints are the same. For position constraints this means that:
Definition: kinematic_constraint.cpp:466
kinematic_constraints::VisibilityConstraint::cone_sides_
unsigned int cone_sides_
Storage for the cone sides
Definition: kinematic_constraint.h:906
kinematic_constraints::VisibilityConstraint::sensor_pose_
Eigen::Isometry3d sensor_pose_
The sensor pose transformed into the transform frame.
Definition: kinematic_constraint.h:903
kinematic_constraints::KinematicConstraintSet::kinematic_constraints_
std::vector< KinematicConstraintPtr > kinematic_constraints_
Shared pointers to all the member constraints.
Definition: kinematic_constraint.h:1121
transforms.h
kinematic_constraints::VisibilityConstraint::configure
bool configure(const moveit_msgs::VisibilityConstraint &vc, const moveit::core::Transforms &tf)
Configure the constraint based on a moveit_msgs::VisibilityConstraint.
Definition: kinematic_constraint.cpp:809
kinematic_constraints::JointConstraint::JointConstraint
JointConstraint(const moveit::core::RobotModelConstPtr &model)
Constructor.
Definition: kinematic_constraint.h:243
kinematic_constraints::OrientationConstraint::getParameterizationType
int getParameterizationType() const
Definition: kinematic_constraint.h:534
kinematic_constraints::KinematicConstraint::JOINT_CONSTRAINT
@ JOINT_CONSTRAINT
Definition: kinematic_constraint.h:116
kinematic_constraints::VisibilityConstraint::VisibilityConstraint
VisibilityConstraint(const moveit::core::RobotModelConstPtr &model)
Constructor.
Definition: kinematic_constraint.cpp:787
kinematic_constraints::OrientationConstraint::absolute_x_axis_tolerance_
double absolute_x_axis_tolerance_
Definition: kinematic_constraint.h:547
kinematic_constraints::OrientationConstraint::desired_rotation_matrix_
Eigen::Matrix3d desired_rotation_matrix_
Definition: kinematic_constraint.h:542
kinematic_constraints::ConstraintEvaluationResult::distance
double distance
The distance evaluation from the constraint or constraints.
Definition: kinematic_constraint.h:135
kinematic_constraints::KinematicConstraint::type_
ConstraintType type_
The type of the constraint.
Definition: kinematic_constraint.h:208
kinematic_constraints::PositionConstraint::enabled
bool enabled() const override
This function returns true if this constraint is configured and able to decide whether states do meet...
Definition: kinematic_constraint.cpp:580
kinematic_constraints::PositionConstraint::getConstraintRegions
const std::vector< bodies::BodyPtr > & getConstraintRegions() const
Returns all the constraint regions.
Definition: kinematic_constraint.h:672
kinematic_constraints::OrientationConstraint::desired_rotation_matrix_inv_
Eigen::Matrix3d desired_rotation_matrix_inv_
Definition: kinematic_constraint.h:543
kinematic_constraints::JointConstraint::joint_model_
const moveit::core::JointModel * joint_model_
The joint from the kinematic model for this constraint.
Definition: kinematic_constraint.h:359
kinematic_constraints::KinematicConstraintSet::getPositionConstraints
const std::vector< moveit_msgs::PositionConstraint > & getPositionConstraints() const
Get all position constraints in the set.
Definition: kinematic_constraint.h:1058
kinematic_constraints::VisibilityConstraint::enabled
bool enabled() const override
This function returns true if this constraint is configured and able to decide whether states do meet...
Definition: kinematic_constraint.cpp:917
kinematic_constraints::VisibilityConstraint::max_view_angle_
double max_view_angle_
Storage for the max view angle.
Definition: kinematic_constraint.h:909
kinematic_constraints::KinematicConstraintSet::add
bool add(const moveit_msgs::Constraints &c, const moveit::core::Transforms &tf)
Add all known constraints.
Definition: kinematic_constraint.cpp:1275
kinematic_constraints::PositionConstraint::getLinkModel
const moveit::core::LinkModel * getLinkModel() const
Returns the associated link model, or NULL if not enabled.
Definition: kinematic_constraint.h:636
kinematic_constraints::KinematicConstraint::UNKNOWN_CONSTRAINT
@ UNKNOWN_CONSTRAINT
Definition: kinematic_constraint.h:115
kinematic_constraints::KinematicConstraint::getRobotModel
const moveit::core::RobotModelConstPtr & getRobotModel() const
Definition: kinematic_constraint.h:202
collision_env.h
kinematic_constraints::JointConstraint::joint_tolerance_below_
double joint_tolerance_below_
Position and tolerance values.
Definition: kinematic_constraint.h:364
kinematic_constraints::PositionConstraint::decide
ConstraintEvaluationResult decide(const moveit::core::RobotState &state, bool verbose=false) const override
Decide whether the constraint is satisfied in the indicated state.
Definition: kinematic_constraint.cpp:525
kinematic_constraints::PositionConstraint::clear
void clear() override
Clear the stored constraint.
Definition: kinematic_constraint.cpp:569
EigenSTL::vector_Vector3d
std::vector< Eigen::Vector3d, Eigen::aligned_allocator< Eigen::Vector3d > > vector_Vector3d
kinematic_constraints::VisibilityConstraint::clear
void clear() override
Clear the stored constraint.
Definition: kinematic_constraint.cpp:793
kinematic_constraints::PositionConstraint::getLinkOffset
const Eigen::Vector3d & getLinkOffset() const
Returns the target offset.
Definition: kinematic_constraint.h:647
kinematic_constraints::OrientationConstraint::print
void print(std::ostream &out=std::cout) const override
Print the constraint data.
Definition: kinematic_constraint.cpp:775
kinematic_constraints::OrientationConstraint::desired_rotation_frame_id_
std::string desired_rotation_frame_id_
Definition: kinematic_constraint.h:544
kinematic_constraints::KinematicConstraintSet::clear
void clear()
Clear the stored constraints.
Definition: kinematic_constraint.cpp:1202
kinematic_constraints::PositionConstraint::link_model_
const moveit::core::LinkModel * link_model_
The link model constraint subject.
Definition: kinematic_constraint.h:710
kinematic_constraints::VisibilityConstraint::points_
EigenSTL::vector_Vector3d points_
A set of points along the base of the circle.
Definition: kinematic_constraint.h:907
kinematic_constraints::VisibilityConstraint::print
void print(std::ostream &out=std::cout) const override
Print the constraint data.
Definition: kinematic_constraint.cpp:1190
kinematic_constraints::KinematicConstraintSet::~KinematicConstraintSet
~KinematicConstraintSet()
Definition: kinematic_constraint.h:938
kinematic_constraints::PositionConstraint::configure
bool configure(const moveit_msgs::PositionConstraint &pc, const moveit::core::Transforms &tf)
Configure the constraint based on a moveit_msgs::PositionConstraint.
Definition: kinematic_constraint.cpp:361
kinematic_constraints::JointConstraint::clear
void clear() override
Clear the stored constraint.
Definition: kinematic_constraint.cpp:334
kinematic_constraints::KinematicConstraint::equal
virtual bool equal(const KinematicConstraint &other, double margin) const =0
Check if two constraints are the same. This means that the types are the same, the subject of the con...
kinematic_constraints::KinematicConstraintSet
A class that contains many different constraints, and can check RobotState *versus the full set....
Definition: kinematic_constraint.h:923
kinematic_constraints::KinematicConstraint::decide
virtual ConstraintEvaluationResult decide(const moveit::core::RobotState &state, bool verbose=false) const =0
Decide whether the constraint is satisfied in the indicated state.
kinematic_constraints::OrientationConstraint
Class for constraints on the orientation of a link.
Definition: kinematic_constraint.h:387
kinematic_constraints::JointConstraint::joint_is_continuous_
bool joint_is_continuous_
Whether or not the joint is continuous.
Definition: kinematic_constraint.h:360
kinematic_constraints::VisibilityConstraint::equal
bool equal(const KinematicConstraint &other, double margin) const override
Check if two constraints are the same.
Definition: kinematic_constraint.cpp:888
kinematic_constraints::VisibilityConstraint
Class for constraints on the visibility relationship between a sensor and a target.
Definition: kinematic_constraint.h:812
kinematic_constraints::KinematicConstraint::getType
ConstraintType getType() const
Get the type of constraint.
Definition: kinematic_constraint.h:169
kinematic_constraints::OrientationConstraint::getXAxisTolerance
double getXAxisTolerance() const
Gets the X axis tolerance.
Definition: kinematic_constraint.h:507
kinematic_constraints::MOVEIT_CLASS_FORWARD
MOVEIT_CLASS_FORWARD(KinematicConstraint)
kinematic_constraints::VisibilityConstraint::sensor_frame_id_
std::string sensor_frame_id_
The sensor frame id.
Definition: kinematic_constraint.h:902
kinematic_constraints::KinematicConstraintSet::empty
bool empty() const
Returns whether or not there are any constraints in the set.
Definition: kinematic_constraint.h:1113
kinematic_constraints::VisibilityConstraint::decide
ConstraintEvaluationResult decide(const moveit::core::RobotState &state, bool verbose=false) const override
Decide whether the constraint is satisfied in the indicated state.
Definition: kinematic_constraint.cpp:1071
kinematic_constraints::KinematicConstraint
Base class for representing a kinematic constraint.
Definition: kinematic_constraint.h:109
kinematic_constraints::OrientationConstraint::getDesiredRotationMatrixInRefFrame
const Eigen::Matrix3d & getDesiredRotationMatrixInRefFrame() const
The rotation target in the reference frame.
Definition: kinematic_constraint.h:482
kinematic_constraints::OrientationConstraint::OrientationConstraint
OrientationConstraint(const moveit::core::RobotModelConstPtr &model)
Constructor.
Definition: kinematic_constraint.h:398
kinematic_constraints::PositionConstraint::mobile_frame_
bool mobile_frame_
Whether or not a mobile frame is employed.
Definition: kinematic_constraint.h:708
kinematic_constraints::KinematicConstraint::clear
virtual void clear()=0
Clear the stored constraint.
moveit::core::Transforms
Provides an implementation of a snapshot of a transform tree that can be easily queried for transform...
Definition: transforms.h:122
kinematic_constraints::PositionConstraint::constraint_region_pose_
EigenSTL::vector_Isometry3d constraint_region_pose_
The constraint region pose vector. All isometries are guaranteed to be valid.
Definition: kinematic_constraint.h:707
kinematic_constraints::OrientationConstraint::link_model_
const moveit::core::LinkModel * link_model_
Definition: kinematic_constraint.h:540
kinematic_constraints::OrientationConstraint::mobile_frame_
bool mobile_frame_
Definition: kinematic_constraint.h:545
kinematic_constraints::VisibilityConstraint::mobile_sensor_frame_
bool mobile_sensor_frame_
True if the sensor is a non-fixed frame relative to the transform frame.
Definition: kinematic_constraint.h:899
kinematic_constraints::KinematicConstraint::KinematicConstraint
KinematicConstraint(const moveit::core::RobotModelConstPtr &model)
Constructor.
Definition: kinematic_constraint.cpp:145
kinematic_constraints::KinematicConstraint::~KinematicConstraint
virtual ~KinematicConstraint()
kinematic_constraints::KinematicConstraint::ORIENTATION_CONSTRAINT
@ ORIENTATION_CONSTRAINT
Definition: kinematic_constraint.h:118
kinematic_constraints::PositionConstraint::offset_
Eigen::Vector3d offset_
The target offset.
Definition: kinematic_constraint.h:703
kinematic_constraints::JointConstraint::print
void print(std::ostream &out=std::cout) const override
Print the constraint data.
Definition: kinematic_constraint.cpp:344
kinematic_constraints::KinematicConstraintSet::visibility_constraints_
std::vector< moveit_msgs::VisibilityConstraint > visibility_constraints_
Messages corresponding to all internal visibility constraints.
Definition: kinematic_constraint.h:1129
kinematic_constraints::KinematicConstraint::getConstraintWeight
double getConstraintWeight() const
The weight of a constraint is a multiplicative factor associated to the distance computed by the deci...
Definition: kinematic_constraint.h:191
kinematic_constraints::VisibilityConstraint::getVisibilityCone
shapes::Mesh * getVisibilityCone(const moveit::core::RobotState &state) const
Gets a trimesh shape representing the visibility cone.
Definition: kinematic_constraint.cpp:922
kinematic_constraints::OrientationConstraint::getYAxisTolerance
double getYAxisTolerance() const
Gets the Y axis tolerance.
Definition: kinematic_constraint.h:518
bodies.h
kinematic_constraints::JointConstraint::getJointToleranceBelow
double getJointToleranceBelow() const
Gets the lower tolerance component of the joint constraint.
Definition: kinematic_constraint.h:353
kinematic_constraints::OrientationConstraint::configure
bool configure(const moveit_msgs::OrientationConstraint &oc, const moveit::core::Transforms &tf)
Configure the constraint based on a moveit_msgs::OrientationConstraint.
Definition: kinematic_constraint.cpp:585
kinematic_constraints::OrientationConstraint::getLinkModel
const moveit::core::LinkModel * getLinkModel() const
Gets the subject link model.
Definition: kinematic_constraint.h:448
kinematic_constraints::KinematicConstraint::constraint_weight_
double constraint_weight_
The weight of a constraint is a multiplicative factor associated to the distance computed by the deci...
Definition: kinematic_constraint.h:210
kinematic_constraints::KinematicConstraintSet::print
void print(std::ostream &out=std::cout) const
Print the constraint data.
Definition: kinematic_constraint.cpp:1313
kinematic_constraints::KinematicConstraintSet::getAllConstraints
const moveit_msgs::Constraints & getAllConstraints() const
Get all constraints in the set.
Definition: kinematic_constraint.h:1102
kinematic_constraints::OrientationConstraint::absolute_y_axis_tolerance_
double absolute_y_axis_tolerance_
Definition: kinematic_constraint.h:547
kinematic_constraints::OrientationConstraint::parameterization_type_
int parameterization_type_
Definition: kinematic_constraint.h:546
kinematic_constraints::VisibilityConstraint::sensor_view_direction_
int sensor_view_direction_
Storage for the sensor view direction.
Definition: kinematic_constraint.h:904
kinematic_constraints::VisibilityConstraint::getMarkers
void getMarkers(const moveit::core::RobotState &state, visualization_msgs::MarkerArray &markers) const
Adds markers associated with the visibility cone, sensor and target to the visualization array.
Definition: kinematic_constraint.cpp:996
kinematic_constraints::VisibilityConstraint::target_frame_id_
std::string target_frame_id_
The target frame id.
Definition: kinematic_constraint.h:901
kinematic_constraints::PositionConstraint::mobileReferenceFrame
bool mobileReferenceFrame() const
If enabled and the specified frame is a mobile frame, return true. Otherwise, returns false.
Definition: kinematic_constraint.h:695
kinematic_constraints::OrientationConstraint::getReferenceFrame
const std::string & getReferenceFrame() const
The target frame of the planning_models::Transforms class, for interpreting the rotation frame.
Definition: kinematic_constraint.h:459
kinematic_constraints::KinematicConstraint::VISIBILITY_CONSTRAINT
@ VISIBILITY_CONSTRAINT
Definition: kinematic_constraint.h:119
kinematic_constraints::KinematicConstraint::ConstraintType
ConstraintType
Enum for representing a constraint.
Definition: kinematic_constraint.h:113
kinematic_constraints::JointConstraint::getDesiredJointPosition
double getDesiredJointPosition() const
Gets the desired position component of the constraint.
Definition: kinematic_constraint.h:331
kinematic_constraints::VisibilityConstraint::collision_env_
collision_detection::CollisionEnvPtr collision_env_
A copy of the collision robot maintained for collision checking the cone against robot links.
Definition: kinematic_constraint.h:897
kinematic_constraints::JointConstraint::getJointModel
const moveit::core::JointModel * getJointModel() const
Get the joint model for which this constraint operates.
Definition: kinematic_constraint.h:291
kinematic_constraints::PositionConstraint::constraint_region_
std::vector< bodies::BodyPtr > constraint_region_
The constraint region vector.
Definition: kinematic_constraint.h:705
kinematic_constraints::KinematicConstraintSet::KinematicConstraintSet
KinematicConstraintSet(const moveit::core::RobotModelConstPtr &model)
Constructor.
Definition: kinematic_constraint.h:934
kinematic_constraints::PositionConstraint::has_offset_
bool has_offset_
Whether the offset is substantially different than 0.0.
Definition: kinematic_constraint.h:704
kinematic_constraints::PositionConstraint::PositionConstraint
PositionConstraint(const moveit::core::RobotModelConstPtr &model)
Constructor.
Definition: kinematic_constraint.h:577
kinematic_constraints::OrientationConstraint::clear
void clear() override
Clear the stored constraint.
Definition: kinematic_constraint.cpp:685
kinematic_constraints::KinematicConstraintSet::getVisibilityConstraints
const std::vector< moveit_msgs::VisibilityConstraint > & getVisibilityConstraints() const
Get all visibility constraints in the set.
Definition: kinematic_constraint.h:1091
robot_state.h
kinematic_constraints::KinematicConstraintSet::joint_constraints_
std::vector< moveit_msgs::JointConstraint > joint_constraints_
Messages corresponding to all internal joint constraints.
Definition: kinematic_constraint.h:1123
moveit::core::JointModel
A joint from the robot. Models the transform that this joint applies in the kinematic chain....
Definition: joint_model.h:173
kinematic_constraints::PositionConstraint
Class for constraints on the XYZ position of a link.
Definition: kinematic_constraint.h:566
kinematic_constraints::JointConstraint::joint_position_
double joint_position_
Definition: kinematic_constraint.h:364
fcl::Vector3d
Vec3fX< details::Vec3Data< double > > Vector3d
Definition: fcl_compat.h:89
kinematic_constraints::OrientationConstraint::enabled
bool enabled() const override
This function returns true if this constraint is configured and able to decide whether states do meet...
Definition: kinematic_constraint.cpp:695
kinematic_constraints::ConstraintEvaluationResult
Struct for containing the results of constraint evaluation.
Definition: kinematic_constraint.h:87


moveit_core
Author(s): Ioan Sucan , Sachin Chitta , Acorn Pooley
autogenerated on Sat Dec 21 2024 03:23:41