MoveItHelpers.h
Go to the documentation of this file.
00001 #ifndef OBJECT_MOVEIT_MOVEITHELPERS
00002 #define OBJECT_MOVEIT_MOVEITHELPERS
00003 
00004 #include <ros/ros.h>
00005 #include <boost/thread/mutex.hpp>
00006 #include <geometry_msgs/PoseStamped.h>
00007 #include <geometry_msgs/QuaternionStamped.h>
00008 #include <sensor_msgs/JointState.h>
00009 #include <shape_msgs/SolidPrimitive.h>
00010 
00011 #include <moveit_msgs/Constraints.h>
00012 #include <eigen_conversions/eigen_msg.h>
00013 
00014 namespace moveit_object_handling
00015 {
00016 
00017 class MoveItHelpers
00018 {
00019 
00020 public:
00021     typedef boost::shared_ptr<moveit_msgs::PositionConstraint> PositionConstraintPtr;
00022     typedef boost::shared_ptr<shape_msgs::SolidPrimitive> SolidPrimitivePtr;
00023 
00026     MoveItHelpers() {}
00027 
00028     ~MoveItHelpers() {}
00029 
00035     static moveit_msgs::Constraints getPoseConstraint(const std::string &link_name,
00036             const geometry_msgs::PoseStamped &pose, double tolerance_pos, double tolerance_angle, int type);
00037 
00038     static moveit_msgs::OrientationConstraint getOrientationConstraint(const std::string& link_name,
00039             const geometry_msgs::QuaternionStamped& quat,
00040             const float& x_tolerance,
00041             const float& y_tolerance,
00042             const float& z_tolerance);
00043 
00047     static moveit_msgs::Constraints getJointConstraint(const std::string& link_name,
00048             const sensor_msgs::JointState& joint_state, const float& joint_tolerance);
00049 
00050 
00055     /*static PositionConstraintPtr getCombinedPoseConstraint(
00056             const std::string &link_name,
00057             const geometry_msgs::PoseStamped &target_pose,
00058             float tolerance_pos,
00059             const geometry_msgs::PoseStamped& target_pose2,
00060             float tolerance_pos2,
00061             float maxArmReachDistance);
00062             */
00063 
00068     static PositionConstraintPtr getSpherePoseConstraint(
00069         const std::string &link_name,
00070         const geometry_msgs::PoseStamped &target_pose,
00071         float maxArmReachDistance);
00072 
00076     static moveit_msgs::PositionConstraint getBoxConstraint(const std::string &link_name,
00077             const geometry_msgs::PoseStamped& boxOrigin, const double& x, const double& y, const double& z);
00078 
00079     /* static bool getCylinderConstraint(const std::string &link_name, const geometry_msgs::PoseStamped& from,
00080             const geometry_msgs::PoseStamped& to, const double& radius, moveit_msgs::PositionConstraint& result);
00081      */
00082 
00087     /*static moveit_msgs::PositionConstraint getCylinderConstraint(const std::string &link_name,
00088             const geometry_msgs::PoseStamped& from, const geometry_msgs::Vector3& dir, const double& radius); */
00089 
00090 
00095     /*static moveit_msgs::PositionConstraint getConeConstraint(const std::string &link_name,
00096             const geometry_msgs::PoseStamped& from, const geometry_msgs::Vector3& dir,
00097             const double& radius_start, const double& radius_end);*/
00098 
00099 
00102     static SolidPrimitivePtr getConeBV(const Eigen::Vector3d& _fromPose,
00103                                        const Eigen::Quaterniond& _fromOrientation, const Eigen::Vector3d& _direction,
00104                                        const double& radius_start, const double& radius_end,
00105                                        Eigen::Vector3d& bv_pose, Eigen::Quaterniond& bv_orientation);
00106 
00109     static SolidPrimitivePtr getCylinderBV(const Eigen::Vector3d& _fromPose,
00110                                            const Eigen::Quaterniond& _fromOrientation,
00111                                            const Eigen::Vector3d& _direction, const double& radius,
00112                                            Eigen::Vector3d& bv_pose, Eigen::Quaterniond& bv_orientation);
00113 };
00114 
00115 }  // namespace moveit_object_handling
00116 
00117 #endif  // OBJECT_MOVEIT_MOVEITHELPERS


moveit_object_handling
Author(s): Jennifer Buehler
autogenerated on Sat Mar 2 2019 03:50:51