kinematics-dynamics
Loading...
Searching...
No Matches
KinematicRepresentation.hpp
1// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
3#ifndef __KINEMATIC_REPRESENTATION_HPP__
4#define __KINEMATIC_REPRESENTATION_HPP__
5
6#include <string>
7#include <vector>
8
23{
24
27{
28 CARTESIAN,
30 SPHERICAL,
31 NONE
32};
33
45
47enum class angular_units
48{
49 DEGREES,
50 RADIANS
51};
52
68bool encodePose(const std::vector<double> & x_in, std::vector<double> & x_out,
70
85bool decodePose(const std::vector<double> & x_in, std::vector<double> & x_out,
87
104bool encodeVelocity(const std::vector<double> & x_in, const std::vector<double> & xdot_in,
105 std::vector<double> & xdot_out, coordinate_system coord, orientation_system orient,
107
124bool decodeVelocity(const std::vector<double> & x_in, const std::vector<double> & xdot_in,
125 std::vector<double> & xdot_out, coordinate_system coord, orientation_system orient,
127
145bool encodeAcceleration(const std::vector<double> & x_in, const std::vector<double> & xdot_in,
146 const std::vector<double> & xdotdot_in, std::vector<double> & xdotdot_out,
148
167bool decodeAcceleration(const std::vector<double> & x_in, const std::vector<double> & xdot_in,
168 const std::vector<double> & xdotdot_in, std::vector<double> & xdotdot_out,
170
178double degToRad(double deg);
179
187double radToDeg(double rad);
188
205bool parseEnumerator(const std::string & str, coordinate_system * coord,
207
227bool parseEnumerator(const std::string & str, orientation_system * orient,
229
244bool parseEnumerator(const std::string & str, angular_units * units,
246
247} // namespace roboticslab::KinRepresentation
248
249#endif // __KINEMATIC_REPRESENTATION_HPP__
Collection of static methods to perform geometric transformations.
Definition KinematicRepresentation.cpp:72
coordinate_system
Lists available translational representations.
Definition KinematicRepresentation.hpp:27
@ SPHERICAL
(radial distance, polar angle, azimuthal angle)
@ NONE
omit coordinate system in resulting combined coord+orient representation
@ CARTESIAN
(x distance, y distance, z distance)
@ CYLINDRICAL
(radial distance, azimuthal angle, height)
double radToDeg(double rad)
Converts radians to degrees.
Definition KinematicRepresentation.cpp:523
bool encodePose(const std::vector< double > &x_in, std::vector< double > &x_out, coordinate_system coord, orientation_system orient, angular_units angle)
Converts the translation and rotation values of a specific pose to coordinate_system::CARTESIAN and o...
Definition KinematicRepresentation.cpp:76
bool parseEnumerator(const std::string &str, coordinate_system *coord, coordinate_system fallback)
Parses input string, returns matching enumerator value.
Definition KinematicRepresentation.cpp:530
double degToRad(double deg)
Converts degrees to radians.
Definition KinematicRepresentation.cpp:516
bool encodeAcceleration(const std::vector< double > &x_in, const std::vector< double > &xdot_in, const std::vector< double > &xdotdot_in, std::vector< double > &xdotdot_out, coordinate_system coord, orientation_system orient, angular_units angle)
Converts the translation and rotation values of a specific acceleration to coordinate_system::CARTESI...
Definition KinematicRepresentation.cpp:496
orientation_system
Lists available rotational representations.
Definition KinematicRepresentation.hpp:36
@ EULER_YZ
as EULER_ZYZ, preceded by rotation about the azimuthal angle got from x-y coordinates
@ AXIS_ANGLE
(axis_x, axis_y, axis_z, rotation angle) [axis needs not to be normalized]
@ POLAR_AZIMUTH
(polar angle, azimuthal angle)
@ AXIS_ANGLE_SCALED
(axis_x, axis_y, axis_z) [axis' norm is the rotation angle]
bool decodeVelocity(const std::vector< double > &x_in, const std::vector< double > &xdot_in, std::vector< double > &xdot_out, coordinate_system coord, orientation_system orient, angular_units angle)
Converts the translation and rotation values of a specific velocity to the chosen representation syst...
Definition KinematicRepresentation.cpp:403
angular_units
Lists recognized angular units.
Definition KinematicRepresentation.hpp:48
bool encodeVelocity(const std::vector< double > &x_in, const std::vector< double > &xdot_in, std::vector< double > &xdot_out, coordinate_system coord, orientation_system orient, angular_units angle)
Converts the translation and rotation values of a specific velocity to coordinate_system::CARTESIAN a...
Definition KinematicRepresentation.cpp:307
bool decodePose(const std::vector< double > &x_in, std::vector< double > &x_out, coordinate_system coord, orientation_system orient, angular_units angle)
Converts the translation and rotation values of a specific pose to the chosen representation systems.
Definition KinematicRepresentation.cpp:187
bool decodeAcceleration(const std::vector< double > &x_in, const std::vector< double > &xdot_in, const std::vector< double > &xdotdot_in, std::vector< double > &xdotdot_out, coordinate_system coord, orientation_system orient, angular_units angle)
Converts the translation and rotation values of a specific acceleration to the chosen representation ...
Definition KinematicRepresentation.cpp:506