#include <manipulation_transforms.h>
Public Member Functions | |
ManipulationTransforms () | |
Empty constructor for ManipulationTransforms. | |
ManipulationTransforms (const btTransform &obj_initial_pose, const std::vector< btTransform > &effector_initial_poses) | |
Full constructor for ManipulationTransforms. | |
ManipulationTransforms (const btTransform &obj_initial_pose, const btTransform &effector_initial_pose) | |
ManipulationTransforms (const btTransform &obj_initial_pose, const btTransform &effector1_initial_pose, const btTransform &effector2_initial_pose) | |
Wrapper for single effector. | |
double | mapEffectorPosesToObject (const std::vector< btTransform > &effector_query_poses, btTransform &obj_pose) |
Wrapper for twin effectors. | |
double | mapEffectorPosesToObject (const btTransform &effector_query_pose, btTransform &obj_pose) |
double | mapEffectorPosesToObject (const btTransform &effector1_query_pose, const btTransform &effector2_query_pose, btTransform &obj_pose) |
Wrapper for single effector. | |
double | mapEffectorTwistsToObject (const std::vector< KDL::Twist > &effector_query_twists, KDL::Twist &obj_twist, bool from_ref=true) |
Wrapper for twin effectors. | |
double | mapEffectorTwistsToObject (const KDL::Twist &effector_query_twist, KDL::Twist &obj_twist, bool from_ref=true) |
double | mapEffectorTwistsToObject (const KDL::Twist &effector1_query_twist, const KDL::Twist &effector2_query_twist, KDL::Twist &obj_twist, bool from_ref=true) |
Wrapper for single effector. | |
double | mapEffectorWrenchesToObject (const std::vector< KDL::Wrench > &effector_query_wrenches, KDL::Wrench &obj_wrench) |
Finds wrench on the object given wrench at each effector. | |
double | mapObjectPoseToEffectors (const btTransform &obj_query_pose, std::vector< btTransform > &effector_poses) |
Wrapper for twin effectors. | |
double | mapObjectPoseToEffectors (const btTransform &obj_query_pose, btTransform &effector_pose) |
double | mapObjectPoseToEffectors (const btTransform &obj_query_pose, btTransform &effector1_pose, btTransform &effector2_pose) |
Wrapper for single effector. | |
double | mapObjectTwistToEffectors (const KDL::Twist &obj_query_twist, std::vector< KDL::Twist > &effector_twists, bool to_ref=true) |
Wrapper for twin effectors. | |
double | mapObjectTwistToEffectors (const KDL::Twist &obj_query_twist, KDL::Twist &effector_twist, bool to_ref=true) |
double | mapObjectTwistToEffectors (const KDL::Twist &obj_query_twist, KDL::Twist &effector1_twist, KDL::Twist &effector2_twist, bool to_ref=true) |
double | mapObjectWrenchToEffectors (const KDL::Wrench &obj_query_wrench, std::vector< KDL::Wrench > &effector_wrenches) |
Sets effector wrenches given the desired object wrench. | |
void | setInitialTransforms (const btTransform &obj_initial_pose, const std::vector< btTransform > &effector_initial_poses) |
Initializer for ManipulationTransforms. | |
void | setInitialTransforms (const btTransform &obj_initial_pose, const btTransform &effector_initial_pose) |
void | setInitialTransforms (const btTransform &obj_initial_pose, const btTransform &effector1_initial_pose, const btTransform &effector2_initial_pose) |
Wrapper for single effector. | |
virtual | ~ManipulationTransforms () |
Wrapper for twin effectors. | |
Private Attributes | |
std::vector< btTransform > | effector_T_obj_ |
std::vector< btTransform > | effector_T_ref_ |
unsigned int | n_effectors_ |
std::vector< btTransform > | obj_T_effectors_ |
btTransform | obj_T_ref_ |
Definition at line 53 of file manipulation_transforms.h.
Empty constructor for ManipulationTransforms.
ManipulationTransforms.h
Definition at line 47 of file manipulation_transforms.cpp.
ManipulationTransforms::ManipulationTransforms | ( | const btTransform & | obj_initial_pose, |
const std::vector< btTransform > & | effector_initial_poses | ||
) |
Full constructor for ManipulationTransforms.
obj_initial_pose | Transform from reference frame to obj |
effector_initial_poses | vector of transforms from reference frame to each effector |
Definition at line 62 of file manipulation_transforms.cpp.
ManipulationTransforms::ManipulationTransforms | ( | const btTransform & | obj_initial_pose, |
const btTransform & | effector_initial_pose | ||
) |
Definition at line 52 of file manipulation_transforms.cpp.
ManipulationTransforms::ManipulationTransforms | ( | const btTransform & | obj_initial_pose, |
const btTransform & | effector1_initial_pose, | ||
const btTransform & | effector2_initial_pose | ||
) |
Wrapper for single effector.
Definition at line 57 of file manipulation_transforms.cpp.
ManipulationTransforms::~ManipulationTransforms | ( | ) | [virtual] |
Wrapper for twin effectors.
Definition at line 68 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapEffectorPosesToObject | ( | const std::vector< btTransform > & | effector_query_poses, |
btTransform & | obj_pose | ||
) |
Wrapper for twin effectors.
Finds pose of object given effector poses
effector_query_poses | Current poses of each effector |
@ brief Computes obj_pose from effector poses by applying the forward transforms
Get obj pose according to right effector
Combine two rotations equally
Combine mean rotation with mean translation into final transform
Return an error metric based on agreement of rotational and translational components
Definition at line 133 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapEffectorPosesToObject | ( | const btTransform & | effector_query_pose, |
btTransform & | obj_pose | ||
) |
Definition at line 172 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapEffectorPosesToObject | ( | const btTransform & | effector1_query_pose, |
const btTransform & | effector2_query_pose, | ||
btTransform & | obj_pose | ||
) |
Wrapper for single effector.
Definition at line 182 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapEffectorTwistsToObject | ( | const std::vector< KDL::Twist > & | effector_query_twists, |
KDL::Twist & | obj_twist, | ||
bool | from_ref = true |
||
) |
Wrapper for twin effectors.
Sets twist of obj given effector twists.
Sets twist of object given effector twists
effector_query_twists | Current twists of each effector in their own frame |
obj_twist | A reference to the twist being calculated |
from_ref | If true, then the input effector twists are assumed to be defined in the reference frame (NOT the effector frame), and are rotated appropriately. This is the natural situation when working with twists from a cartesian arm controller. |
Definition at line 239 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapEffectorTwistsToObject | ( | const KDL::Twist & | effector_query_twist, |
KDL::Twist & | obj_twist, | ||
bool | from_ref = true |
||
) |
Definition at line 286 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapEffectorTwistsToObject | ( | const KDL::Twist & | effector1_query_twist, |
const KDL::Twist & | effector2_query_twist, | ||
KDL::Twist & | obj_twist, | ||
bool | from_ref = true |
||
) |
Wrapper for single effector.
Definition at line 297 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapEffectorWrenchesToObject | ( | const std::vector< KDL::Wrench > & | effector_query_wrenches, |
KDL::Wrench & | obj_wrench | ||
) |
Finds wrench on the object given wrench at each effector.
Sets wrench of object given effector wrenches.
effector_query_wrenches | Current wrench at each effector |
Definition at line 373 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapObjectPoseToEffectors | ( | const btTransform & | obj_query_pose, |
std::vector< btTransform > & | effector_poses | ||
) |
Wrapper for twin effectors.
Computes r_effector_pose and l_effector_pose from obj pose by applying the backward transforms.
Finds required effector poses given the provided object pose
obj_pose | Desired transform of object in reference frame |
Definition at line 196 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapObjectPoseToEffectors | ( | const btTransform & | obj_query_pose, |
btTransform & | effector_pose | ||
) |
Definition at line 210 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapObjectPoseToEffectors | ( | const btTransform & | obj_query_pose, |
btTransform & | effector1_pose, | ||
btTransform & | effector2_pose | ||
) |
Wrapper for single effector.
Definition at line 223 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapObjectTwistToEffectors | ( | const KDL::Twist & | obj_query_twist, |
std::vector< KDL::Twist > & | effector_twists, | ||
bool | to_ref = true |
||
) |
Wrapper for twin effectors.
Sets effector twists given the provided object twist.
Sets effector twists given the desired object twist
obj_query_twist | Contains twist of object in the object frame |
effector_twists | A reference to the vector of effector twists, each defined in their own frame |
to_ref | If true, then the output effector twists are rotated to the reference frame (from separate effector frames). This is the natural situation when working with twists from a cartesian arm controller. |
Definition at line 312 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapObjectTwistToEffectors | ( | const KDL::Twist & | obj_query_twist, |
KDL::Twist & | effector_twist, | ||
bool | to_ref = true |
||
) |
Definition at line 345 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapObjectTwistToEffectors | ( | const KDL::Twist & | obj_query_twist, |
KDL::Twist & | effector1_twist, | ||
KDL::Twist & | effector2_twist, | ||
bool | to_ref = true |
||
) |
Definition at line 357 of file manipulation_transforms.cpp.
double ManipulationTransforms::mapObjectWrenchToEffectors | ( | const KDL::Wrench & | obj_query_wrench, |
std::vector< KDL::Wrench > & | effector_wrenches | ||
) |
Sets effector wrenches given the desired object wrench.
Sets effector wrenches given the provided object wrench.
obj_query_wrench | contains the wrench at the object in the reference frame |
Definition at line 398 of file manipulation_transforms.cpp.
void ManipulationTransforms::setInitialTransforms | ( | const btTransform & | obj_initial_pose, |
const std::vector< btTransform > & | effector_initial_poses | ||
) |
Initializer for ManipulationTransforms.
Computes the relative transforms between obj and effectors given the transforms specified in the reference frame.
obj_initial_pose | Transform from object to reference frame |
effector_initial_poses | Vector of transforms from each effector to reference frame |
Definition at line 73 of file manipulation_transforms.cpp.
void ManipulationTransforms::setInitialTransforms | ( | const btTransform & | obj_initial_pose, |
const btTransform & | effector_initial_pose | ||
) |
Definition at line 95 of file manipulation_transforms.cpp.
void ManipulationTransforms::setInitialTransforms | ( | const btTransform & | obj_initial_pose, |
const btTransform & | effector1_initial_pose, | ||
const btTransform & | effector2_initial_pose | ||
) |
Wrapper for single effector.
Definition at line 112 of file manipulation_transforms.cpp.
Vector of transforms from object frame to effectors
Definition at line 150 of file manipulation_transforms.h.
Vector of transforms from effector frames to object
Definition at line 152 of file manipulation_transforms.h.
unsigned int ManipulationTransforms::n_effectors_ [private] |
Definition at line 147 of file manipulation_transforms.h.
The number of effectors
Definition at line 149 of file manipulation_transforms.h.
Vector of transforms from effectors to reference frame
Definition at line 153 of file manipulation_transforms.h.