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
00026
00027
00028
00029
00030
00031
00032
00033
00034
00043 #ifndef MANIPULATION_TRANSFORMS_ROS_H_
00044 #define MANIPULATION_TRANSFORMS_ROS_H_
00045
00046 #include <ros/ros.h>
00047 #include <LinearMath/btTransform.h>
00048 #include <vector>
00049
00050 #include "manipulation_transforms/LoadInitialTransforms.h"
00051 #include "manipulation_transforms/SetInitialTransforms.h"
00052 #include "manipulation_transforms/MapObjectPoseToEffectors.h"
00053 #include "manipulation_transforms/MapEffectorPosesToObject.h"
00054 #include "manipulation_transforms/MapObjectTwistToEffectors.h"
00055 #include "manipulation_transforms/MapEffectorTwistsToObject.h"
00056 #include "manipulation_transforms/MapObjectTrajectoryToEffectors.h"
00057 #include "manipulation_transforms/MapEffectorTrajectoriesToObject.h"
00058 #include "manipulation_transforms/MapEffectorTrajectoriesToObject.h"
00059
00060 #include "manipulation_transforms/manipulation_transforms.h"
00061
00062
00063 class ManipulationTransformsROS {
00064 public:
00070 ManipulationTransformsROS(const std::string &reference_frame = "");
00071
00075 ManipulationTransformsROS(const std::string &reference_frame, const std::string &ns);
00076
00081 ManipulationTransformsROS(const std::string &reference_frame, geometry_msgs::PoseStamped &obj_init_pose, std::vector<geometry_msgs::PoseStamped> effector_init_poses);
00082
00083 virtual ~ManipulationTransformsROS();
00084 void init_services(const std::string &ns = "");
00085
00089 bool setInitialTransforms(manipulation_transforms::SetInitialTransforms::Request &req,
00090 manipulation_transforms::SetInitialTransforms::Response &resp);
00091
00095 bool loadInitialTransforms(manipulation_transforms::LoadInitialTransforms::Request &req,
00096 manipulation_transforms::LoadInitialTransforms::Response &resp);
00097
00101 bool mapEffectorPosesToObject(manipulation_transforms::MapEffectorPosesToObject::Request &req,
00102 manipulation_transforms::MapEffectorPosesToObject::Response &resp);
00103
00107 bool mapObjectPoseToEffectors(manipulation_transforms::MapObjectPoseToEffectors::Request &req,
00108 manipulation_transforms::MapObjectPoseToEffectors::Response &resp);
00109
00113 bool mapEffectorTwistsToObject(manipulation_transforms::MapEffectorTwistsToObject::Request &req,
00114 manipulation_transforms::MapEffectorTwistsToObject::Response &resp);
00115
00119 bool mapObjectTwistToEffectors(manipulation_transforms::MapObjectTwistToEffectors::Request &req,
00120 manipulation_transforms::MapObjectTwistToEffectors::Response &resp);
00121
00128 bool mapObjectTrajectoryToEffectors(manipulation_transforms::MapObjectTrajectoryToEffectors::Request &req,
00129 manipulation_transforms::MapObjectTrajectoryToEffectors::Response &resp);
00130
00137 bool mapEffectorTrajectoriesToObject(manipulation_transforms::MapEffectorTrajectoriesToObject::Request &req,
00138 manipulation_transforms::MapEffectorTrajectoriesToObject::Response &resp);
00139
00140 private:
00141
00142 ros::NodeHandle param_nh_;
00143 ros::NodeHandle private_nh_;
00144 ManipulationTransforms solver_;
00146
00147 ros::ServiceServer effector_poses_to_object_service_;
00148 ros::ServiceServer object_pose_to_effectors_service_;
00149 ros::ServiceServer effector_twists_to_object_service_;
00150 ros::ServiceServer object_twist_to_effectors_service_;
00151 ros::ServiceServer effector_trajectories_to_object_service_;
00152 ros::ServiceServer object_trajectory_to_effectors_service_;
00153 ros::ServiceServer load_initial_transforms_service_;
00154 ros::ServiceServer set_initial_transforms_service_;
00155
00156 std::string BASE_FRAME_;
00157 int n_effectors_;
00158
00159 btTransform obj_initial_pose_;
00160 std::vector<btTransform> effector_init_poses;
00168 bool loadParamServerTransforms(const ros::NodeHandle &nh);
00169
00178 int checkForParamServerTransforms(const ros::NodeHandle &nh, bool warn = false);
00179
00180 };
00181
00182 #endif