kinematics-dynamics
MatrixExponential.hpp
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 #ifndef __MATRIX_EXPONENTIAL_HPP__
4 #define __MATRIX_EXPONENTIAL_HPP__
5 
6 #include <kdl/frames.hpp>
7 
8 namespace roboticslab
9 {
10 
19 {
20 public:
22  enum motion
23  {
26  };
27 
36  MatrixExponential(motion motionType, const KDL::Vector & axis, const KDL::Vector & origin = KDL::Vector::Zero());
37 
45  KDL::Frame asFrame(double theta) const;
46 
53  { return motionType; }
54 
60  const KDL::Vector & getAxis() const
61  { return axis; }
62 
68  const KDL::Vector & getOrigin() const
69  { return origin; }
70 
78  void changeBase(const KDL::Frame & H_new_old);
79 
89  MatrixExponential cloneWithBase(const KDL::Frame & H_new_old) const;
90 
91 private:
92  motion motionType;
93  KDL::Vector axis;
94  KDL::Vector origin;
95 };
96 
97 } // namespace roboticslab
98 
99 #endif // __MATRIX_EXPONENTIAL_HPP__
Abstraction of a term in a product of exponentials (POE) formula.
Definition: MatrixExponential.hpp:19
MatrixExponential cloneWithBase(const KDL::Frame &H_new_old) const
Clones this instance and refers the internal coordinates of the screw to a different base.
Definition: MatrixExponential.cpp:70
motion
Lists available screw motion types.
Definition: MatrixExponential.hpp:23
@ TRANSLATION
Prismatic joint (infinite-pitch twist).
Definition: MatrixExponential.hpp:25
@ ROTATION
Revolute joint (zero-pitch twist).
Definition: MatrixExponential.hpp:24
KDL::Frame asFrame(double theta) const
Evaluates this term for the given magnitude of the screw.
Definition: MatrixExponential.cpp:36
const KDL::Vector & getOrigin() const
A point along the screw axis.
Definition: MatrixExponential.hpp:68
const KDL::Vector & getAxis() const
Screw axis.
Definition: MatrixExponential.hpp:60
motion getMotionType() const
Retrieves the motion type of this screw.
Definition: MatrixExponential.hpp:52
void changeBase(const KDL::Frame &H_new_old)
Refers the internal coordinates of this screw to a different base.
Definition: MatrixExponential.cpp:58
MatrixExponential(motion motionType, const KDL::Vector &axis, const KDL::Vector &origin=KDL::Vector::Zero())
Constructor.
Definition: MatrixExponential.cpp:26
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:6