Go to the documentation of this file.
9 #ifndef mrpt_CKinematicChain_H
10 #define mrpt_CKinematicChain_H
45 double _theta,
double _d,
double _a,
double _alpha,
bool _is_prismatic)
94 double theta,
double d,
double a,
double alpha,
bool is_prismatic);
121 template <
class VECTOR>
124 const size_t N =
m_links.size();
126 for (
size_t i = 0; i < N; i++)
144 template <
class VECTOR>
148 const size_t N =
m_links.size();
149 for (
size_t i = 0; i < N; i++)
double a
Distance along the common normal (in the same direction than the new X_{i+1})
void addLink(double theta, double d, double a, double alpha, bool is_prismatic)
Appends a new link to the robotic arm, with the given Denavit-Hartenberg parameters (see TKinematicLi...
void setConfiguration(const VECTOR &v)
Set all the DOFs of the arm at once, from a vector with all the "q_i" values, which are interpreted a...
double theta
Rotation from X_i to X_{i+1} (radians)
A open-loop kinematic chain model, suitable to robotic manipulators.
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &out, const TKinematicLink &o)
const mrpt::poses::CPose3D & getOriginPose() const
Returns the current pose of the first link.
bool is_prismatic
"false": Is revolute ("q_i" is "theta"), "true": is prismatic ("q_i" is "d")
void setOriginPose(const mrpt::poses::CPose3D &new_pose)
Can be used to define a first degree of freedom along a +Z axis which does not coincide with the glob...
TKinematicLink(double _theta, double _d, double _a, double _alpha, bool _is_prismatic)
#define MRPT_DECLARE_TTYPENAME_NAMESPACE(_TYPE, __NS)
Declares a typename to be "namespace::type".
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
double d
Distance along Z_i to the common normal between Z_i and Z_{i+1}.
const TKinematicLink & getLink(const size_t idx) const
Get a ref to a given link (read-only)
GLclampf GLclampf GLclampf alpha
size_t size() const
Return the number of links.
Virtual base class for "archives": classes abstracting I/O streams.
std::vector< T, mrpt::aligned_allocator_cpp11< T > > aligned_std_vector
std::vector< mrpt::opengl::CRenderizable::Ptr > m_last_gl_objects
Smart pointers to the last objects for each link, as returned in getAs3DObject(), for usage within up...
void clear()
Erases all links and leave the robot arm empty.
std::vector< TKinematicLink > m_links
The links of this robot arm.
void update3DObject(mrpt::aligned_std_vector< mrpt::poses::CPose3D > *out_all_poses=nullptr) const
Read getAs3DObject() for a description.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
The virtual base class which provides a unified interface for all persistent objects in MRPT.
std::shared_ptr< CSetOfObjects > Ptr
double alpha
Rotation along X_{i+1} to transform Z_i into Z_{i+1}.
void recomputeAllPoses(mrpt::aligned_std_vector< mrpt::poses::CPose3D > &poses, const mrpt::poses::CPose3D &pose0=mrpt::poses::CPose3D()) const
Go thru all the links of the chain and compute the global pose of each link.
void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr &inout_gl_obj, mrpt::aligned_std_vector< mrpt::poses::CPose3D > *out_all_poses=nullptr) const
Constructs a 3D representation of the kinematic chain, in its current state.
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, TKinematicLink &o)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void removeLink(const size_t idx)
Removes one link from the kinematic chain (0<=idx<N)
mrpt::poses::CPose3D m_origin
The pose of the first link.
TKinematicLink & getLinkRef(const size_t idx)
Get a ref to a given link (read-write)
An individual kinematic chain element (one link) which builds up a CKinematicChain.
GLubyte GLubyte GLubyte a
void getConfiguration(VECTOR &v) const
Get all the DOFs of the arm at once, returning them in a vector with all the "q_i" values,...
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |