|
Ctrl-Z
一个多线程机器人运动控制强化学习部署框架
|
math namespace, contains some math functions 更多...
类 | |
| class | Tensor |
| Tensor class, used to store tensor data 更多... | |
| class | Tensor< bool, Dims... > |
| Bool Tensor class, used to store bool type tensor data 更多... | |
| class | TensorBase |
| TensorBase class, base class for tensor 更多... | |
| struct | TensorShape |
| TensorShape struct, used to store tensor shape information 更多... | |
| class | Vector |
| Vector class, support some vector operations, like dot, cross, normalize, etc. 更多... | |
| class | Vector< bool, N > |
| Vector class for bool type, support some vector logical operations etc. 更多... | |
函数 | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 3 > | cross (const z::math::Vector< Scalar, 3 > &a, const z::math::Vector< Scalar, 3 > &b) |
| cross product of two 3D vectors. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 4 > | quat_conjugate (const z::math::Vector< Scalar, 4 > &quat) |
| Compute the conjugate of a quaternion. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 4 > | quat_unit (const z::math::Vector< Scalar, 4 > &quat) |
| Normalize a quaternion to unit length. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 4 > | quat_mul (const z::math::Vector< Scalar, 4 > &a, const z::math::Vector< Scalar, 4 > &b) |
| Multiply two quaternions. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 3 > | quat_rotate (const z::math::Vector< Scalar, 4 > &q, const z::math::Vector< Scalar, 3 > &v) |
| Rotate a 3D vector by a quaternion. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 3 > | quat_rotate_inverse (const z::math::Vector< Scalar, 4 > &q, const z::math::Vector< Scalar, 3 > &v) |
| Rotate a 3D vector by the inverse of a quaternion. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 4 > | quat_from_euler_xyz (const z::math::Vector< Scalar, 3 > &euler) |
| Convert Euler angles (in radians) to quaternion representation. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 3 > | get_euler_xyz (const z::math::Vector< Scalar, 4 > &quat) |
| Convert quaternion representation to Euler angles (in radians). | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 3 > | so3_from_quat (const z::math::Vector< Scalar, 4 > &quat) |
| Convert a quaternion to an so(3) vector representation. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 4 > | so3_to_quat (const z::math::Vector< Scalar, 3 > &so3) |
| Convert an so(3) vector representation to a quaternion. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 4 > | quat_slerp (const z::math::Vector< Scalar, 4 > &a, const z::math::Vector< Scalar, 4 > &b, Scalar t) |
| Perform spherical linear interpolation (SLERP) between two quaternions. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 4 > | quat_diff (const z::math::Vector< Scalar, 4 > &a, const z::math::Vector< Scalar, 4 > &b) |
| Compute the difference between two quaternions, ensuring the shortest path. | |
| template<typename Scalar> | |
| z::math::Vector< Scalar, 3 > | so3_diff (const z::math::Vector< Scalar, 3 > &a, const z::math::Vector< Scalar, 3 > &b) |
| Compute the difference between two so(3) vectors, ensuring the shortest path. | |
| template<typename T, size_t... Ns> | |
| constexpr auto | cat (const std::array< T, Ns > &... arrays) |
| concatenate multiple std::array | |
| template<typename T, size_t ... Ns> | |
| constexpr auto | cat (Vector< T, Ns > &... vectors) |
| concatenate multiple z Vector | |
math namespace, contains some math functions
|
constexpr |
concatenate multiple std::array
| T | type |
| Ns | length of arrays |
| arrays | arrays |
|
constexpr |
| z::math::Vector< Scalar, 3 > z::math::cross | ( | const z::math::Vector< Scalar, 3 > & | a, |
| const z::math::Vector< Scalar, 3 > & | b ) |
cross product of two 3D vectors.
| Scalar | Type of the scalar (e.g., float, double). |
| a | 3D vector a |
| b | 3D vector b |
| z::math::Vector< Scalar, 3 > z::math::get_euler_xyz | ( | const z::math::Vector< Scalar, 4 > & | quat | ) |
Convert quaternion representation to Euler angles (in radians).
| Scalar | Type of the scalar (e.g., float, double). |
| quat | A vector containing the quaternion representation in XYZW format. |
| z::math::Vector< Scalar, 4 > z::math::quat_conjugate | ( | const z::math::Vector< Scalar, 4 > & | quat | ) |
Compute the conjugate of a quaternion.
| Scalar | Type of the scalar (e.g., float, double). |
| quat | A quaternion represented as a vector in XYZW format. |
| z::math::Vector< Scalar, 4 > z::math::quat_diff | ( | const z::math::Vector< Scalar, 4 > & | a, |
| const z::math::Vector< Scalar, 4 > & | b ) |
Compute the difference between two quaternions, ensuring the shortest path.
| Scalar | Type of the scalar (e.g., float, double). |
| a | quaternion a represented as the first quaternion in XYZW format. |
| b | quaternion b represented as the second quaternion in XYZW format. |
| z::math::Vector< Scalar, 4 > z::math::quat_from_euler_xyz | ( | const z::math::Vector< Scalar, 3 > & | euler | ) |
Convert Euler angles (in radians) to quaternion representation.
| Scalar | Type of the scalar (e.g., float, double). |
| euler | A vector containing the Euler angles in radians, in the order of (roll, pitch, yaw). |
| z::math::Vector< Scalar, 4 > z::math::quat_mul | ( | const z::math::Vector< Scalar, 4 > & | a, |
| const z::math::Vector< Scalar, 4 > & | b ) |
Multiply two quaternions.
| Scalar | Type of the scalar (e.g., float, double). |
| a | A quaternion represented as a vector in XYZW format. |
| b | Another quaternion represented as a vector in XYZW format. |
| z::math::Vector< Scalar, 3 > z::math::quat_rotate | ( | const z::math::Vector< Scalar, 4 > & | q, |
| const z::math::Vector< Scalar, 3 > & | v ) |
Rotate a 3D vector by a quaternion.
| Scalar | Type of the scalar (e.g., float, double). |
| quat | A quaternion represented as a vector in XYZW format. |
| vec | A 3D vector to be rotated by the quaternion. |
| z::math::Vector< Scalar, 3 > z::math::quat_rotate_inverse | ( | const z::math::Vector< Scalar, 4 > & | q, |
| const z::math::Vector< Scalar, 3 > & | v ) |
Rotate a 3D vector by the inverse of a quaternion.
| Scalar | Type of the scalar (e.g., float, double). |
| quat | A quaternion represented as a vector in XYZW format. |
| vec | A 3D vector to be rotated by the inverse of the quaternion. |
| z::math::Vector< Scalar, 4 > z::math::quat_slerp | ( | const z::math::Vector< Scalar, 4 > & | a, |
| const z::math::Vector< Scalar, 4 > & | b, | ||
| Scalar | t ) |
Perform spherical linear interpolation (SLERP) between two quaternions.
| Scalar | Type of the scalar (e.g., float, double). |
| a | quaternion a represented as begin interpolation quaternion in XYZW format. |
| b | quaternion b represented as end interpolation quaternion in XYZW format. |
| t | interpolation parameter, where t = 0 corresponds to a and t = 1 corresponds to b. |
| z::math::Vector< Scalar, 4 > z::math::quat_unit | ( | const z::math::Vector< Scalar, 4 > & | quat | ) |
Normalize a quaternion to unit length.
| Scalar | Type of the scalar (e.g., float, double). |
| quat | A quaternion represented as a vector in XYZW format. |
| std::runtime_error | If the quaternion norm is zero, indicating it cannot be normalized. |
| z::math::Vector< Scalar, 3 > z::math::so3_diff | ( | const z::math::Vector< Scalar, 3 > & | a, |
| const z::math::Vector< Scalar, 3 > & | b ) |
Compute the difference between two so(3) vectors, ensuring the shortest path.
| Scalar | Type of the scalar (e.g., float, double). |
| a | so(3) vector a represented as the first vector in 3D space. |
| b | so(3) vector b represented as the second vector in 3D space. |
| z::math::Vector< Scalar, 3 > z::math::so3_from_quat | ( | const z::math::Vector< Scalar, 4 > & | quat | ) |
Convert a quaternion to an so(3) vector representation.
| Scalar | Type of the scalar (e.g., float, double). |
| quat | A quaternion represented as a vector in XYZW format. |
| z::math::Vector< Scalar, 4 > z::math::so3_to_quat | ( | const z::math::Vector< Scalar, 3 > & | so3 | ) |
Convert an so(3) vector representation to a quaternion.
| Scalar | Type of the scalar (e.g., float, double). |
| so3 | A vector representing the so(3) representation of a rotation. |