manipulation_transforms_ros.h
Go to the documentation of this file.
00001 /*********************************************************************
00002  * Software License Agreement (BSD License)
00003  *
00004  *  Copyright (c) 2008, Willow Garage, Inc.
00005  *  All rights reserved.
00006  *
00007  *  Redistribution and use in source and binary forms, with or without
00008  *  modification, are permitted provided that the following conditions
00009  *  are met:
00010  *
00011  *   * Redistributions of source code must retain the above copyright
00012  *     notice, this list of conditions and the following disclaimer.
00013  *   * Redistributions in binary form must reproduce the above
00014  *     copyright notice, this list of conditions and the following
00015  *     disclaimer in the documentation and/or other materials provided
00016  *     with the distribution.
00017  *   * Neither the name of the Willow Garage nor the names of its
00018  *     contributors may be used to endorse or promote products derived
00019  *     from this software without specific prior written permission.
00020  *
00021  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00022  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00023  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00024  *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00025  *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00026  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00027  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00028  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00029  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00030  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00031  *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00032  *  POSSIBILITY OF SUCH DAMAGE.
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 /* MANIPULATION_TRANSFORMS_ROS_H_ */


manipulation_transforms
Author(s): Jonathan Scholz
autogenerated on Tue Jan 7 2014 11:10:08