link_model.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 * Software License Agreement (BSD License)
00003 *
00004 *  Copyright (c) 2012, 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 Willow Garage, Inc. 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 
00035 /* Author: Ioan Sucan */
00036 
00037 #ifndef MOVEIT_ROBOT_MODEL_LINK_MODEL_
00038 #define MOVEIT_ROBOT_MODEL_LINK_MODEL_
00039 
00040 #include <map>
00041 #include <string>
00042 #include <vector>
00043 #include <utility>
00044 #include <Eigen/Geometry>
00045 #include <geometric_shapes/shapes.h>
00046 #include <geometric_shapes/shape_messages.h>
00047 
00048 namespace robot_model
00049 {
00050 
00051 class JointModel;
00052 
00054 class LinkModel
00055 {
00056   friend class RobotModel;
00057 public:
00058 
00059   EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00060 
00061   typedef std::map<const LinkModel*, Eigen::Affine3d, std::less<const LinkModel*>,
00062                    Eigen::aligned_allocator<std::pair<const LinkModel*, Eigen::Affine3d> > > AssociatedFixedTransformMap;
00063 
00064   LinkModel();
00065   ~LinkModel();
00066 
00068   const std::string& getName() const
00069   {
00070     return name_;
00071   }
00072 
00074   int getTreeIndex() const
00075   {
00076     return tree_index_;
00077   }
00078 
00080   const JointModel* getParentJointModel() const
00081   {
00082     return parent_joint_model_;
00083   }
00084 
00086   const std::vector<JointModel*>& getChildJointModels() const
00087   {
00088     return child_joint_models_;
00089   }
00090 
00095   const Eigen::Affine3d& getJointOriginTransform() const
00096   {
00097     return joint_origin_transform_;
00098   }
00099 
00100 
00104   const Eigen::Affine3d& getCollisionOriginTransform() const
00105   {
00106     return collision_origin_transform_;
00107   }
00108 
00110   const shapes::ShapeConstPtr& getShape() const
00111   {
00112     return shape_;
00113   }
00114 
00116   const shapes::ShapeMsg& getShapeMsg() const
00117   {
00118     return shape_msg_;
00119   }
00120 
00122   const Eigen::Vector3d& getShapeExtentsAtOrigin() const
00123   {
00124     return shape_extents_;
00125   }
00126 
00128   const AssociatedFixedTransformMap& getAssociatedFixedTransforms() const
00129   {
00130     return associated_fixed_transforms_;
00131   }
00132 
00134   const std::string& getVisualMeshFilename() const
00135   {
00136     return visual_mesh_filename_;
00137   }
00138 
00140   const Eigen::Vector3d& getVisualMeshScale() const
00141   {
00142     return visual_mesh_scale_;
00143   }
00144 
00145 private:
00146 
00148   std::string               name_;
00149 
00151   JointModel               *parent_joint_model_;
00152 
00154   std::vector<JointModel*>  child_joint_models_;
00155 
00157   AssociatedFixedTransformMap associated_fixed_transforms_;
00158 
00160   Eigen::Affine3d           joint_origin_transform_;
00161 
00163   Eigen::Affine3d           collision_origin_transform_;
00164 
00166   shapes::ShapeConstPtr     shape_;
00167 
00169   shapes::ShapeMsg          shape_msg_;
00170 
00172   Eigen::Vector3d           shape_extents_;
00173 
00175   std::string               visual_mesh_filename_;
00176 
00178   Eigen::Vector3d           visual_mesh_scale_;
00179 
00181   int                       tree_index_;
00182 
00183 };
00184 }
00185 
00186 #endif


moveit_core
Author(s): Ioan Sucan , Sachin Chitta , Acorn Pooley
autogenerated on Mon Oct 6 2014 02:24:47