Kinova_API  v5.02.00
ROS communication with Kinova API
Public Member Functions | List of all members
kinova::KinovaPose Class Reference

Public Member Functions

 KinovaPose (const geometry_msgs::Pose &pose)
 
 KinovaPose (const CartesianInfo &pose)
 
geometry_msgs::Pose constructPoseMsg ()
 
geometry_msgs::Wrench constructWrenchMsg ()
 
bool isCloseToOther (const KinovaPose &, float position_tolerance, float EulerAngle_tolerance) const
 

Constructor & Destructor Documentation

kinova::KinovaPose::KinovaPose ( const geometry_msgs::Pose &  pose)
explicit

obtain KinovaPosefrom geometry_msgs::Pose.

obtain KinovaPose[X,Y,Z,ThetaX,ThetaY,ThetaZ] from geometry_msgs::Pose[x,y,z,qx,qy,qz,qw]. Euler angles[] are extracted from tf::Matrix3x3 EulerYPR = Rz(tz)*Ry(ty)*Rx(tx), where EulerYPR is generated by Quaterion. Units are in meters and radians, The range of Euler angles are [-M_PI, M_PI)

Parameters
geometry_msgsROS standard pose[x,y,z,qx,qy,qz,qw], in meters and quaterion.
kinova::KinovaPose::KinovaPose ( const CartesianInfo &  pose)
explicit

obtain KinovaPosefrom CartesianInfo &pose.

KinovaPose[X,Y,Z,ThetaX,ThetaY,ThetaZ]. position are in meters, and orientation is Euler-ZYX = Rz(ThetaZ)*Ry(ThetaY)*Rx(ThetaX). The range of Euler angles are [-M_PI, M_PI)

Parameters
poseCartesianInfo units are in meters and degrees

Member Function Documentation

geometry_msgs::Pose kinova::KinovaPose::constructPoseMsg ( )

construct geometric::Pose message from KinovaPose

Returns
geometry_msgs::Pose[x,y,z,qx,qy,qz,qw] position in meters, orientation is in Quaternion.
geometry_msgs::Wrench kinova::KinovaPose::constructWrenchMsg ( )

construct geometric::Wrench message from KinovaPose data structure

KinovaPose[X,Y,Z,ThetaX,ThetaY,ThetaZ] doesn't store pose information in this case. Instead, it stores force and torque correspondingly.

Returns
geometry_msgs [Fx,Fy,Fz,Tx,Ty,Tz] in Newton and Nm.
bool kinova::KinovaPose::isCloseToOther ( const KinovaPose other,
float  position_tolerance,
float  EulerAngle_tolerance 
) const

check all the position and orientation values, to determine if current KinovaPose reach "other"

Parameters
otherthe pose to be compared with, normally the motion goal. In meters and radians.
position_tolerancethreshold to be considered as identical between two position values in the same axis.
EulerAngle_tolerancethreshold to be considered as identical between two EulerAngle values along the same axis.
Returns
true if both position and orientation can be considerred identical.