manipulation_transforms.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 
00046 #ifndef MANIPULATION_TRANSFORMS_H_
00047 #define MANIPULATION_TRANSFORMS_H_
00048 
00049 #include <LinearMath/btTransform.h>
00050 #include "kdl/frames.hpp"
00051 #include <vector>
00052 
00053 class ManipulationTransforms {
00054 public:
00055 
00059         ManipulationTransforms();
00060 
00066         ManipulationTransforms(const btTransform &obj_initial_pose, const std::vector<btTransform> &effector_initial_poses);
00067         ManipulationTransforms(const btTransform &obj_initial_pose, const btTransform &effector_initial_pose); 
00068         ManipulationTransforms(const btTransform &obj_initial_pose, const btTransform &effector1_initial_pose, const btTransform &effector2_initial_pose);  
00069         virtual ~ManipulationTransforms();
00070 
00076         void setInitialTransforms(const btTransform &obj_initial_pose, const std::vector<btTransform> &effector_initial_poses);
00077         void setInitialTransforms(const btTransform &obj_initial_pose, const btTransform &effector_initial_pose); 
00078         void setInitialTransforms(const btTransform &obj_initial_pose, const btTransform &effector1_initial_pose, const btTransform &effector2_initial_pose); 
00079 
00085         double mapEffectorPosesToObject(const std::vector<btTransform> &effector_query_poses, btTransform &obj_pose);
00086         double mapEffectorPosesToObject(const btTransform &effector_query_pose, btTransform &obj_pose); 
00087         double mapEffectorPosesToObject(const btTransform &effector1_query_pose, const btTransform &effector2_query_pose, btTransform &obj_pose); 
00088 
00095         double mapObjectPoseToEffectors(const btTransform &obj_query_pose, std::vector<btTransform> &effector_poses);
00096         double mapObjectPoseToEffectors(const btTransform &obj_query_pose, btTransform &effector_pose); 
00097         double mapObjectPoseToEffectors(const btTransform &obj_query_pose, btTransform &effector1_pose, btTransform &effector2_pose); 
00098 
00110         double mapEffectorTwistsToObject(const std::vector<KDL::Twist> &effector_query_twists, KDL::Twist &obj_twist, bool from_ref = true);
00111         double mapEffectorTwistsToObject(const KDL::Twist &effector_query_twist, KDL::Twist &obj_twist, bool from_ref = true); 
00112         double mapEffectorTwistsToObject(const KDL::Twist &effector1_query_twist, const KDL::Twist &effector2_query_twist, KDL::Twist &obj_twist, bool from_ref = true); 
00113 
00123         double mapObjectTwistToEffectors(const KDL::Twist &obj_query_twist, std::vector<KDL::Twist> &effector_twists, bool to_ref = true);
00124         double mapObjectTwistToEffectors(const KDL::Twist &obj_query_twist, KDL::Twist &effector_twist, bool to_ref = true);
00125         double mapObjectTwistToEffectors(const KDL::Twist &obj_query_twist, KDL::Twist &effector1_twist, KDL::Twist &effector2_twist, bool to_ref = true);
00126 
00135         double mapEffectorWrenchesToObject(const std::vector<KDL::Wrench> &effector_query_wrenches, KDL::Wrench &obj_wrench);
00136 
00144         double mapObjectWrenchToEffectors(const KDL::Wrench &obj_query_wrench, std::vector<KDL::Wrench> &effector_wrenches);
00145 
00146 private:
00147         unsigned int n_effectors_; 
00149         std::vector<btTransform> obj_T_effectors_; 
00150         std::vector<btTransform> effector_T_obj_; 
00152         std::vector<btTransform> effector_T_ref_; 
00153         btTransform obj_T_ref_; 
00154 };
00155 
00156 #endif /* MANIPULATION_TRANSFORMS_H_ */


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