Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef CONSTRAINED_IK_PLUGIN_H_
00026 #define CONSTRAINED_IK_PLUGIN_H_
00027
00028 #include <constrained_ik/basic_kin.h>
00029 #include <ros/ros.h>
00030
00031 #include <moveit/kinematics_base/kinematics_base.h>
00032
00033
00034
00035
00036 #include <moveit_msgs/MoveItErrorCodes.h>
00037
00038 namespace constrained_ik
00039 {
00040 class ConstrainedIKPlugin: public kinematics::KinematicsBase
00041 {
00042 public:
00043 ConstrainedIKPlugin();
00044
00045 bool isActive();
00046
00047 bool isActive() const;
00048
00049 virtual bool getPositionIK(const geometry_msgs::Pose &ik_pose,
00050 const std::vector<double> &ik_seed_state,
00051 std::vector<double> &solution,
00052 moveit_msgs::MoveItErrorCodes &error_code,
00053 const kinematics::KinematicsQueryOptions &options = kinematics::KinematicsQueryOptions()) const;
00054
00055 virtual bool searchPositionIK(const geometry_msgs::Pose &ik_pose,
00056 const std::vector<double> &ik_seed_state,
00057 double timeout,
00058 std::vector<double> &solution,
00059 moveit_msgs::MoveItErrorCodes &error_code,
00060 const kinematics::KinematicsQueryOptions &options = kinematics::KinematicsQueryOptions()) const;
00061
00062 virtual bool searchPositionIK(const geometry_msgs::Pose &ik_pose,
00063 const std::vector<double> &ik_seed_state,
00064 double timeout,
00065 const std::vector<double> &consistency_limits,
00066 std::vector<double> &solution,
00067 moveit_msgs::MoveItErrorCodes &error_code,
00068 const kinematics::KinematicsQueryOptions &options = kinematics::KinematicsQueryOptions()) const;
00069
00070 virtual bool searchPositionIK(const geometry_msgs::Pose &ik_pose,
00071 const std::vector<double> &ik_seed_state,
00072 double timeout,
00073 std::vector<double> &solution,
00074 const IKCallbackFn &solution_callback,
00075 moveit_msgs::MoveItErrorCodes &error_code,
00076 const kinematics::KinematicsQueryOptions &options = kinematics::KinematicsQueryOptions()) const;
00077
00078 virtual bool searchPositionIK(const geometry_msgs::Pose &ik_pose,
00079 const std::vector<double> &ik_seed_state,
00080 double timeout,
00081 const std::vector<double> &consistency_limits,
00082 std::vector<double> &solution,
00083 const IKCallbackFn &solution_callback,
00084 moveit_msgs::MoveItErrorCodes &error_code,
00085 const kinematics::KinematicsQueryOptions &options = kinematics::KinematicsQueryOptions()) const;
00086
00087 virtual bool getPositionFK(const std::vector<std::string> &link_names,
00088 const std::vector<double> &joint_angles,
00089 std::vector<geometry_msgs::Pose> &poses) const;
00090
00095 virtual bool initialize(const std::string& robot_description,
00096 const std::string& group_name,
00097 const std::string& base_name,
00098 const std::string& tip_name,
00099 double search_discretization);
00100
00104 const std::vector<std::string>& getJointNames() const;
00105
00109 const std::vector<std::string>& getLinkNames() const;
00110
00111 protected:
00112
00113 bool active_;
00114 basic_kin::BasicKin kin_;
00115 int dimension_;
00116 std::vector<std::string> link_names_, joint_names_;
00117
00118 };
00119
00120 }
00121
00122
00123 #endif