Functions¶
-
namespace
MuJoCo¶ General helper functions for the MuJoCo classes
Functions
-
bool
get_activation_key_path(std::string &path)¶ Search a few known places for an activation key
- Return
True if key found, false otherwise
- Parameters
[out] path: Path to the key, only if found
-
Eigen::VectorXd
mujoco_to_eigen(const mjtNum *num, int size)¶ Turn MuJoCo vector into Eigen vector
- Parameters
num: mjtNum Arraysize: Size of the array
-
void
eigen_copy(mjtNum *res, const Eigen::VectorXd &vec, int n = 0)¶ Copy Eigen vector to MuJoCo vector
- Parameters
res: Pointer to resulting arrayvec: Eigen vectorn: Size of vector (optional, only for assert)
-
Eigen::VectorXd
psuedo_inverse_mult(Eigen::MatrixXd A, Eigen::VectorXd b)¶ Perform multiplication with pseudo-inverse of matrix
Moore-Penrose inverse is used.
- Parameters
A: Matrix to be invertedb: Vector to be multiplied with
-
Eigen::Vector4d
euler_to_quaternion(double x, double y, double z)¶ Convert Z, Y’, X’’ Euler angles to quaternion
- Parameters
x: X’’ angley: Y’ anglez: Z angle
-
Eigen::Vector4d
euler_to_quaternion(const Eigen::Vector3d &euler)¶ Convert Z, Y’, X’’ Euler angles to quaternion
- Parameters
euler: (X, Y, Z) Euler angles
-
Eigen::Vector3d
quaternion_to_euler(const Eigen::Vector4d &quat)¶ Convert quaternion to Z, Y’, X’’ Euler anlges
-
bool