bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
rotations.h
Go to the documentation of this file.
1#ifndef BITSIM_GEOMETRY_ROTATIONS_H
2#define BITSIM_GEOMETRY_ROTATIONS_H
3
13
14#include "bitsim/bitsim_config.h"
15
16#ifdef BITSIM_CHRONO
17
18#include "bitsim/bitsim_types.h"
19
20#include <chrono/core/ChMatrix33.h>
21
22namespace bitsim
23{
24namespace geometry
25{
26
34chrono::ChMatrix33d rot_x(real_t angle);
35
43chrono::ChMatrix33d rot_y(real_t angle);
44
52chrono::ChMatrix33d rot_z(real_t angle);
53
58bool is_rotation(const chrono::ChMatrix33d &R, real_t tolerance = 1.0e-9);
59
63bool same_matrix(const chrono::ChMatrix33d &A, const chrono::ChMatrix33d &B,
64 real_t tolerance = 1.0e-9);
65
71{
72 real_t yaw{0.0};
75};
76
80chrono::ChMatrix33d from_yaw_pitch_roll(const YawPitchRoll &angles);
81
86YawPitchRoll to_yaw_pitch_roll(const chrono::ChMatrix33d &R);
87
88} // namespace geometry
89} // namespace bitsim
90
91#endif // BITSIM_CHRONO
92#endif // BITSIM_GEOMETRY_ROTATIONS_H
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
Definition generic_line.h:16
YawPitchRoll to_yaw_pitch_roll(const chrono::ChMatrix33d &R)
The inverse of from_yaw_pitch_roll, with the pitch in [-90, 90] degrees. It is not defined at a pitch...
Definition rotations.cpp:64
chrono::ChMatrix33d rot_y(real_t angle)
The rotation by angle [rad] about the y axis.
Definition rotations.cpp:24
bool is_rotation(const chrono::ChMatrix33d &R, real_t tolerance)
Whether R is a rotation: and , to within tolerance. An orthogonal matrix with determinant -1 is a mi...
Definition rotations.cpp:48
bool same_matrix(const chrono::ChMatrix33d &A, const chrono::ChMatrix33d &B, real_t tolerance)
Whether A and B are equal to within tolerance, in the Frobenius norm.
Definition rotations.cpp:54
chrono::ChMatrix33d from_yaw_pitch_roll(const YawPitchRoll &angles)
The rotation .
Definition rotations.cpp:59
chrono::ChMatrix33d rot_z(real_t angle)
The rotation by angle [rad] about the z axis.
Definition rotations.cpp:36
chrono::ChMatrix33d rot_x(real_t angle)
The rotation by angle [rad] about the x axis. It leaves the x axis unchanged:
Definition rotations.cpp:12
Definition dc_motor_backend_base.h:9
double real_t
real_t
Definition bitsim_types.h:20
Yaw, pitch and roll angles [rad]: the rotation is .
Definition rotations.h:71
real_t roll
Definition rotations.h:74
real_t yaw
Definition rotations.h:72
real_t pitch
Definition rotations.h:73