constrained_ik_plugin.h
Go to the documentation of this file.
00001 /*
00002  * constrained_ik_plugin.h
00003  *
00004  *  Created on: Sep 15, 2013
00005  *      Author: dsolomon
00006  */
00007 /*
00008  * Software License Agreement (Apache License)
00009  *
00010  * Copyright (c) 2013, Southwest Research Institute
00011  *
00012  * Licensed under the Apache License, Version 2.0 (the "License");
00013  * you may not use this file except in compliance with the License.
00014  * You may obtain a copy of the License at
00015  *
00016  *   http://www.apache.org/licenses/LICENSE-2.0
00017  *
00018  * Unless required by applicable law or agreed to in writing, software
00019  * distributed under the License is distributed on an "AS IS" BASIS,
00020  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00021  * See the License for the specific language governing permissions and
00022  * limitations under the License.
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 //#include <moveit_msgs/GetPositionFK.h>
00034 //#include <moveit_msgs/GetPositionIK.h>
00035 //#include <moveit_msgs/GetKinematicSolverInfo.h>
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 }   //namespace constrained_ik
00121 
00122 
00123 #endif /* CONSTRAINED_IK_PLUGIN_H_ */


constrained_ik
Author(s): Chris Lewis , Jeremy Zoss , Dan Solomon
autogenerated on Mon Oct 6 2014 00:52:26