MIRA
Joint.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 by
3  * MetraLabs GmbH (MLAB), GERMANY
4  * and
5  * Neuroinformatics and Cognitive Robotics Labs (NICR) at TU Ilmenau, GERMANY
6  * All rights reserved.
7  *
8  * Contact: info@mira-project.org
9  *
10  * Commercial Usage:
11  * Licensees holding valid commercial licenses may use this file in
12  * accordance with the commercial license agreement provided with the
13  * software or, alternatively, in accordance with the terms contained in
14  * a written agreement between you and MLAB or NICR.
15  *
16  * GNU General Public License Usage:
17  * Alternatively, this file may be used under the terms of the GNU
18  * General Public License version 3.0 as published by the Free Software
19  * Foundation and appearing in the file LICENSE.GPL3 included in the
20  * packaging of this file. Please review the following information to
21  * ensure the GNU General Public License version 3.0 requirements will be
22  * met: http://www.gnu.org/copyleft/gpl.html.
23  * Alternatively you may (at your option) use any later version of the GNU
24  * General Public License if such license has been publicly approved by
25  * MLAB and NICR (or its successors, if any).
26  *
27  * IN NO EVENT SHALL "MLAB" OR "NICR" BE LIABLE TO ANY PARTY FOR DIRECT,
28  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF
29  * THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF "MLAB" OR
30  * "NICR" HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  * "MLAB" AND "NICR" SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
33  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
34  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
35  * ON AN "AS IS" BASIS, AND "MLAB" AND "NICR" HAVE NO OBLIGATION TO
36  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS.
37  */
38 
47 #ifndef _MIRA_JOINT_H_
48 #define _MIRA_JOINT_H_
49 
50 #include <geometry/Point.h>
51 #include <transform/Pose.h>
52 #include <serialization/adapters/boost/optional.hpp>
53 
55 
56 namespace mira { namespace model {
57 
59 
65 {
66 public:
67  enum Type
68  {
74  };
75 
76  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
77 
78  template<typename Reflector>
79  void reflect(Reflector& r)
80  {
81  r.member("Name", name, "Name of the link");
82  r.member("Type", type, "The joint's type");
83  r.member("Origin", origin, "Origin", Pose3());
84  r.member("Axis", axis, "Axis", Point3f(1.0f, 0.0f, 0.0f));
85  r.member("Parent", parent, "Parent link");
86  r.member("Child", child, "Child link");
87  r.member("LowerLimit", lowerLimit, "Lower limit (rad for revolute and "
88  "meter for prismatic)", -pi<float>());
89  r.member("UpperLimit", upperLimit, "Upper limit (rad for revolute and "
90  "meter for prismatic)", pi<float>());
91  }
92 
93  std::string name;
97  std::string parent;
98  std::string child;
99  float lowerLimit;
100  float upperLimit;
101 };
102 
104 typedef boost::shared_ptr<Joint> JointPtr;
105 
107 
108 }}
109 
110 #endif
RigidTransform< float, 3 > Pose3
Can rotate about the given axis with no given limits.
Definition: Joint.h:71
Pose3 origin
Specifies the transform from child link to parent link.
Definition: Joint.h:95
Type type
The joint&#39;s type.
Definition: Joint.h:94
Can move/slide along the given axis but is limited by upper and lower limit.
Definition: Joint.h:72
A joint class that connects two links.
Definition: Joint.h:64
Can move freely in all degrees of freedom.
Definition: Joint.h:73
float upperLimit
Upper limit for REVOLUTE (rad) and PRISMATIC (meter) joints.
Definition: Joint.h:100
PropertyHint type(const std::string &t)
RigidModel export macro declaration.
std::string name
Name of the joint.
Definition: Joint.h:93
std::string child
Child link.
Definition: Joint.h:98
Can rotate about the given axis but is limited by upper and lower limit.
Definition: Joint.h:70
For a fixed joint all degrees of freedom are locked and its state is fixed.
Definition: Joint.h:69
float lowerLimit
Lower limit for REVOLUTE (rad) and PRISMATIC (meter) joints.
Definition: Joint.h:99
Point3f axis
Axis of rotation for REVOLUTE and CONTINUOUS joints, axis of translation for PRISMATIC joints...
Definition: Joint.h:96
#define MIRA_RIGID_MODEL_EXPORT
Definition: RigidModelExports.h:61
boost::shared_ptr< Joint > JointPtr
Pointer to a joint.
Definition: Joint.h:104
Point< float, 3 > Point3f
EIGEN_MAKE_ALIGNED_OPERATOR_NEW void reflect(Reflector &r)
Definition: Joint.h:79
std::string parent
Parent link.
Definition: Joint.h:97
Type
Definition: Joint.h:67