AUTh-ARL Core Stack  0.7
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
arl::utils Namespace Reference

The namespace having miscellaneous code which does not have a specific category. More...

Classes

class  Timer
 Provides timing capabilities, like measure the time elapsed since the last call (e.g. useful in a control loop). More...
 

Functions

void armaToEigen (const arma::mat &arma, Eigen::MatrixXd *eigen)
 
void armaToEigen (const arma::vec &arma, Eigen::VectorXd *eigen)
 
void eigenToArma (const Eigen::MatrixXd &eigen, arma::mat *arma)
 
void eigenToArma (const Eigen::VectorXd &eigen, arma::vec *arma)
 
void armaToRos (const arma::mat &arma, sensor_msgs::PointCloud *ros, const std::string &frame_id="world")
 Converts an arma matrix to a PointCloud ROS msg. More...
 
void armaToRos (const arma::mat &arma, geometry_msgs::PolygonStamped *ros, const std::string &frame_id="world")
 Converts an arma matrix to a PolygonStamped message. More...
 
void rosToArma (const sensor_msgs::PointCloud &ros, arma::mat *arma)
 Converts a ROS PointCloud msg to an arma matrix. More...
 
void rosToArma (const geometry_msgs::PolygonStamped &ros, arma::mat *arma)
 Converts a PolygonStamped message to an arma matrix. More...
 
void rosToArma (const geometry_msgs::TransformStamped &ros, arma::mat *arma)
 Converts a geometry_msgs/TransformStamped message to an arma matrix. More...
 
void rosToArma (const geometry_msgs::PoseStamped &ros, arma::mat *arma)
 Converts a geometry_msgs/PoseStamped message to an arma matrix. More...
 
void armaToRos (const arma::mat &arma, geometry_msgs::PoseStamped *ros, const std::string &frame_id="world")
 Converts an arma matrix to a geometry_msgs/PoseStamped. More...
 
void armaToKdl (const arma::vec &arma, KDL::Vector *kdl)
 Converts an arma vector to a KDL Vector. More...
 
void armaToKdl (const arma::mat &arma, KDL::Rotation *kdl)
 Converts a armadillo 3D matrix to a KDL Rotation matrix. More...
 
void armaToKdl (const arma::mat &arma, KDL::Frame *kdl)
 Converts an arma homogeneous transformation (4x4 matrix) to a KDL Frame. More...
 
void armaToKdl (const arma::vec &arma, KDL::Wrench *kdl)
 
void armaToKdl (const arma::vec &arma, KDL::Twist *kdl)
 
void armaToKdl (const arma::mat &arma, KDL::Jacobian *kdl)
 
void armaToKdl (const arma::vec &arma, KDL::JntArray *kdl)
 
void kdlToArma (const KDL::Vector &kdl, arma::vec *arma)
 Converts a KDL vector to an arma vector. More...
 
void kdlToArma (const KDL::Rotation &kdl, arma::mat *arma)
 Converts a KDL Rotation to an arma matrix. More...
 
void kdlToArma (const KDL::Frame &kdl, arma::mat *arma)
 Converts a KDL Frame to an arma homogeneous transformation (4x4 matrix). More...
 
void kdlToArma (const KDL::Wrench &kdl, arma::vec *arma)
 
void kdlToArma (const KDL::Twist &kdl, arma::vec *arma)
 
void kdlToArma (const KDL::Jacobian &kdl, arma::mat *arma)
 
void kdlToArma (const KDL::JntArray &kdl, arma::vec *arma)
 
void kdlToEigen (const KDL::Vector &kdl, Eigen::Vector3d *eigen)
 
void kdlToEigen (const KDL::Rotation &kdl, Eigen::Matrix3d *eigen)
 
void kdlToEigen (const KDL::JntArray &kdl, Eigen::VectorXd *eigen)
 
void rosToKdl (const geometry_msgs::Vector3 &ros, KDL::Vector *kdl)
 Converts a ROS vector (geometry_msgs Vector3) to a KDL Vector. More...
 
void rosToKdl (const geometry_msgs::Point &ros, KDL::Vector *kdl)
 Converts a ROS Point (geometry_msgs Point) to a KDL Vector. More...
 
bool rosToKdl (const geometry_msgs::Quaternion &ros, KDL::Rotation *kdl, double eps=1e-6)
 Converts a ROS Quaternion (geometry_msgs Quaternion) to a KDL Rotation. It will perform the conversion even if the quaternion is not unit. More...
 
bool rosToKdl (const geometry_msgs::Pose &ros, KDL::Frame *kdl, double eps=1e-6)
 Converts a ROS Pose (geometry_msgs Pose) to a KDL Frame. It will perform the conversion even if the quaternion of the pose is not unit. More...
 
void kdlToRos (const KDL::Vector &kdl, geometry_msgs::Vector3 *ros)
 Converts a KDL vector to a ROS Vector (geometry_msgs Vector3) More...
 
void kdlToRos (const KDL::Vector &kdl, geometry_msgs::Point *ros)
 Converts a KDL vector to a ROS Point (geometry_msgs Point) More...
 
bool kdlToRos (const KDL::Rotation &kdl, geometry_msgs::Quaternion *ros, double eps=1e-6)
 Converts a KDL Rotation to a ROS Quaternion (geometry_msgs Quaternion). It will perform the conversion even if the rotation is not legit. More...
 
bool kdlToRos (const KDL::Frame &kdl, geometry_msgs::Pose *ros, double eps=1e-6)
 Converts a KDL Frame to a ROS pose (geometry_msgs Pose). It will perform the conversion even if the rotation matrix of the frame is not legit. More...
 
std::string getAlias (const std::string &name)
 

Detailed Description

The namespace having miscellaneous code which does not have a specific category.

For example transformation between different data types (from KDL to Armadillo).

Function Documentation

void arl::utils::armaToKdl ( const arma::vec &  arma,
KDL::Vector *  kdl 
)
inline

Converts an arma vector to a KDL Vector.

Parameters
rosThe arma vector as input
kdlThe KDL vector as ouput
void arl::utils::armaToKdl ( const arma::mat &  arma,
KDL::Rotation *  kdl 
)
inline

Converts a armadillo 3D matrix to a KDL Rotation matrix.

Parameters
armaThe arma matrix as input
kdlThe KDL rotation matrix as ouput
void arl::utils::armaToKdl ( const arma::mat &  arma,
KDL::Frame *  kdl 
)
inline

Converts an arma homogeneous transformation (4x4 matrix) to a KDL Frame.

Parameters
armaThe arma homogeneous transformation as input
kdlThe KDL Frame as ouput
void arl::utils::armaToKdl ( const arma::vec &  arma,
KDL::Wrench *  kdl 
)
inline
void arl::utils::armaToKdl ( const arma::vec &  arma,
KDL::Twist *  kdl 
)
inline
void arl::utils::armaToKdl ( const arma::mat &  arma,
KDL::Jacobian *  kdl 
)
inline
void arl::utils::armaToKdl ( const arma::vec &  arma,
KDL::JntArray *  kdl 
)
inline
void arl::utils::kdlToArma ( const KDL::Vector &  kdl,
arma::vec *  arma 
)
inline

Converts a KDL vector to an arma vector.

Parameters
kdlThe KDL vector as input
armaThe arma vector as output
void arl::utils::kdlToArma ( const KDL::Rotation &  kdl,
arma::mat *  arma 
)
inline

Converts a KDL Rotation to an arma matrix.

Parameters
kdlThe KDL Rotation as input
armaThe arma matrix as output
void arl::utils::kdlToArma ( const KDL::Frame &  kdl,
arma::mat *  arma 
)
inline

Converts a KDL Frame to an arma homogeneous transformation (4x4 matrix).

Parameters
kdlThe KDL Frame as input
armaThe arma matrix as output
void arl::utils::kdlToArma ( const KDL::Wrench &  kdl,
arma::vec *  arma 
)
inline
void arl::utils::kdlToArma ( const KDL::Twist &  kdl,
arma::vec *  arma 
)
inline
void arl::utils::kdlToArma ( const KDL::Jacobian &  kdl,
arma::mat *  arma 
)
inline
void arl::utils::kdlToArma ( const KDL::JntArray &  kdl,
arma::vec *  arma 
)
inline
void arl::utils::kdlToEigen ( const KDL::Vector &  kdl,
Eigen::Vector3d *  eigen 
)
inline
void arl::utils::kdlToEigen ( const KDL::Rotation &  kdl,
Eigen::Matrix3d *  eigen 
)
inline
void arl::utils::kdlToEigen ( const KDL::JntArray &  kdl,
Eigen::VectorXd *  eigen 
)
inline
void arl::utils::kdlToRos ( const KDL::Vector &  kdl,
geometry_msgs::Vector3 *  ros 
)
inline

Converts a KDL vector to a ROS Vector (geometry_msgs Vector3)

Parameters
kdlThe KDL vector as input
rosThe ROS vector as output
Todo:
To be implemented
void arl::utils::kdlToRos ( const KDL::Vector &  kdl,
geometry_msgs::Point *  ros 
)
inline

Converts a KDL vector to a ROS Point (geometry_msgs Point)

Parameters
kdlThe KDL vector as input
rosThe ROS point as output
Todo:
To be implemented
bool arl::utils::kdlToRos ( const KDL::Rotation &  kdl,
geometry_msgs::Quaternion ros,
double  eps = 1e-6 
)
inline

Converts a KDL Rotation to a ROS Quaternion (geometry_msgs Quaternion). It will perform the conversion even if the rotation is not legit.

Parameters
kdlThe KDL Rotation as input
rosThe ROS Quaternion as output
epsThe tolerance in errors
Returns
True if the rotation is legit, false if the rotation is not legit
Todo:
To be implemented
bool arl::utils::kdlToRos ( const KDL::Frame &  kdl,
geometry_msgs::Pose *  ros,
double  eps = 1e-6 
)
inline

Converts a KDL Frame to a ROS pose (geometry_msgs Pose). It will perform the conversion even if the rotation matrix of the frame is not legit.

Parameters
kdlThe KDL Frame as input
rosThe ROS Pose as output
epsThe tolerance in errors
Returns
True if the rotation of the frame is legit, false if the rotation is not legit
Todo:
To be implemented
void arl::utils::rosToKdl ( const geometry_msgs::Vector3 &  ros,
KDL::Vector *  kdl 
)
inline

Converts a ROS vector (geometry_msgs Vector3) to a KDL Vector.

Parameters
rosThe ROS vector as input
kdlThe KDL vector as ouput
Todo:
To be implemented
void arl::utils::rosToKdl ( const geometry_msgs::Point &  ros,
KDL::Vector *  kdl 
)
inline

Converts a ROS Point (geometry_msgs Point) to a KDL Vector.

Parameters
rosThe ROS point as input
kdlThe KDL vector as ouput
Todo:
To be implemented
bool arl::utils::rosToKdl ( const geometry_msgs::Quaternion ros,
KDL::Rotation *  kdl,
double  eps = 1e-6 
)
inline

Converts a ROS Quaternion (geometry_msgs Quaternion) to a KDL Rotation. It will perform the conversion even if the quaternion is not unit.

Parameters
rosThe ROS point as input
kdlThe KDL vector as ouput
epsThe tolerance in errors
Returns
True if the quaternion is unit, otherwise false
Todo:
To be implemented
bool arl::utils::rosToKdl ( const geometry_msgs::Pose &  ros,
KDL::Frame *  kdl,
double  eps = 1e-6 
)
inline

Converts a ROS Pose (geometry_msgs Pose) to a KDL Frame. It will perform the conversion even if the quaternion of the pose is not unit.

Parameters
rosThe ROS Pose as input
kdlThe KDL Frame as ouput
epsThe tolerance in errors
Returns
True if the quaternion of the pose is unit, otherwise false
Todo:
To be implemented