momentumopt
OrientationUtils.hpp
Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include <Eigen/Geometry>
12 
13 namespace momentumopt {
14 
18  Eigen::Vector3d orientationError(const Eigen::Quaternion<double>& desired_orientation,
19  const Eigen::Quaternion<double>& current_orientation);
20 
25  Eigen::Vector3d requiredAngularVelocity(const Eigen::Quaternion<double>& desired_orientation,
26  const Eigen::Quaternion<double>& current_orientation,
27  const double& time_step, bool in_body_coordinates=false);
28 
32  Eigen::Quaternion<double> integrateAngularVelocity(const Eigen::Quaternion<double>& current_orientation,
33  const Eigen::Vector3d& angular_velocity,
34  const double& time_step, bool in_body_coordinates=false);
35 
36 }
Eigen::Vector3d requiredAngularVelocity(const Eigen::Quaternion< double > &desired_orientation, const Eigen::Quaternion< double > &current_orientation, const double &time_step, bool in_body_coordinates=false)
computation of the required angular velocity to move from a current orientation to a desired orientat...
Definition: OrientationUtils.cpp:111
Eigen::Vector3d orientationError(const Eigen::Quaternion< double > &desired_orientation, const Eigen::Quaternion< double > &current_orientation)
computes the error between two quaternions by rotating the desired orientation back by the current or...
Definition: OrientationUtils.cpp:142
Eigen::Quaternion< double > integrateAngularVelocity(const Eigen::Quaternion< double > &current_orientation, const Eigen::Vector3d &angular_velocity, const double &time_step, bool in_body_coordinates=false)
integration of a quaternion given an angular velocity given either in body or world coordinates and a...
Definition: OrientationUtils.cpp:127