lebai-motion-control  3.1.6
lebai motion control C interface
lmc_math.h
Go to the documentation of this file.
1 
8 #ifndef LMC_MATH
9 #define LMC_MATH
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* __cplusplus */
14 
29 typedef struct lmc_translation {
30  double x;
31  double y;
32  double z;
34 
40 typedef struct lmc_rpy {
41  double r;
42  double p;
43  double y;
44 } lmc_rpy_t;
45 
51 typedef struct lmc_euler_zyx {
52  double alpha;
53  double beta;
54  double gamma;
56 
62 typedef struct lmc_euler_zyz {
63  double alpha;
64  double beta;
65  double gamma;
67 
73 typedef struct lmc_quaternion {
74  double x;
75  double y;
76  double z;
77  double w;
79 
86 typedef struct lmc_transform {
90 
96 typedef struct lmc_twist {
99 } lmc_twist_t;
100 
106 typedef struct lmc_wrench {
109 } lmc_wrench_t;
110 
127 void lmc_euler_zyx_to_quaternion(lmc_euler_zyx_t const* const euler,
128  lmc_quaternion_t* const quat);
129 
143 void lmc_quaternion_to_euler_zyx(lmc_quaternion_t const* const quat,
144  lmc_euler_zyx_t* const euler);
145 
162 void lmc_euler_zyx_to_euler_zyz(lmc_euler_zyx_t const* const euler_zyx,
163  lmc_euler_zyz_t* const euler_zyz);
164 
178 void lmc_euler_zyz_to_euler_zyx(lmc_euler_zyz_t const* const euler_zyz,
179  lmc_euler_zyx_t* const euler_zyx);
180 
197 void lmc_euler_zyz_to_quaternion(lmc_euler_zyz_t const* const euler,
198  lmc_quaternion_t* const quat);
199 
213 void lmc_quaternion_to_euler_zyz(lmc_quaternion_t const* const quat,
214  lmc_euler_zyz_t* const euler);
215 
216 // /**
217 // * Example usage code:
218 // *
219 // * lmc_quaternion_t quaternion;
220 // * lmc_euler_t euler_result;
221 // * lmc_quaternion_to_euler(&quaternion, &euler_result);
222 // *
223 // *
224 // * \brief Math function to transfomr a twist(cartesian velocity).
225 // * \param[in] t_in: twist in coodinate.
226 // * \param[in] transform: coodinate pose.
227 // * \param[out] t_out: Euler zyx data output.
228 // */
229 // void lmc_transform_twist(lmc_twist_t const* const t, lmc_transform_t const*
230 // const transform,lmc_twist_t * const t_out);
231 
234 #ifdef __cplusplus
235 }
236 #endif /* __cplusplus */
237 
238 #endif /* LMC_MATH */
Cartesian translation coordinate.
Definition: lmc_math.h:29
struct lmc_transform lmc_transform_t
Transform representation.
void lmc_quaternion_to_euler_zyz(lmc_quaternion_t const *const quat, lmc_euler_zyz_t *const euler)
Math function to compute euler zyx to quaternion.
struct lmc_wrench lmc_wrench_t
Transform force representation.
double alpha
Definition: lmc_math.h:52
Euler zyx representation of rotation.
Definition: lmc_math.h:62
double y
Definition: lmc_math.h:43
double beta
Definition: lmc_math.h:53
double r
Definition: lmc_math.h:41
double p
Definition: lmc_math.h:42
lmc_euler_zyx_t rotation
Definition: lmc_math.h:87
Quaternion representation of rotation.
Definition: lmc_math.h:73
lmc_translation_t pose
Definition: lmc_math.h:88
double alpha
Definition: lmc_math.h:63
lmc_translation_t force
Definition: lmc_math.h:107
Transform velocity representation.
Definition: lmc_math.h:96
double gamma
Definition: lmc_math.h:65
void lmc_euler_zyx_to_quaternion(lmc_euler_zyx_t const *const euler, lmc_quaternion_t *const quat)
Math function to compute euler zyx to quaternion.
struct lmc_translation lmc_translation_t
Cartesian translation coordinate.
double x
Definition: lmc_math.h:74
lmc_translation_t rot
Definition: lmc_math.h:98
Transform force representation.
Definition: lmc_math.h:106
lmc_translation_t trans
Definition: lmc_math.h:97
void lmc_euler_zyz_to_euler_zyx(lmc_euler_zyz_t const *const euler_zyz, lmc_euler_zyx_t *const euler_zyx)
Math function to compute euler zyz to euler zyx.
double gamma
Definition: lmc_math.h:54
struct lmc_twist lmc_twist_t
Transform velocity representation.
double y
Definition: lmc_math.h:75
Euler zyx representation of rotation.
Definition: lmc_math.h:51
void lmc_quaternion_to_euler_zyx(lmc_quaternion_t const *const quat, lmc_euler_zyx_t *const euler)
Math function to compute euler zyx to quaternion.
struct lmc_euler_zyx lmc_euler_zyx_t
Euler zyx representation of rotation.
struct lmc_euler_zyz lmc_euler_zyz_t
Euler zyx representation of rotation.
lmc_translation_t torque
Definition: lmc_math.h:108
RPY representation of rotation.
Definition: lmc_math.h:40
Transform representation.
Definition: lmc_math.h:86
void lmc_euler_zyx_to_euler_zyz(lmc_euler_zyx_t const *const euler_zyx, lmc_euler_zyz_t *const euler_zyz)
Math function to compute euler zyx to zyz.
double z
Definition: lmc_math.h:76
double w
Definition: lmc_math.h:77
struct lmc_rpy lmc_rpy_t
RPY representation of rotation.
double beta
Definition: lmc_math.h:64
void lmc_euler_zyz_to_quaternion(lmc_euler_zyz_t const *const euler, lmc_quaternion_t *const quat)
Math function to compute euler zyx to quaternion.
struct lmc_quaternion lmc_quaternion_t
Quaternion representation of rotation.