Public Member Functions | Private Member Functions | Private Attributes
MotionAdaption Class Reference

Adapts the tracked end points of the operator to the robot's body proportions. More...

#include <motion_adaption.h>

List of all members.

Public Member Functions

void adapt ()
 MotionAdaption ()
 ~MotionAdaption ()

Private Member Functions

bool adaptElbows ()
bool adaptHands ()
bool adaptHead ()
bool adaptShoulders ()
bool adaptTorso ()
bool adaptTransforms ()
bool getTransforms ()
void publishData ()
bool scaleUserHandsAndElbows ()
void setGoals ()
bool setRefFrame ()

Private Attributes

ros::Time calc_time
double elbow_x_
double elbow_y_
btVector3 head_goal_rot_vec_
tf::Transformer internal_tf
bool l_elbow_extended_
btVector3 l_elbow_goal_rot_vec_
btVector3 l_hand_goal_rot_vec_
double limb_length_
btMatrix3x3 mat_orientation_
ros::NodeHandle nh_
ros::NodeHandle nh_private_
geometry_msgs::PoseStamped pose_
ros::Publisher pub_head_pose_
ros::Publisher pub_l_elbow_pose_
ros::Publisher pub_l_hand_pose_
ros::Publisher pub_r_elbow_pose_
ros::Publisher pub_r_hand_pose_
ros::Publisher pub_torso_pose_
tf::Quaternion quat_
tf::Quaternion quat_adjust_
bool r_elbow_extended_
btVector3 r_elbow_goal_rot_vec_
btVector3 r_hand_goal_rot_vec_
btVector3 ref_frame_rot_vec_
double robot_arm_length_
std::string robot_base_str_
double robot_head_height_
std::string robot_head_str_
std::string robot_l_elbow_str_
std::string robot_l_hand_str_
std::string robot_l_shoulder_str_
double robot_lower_arm_length_
std::string robot_r_elbow_str_
std::string robot_r_hand_str_
std::string robot_r_shoulder_str_
std::string robot_ref_torso_str_
double robot_shoulder_heigth_
double robot_shoulder_width_
double robot_shoulder_x_offset_
std::string robot_torso_str_
double robot_upper_arm_length_
tf::TransformBroadcaster tf_broadcaster_
tf::StampedTransform tf_head_goal_
tf::StampedTransform tf_l_elbow_goal_
tf::StampedTransform tf_l_elbow_hand_
tf::StampedTransform tf_l_elbow_orient_
tf::StampedTransform tf_l_elbow_pos_
tf::StampedTransform tf_l_elbow_scaled_
tf::StampedTransform tf_l_hand_goal_
tf::StampedTransform tf_l_hand_scaled_
tf::StampedTransform tf_l_shoulder_elbow_
tf::StampedTransform tf_l_shoulder_goal_
tf::StampedTransform tf_l_shoulder_hand_
tf::StampedTransform tf_l_shoulder_scaled_
tf::TransformListener tf_listener_
tf::StampedTransform tf_r_elbow_goal_
tf::StampedTransform tf_r_elbow_hand_
tf::StampedTransform tf_r_elbow_orient_
tf::StampedTransform tf_r_elbow_pos_
tf::StampedTransform tf_r_elbow_scaled_
tf::StampedTransform tf_r_hand_adjusted_
tf::StampedTransform tf_r_hand_goal_
tf::StampedTransform tf_r_hand_scaled_
tf::StampedTransform tf_r_shoulder_elbow_
tf::StampedTransform tf_r_shoulder_goal_
tf::StampedTransform tf_r_shoulder_hand_
tf::StampedTransform tf_r_shoulder_scaled_
tf::StampedTransform tf_ref_frame_
tf::StampedTransform tf_robot_r_elbow_r_hand_
tf::StampedTransform tf_robot_r_shoulder_l_shoulder_
tf::StampedTransform tf_robot_r_shoulder_r_elbow_
tf::StampedTransform tf_robot_ref_torso_
tf::StampedTransform tf_robot_torso_head_
tf::StampedTransform tf_robot_torso_l_shoulder_
tf::StampedTransform tf_robot_torso_r_shoulder_
tf::StampedTransform tf_robot_torso_torso_
tf::StampedTransform tf_torso_aligned_
tf::StampedTransform tf_torso_goal_
tf::StampedTransform tf_usr_head_
tf::StampedTransform tf_usr_l_elbow_
tf::StampedTransform tf_usr_l_elbow_hand_
tf::StampedTransform tf_usr_l_hand_
tf::StampedTransform tf_usr_l_shoulder_
tf::StampedTransform tf_usr_l_shoulder_elbow_
tf::StampedTransform tf_usr_l_shoulder_hand_
tf::StampedTransform tf_usr_r_elbow_
tf::StampedTransform tf_usr_r_elbow_hand_
tf::StampedTransform tf_usr_r_hand_
tf::StampedTransform tf_usr_r_shoulder_
tf::StampedTransform tf_usr_r_shoulder_elbow_
tf::StampedTransform tf_usr_r_shoulder_hand_
tf::StampedTransform tf_usr_torso_
btVector3 torso_goal_rot_vec_
double user_arm_length_
std::string user_head_str_
std::string user_l_elbow_str_
std::string user_l_hand_str_
std::string user_l_shoulder_str_
std::string user_r_elbow_str_
std::string user_r_hand_str_
std::string user_r_shoulder_str_
double user_shoulder_height_
double user_shoulder_width_
std::string user_torso_str_
double user_upper_arm_length_
btVector3 vec_elbow_hand_
btVector3 vec_helper_
btVector3 vec_l_elbow_hand_valid_
btVector3 vec_l_shoulder_elbow_valid_
btVector3 vec_normal_
btVector3 vec_r_elbow_hand_valid_
btVector3 vec_r_shoulder_elbow_valid_
btVector3 vec_shoulder_elbow_
btVector3 vec_shoulder_hand_
double wait_for_tf_
std::string world_ref_frame_str_
double x_adapt_
double x_norm_
double y_adapt_
double y_norm_
double z_adapt_
double z_norm_

Detailed Description

Adapts the tracked end points of the operator to the robot's body proportions.

Author:
Marcus Liebhardt The adaptions uses the transforms of the specified operator end points, scales them according to the robot's body proportions and maps them onto the robot. The orientation of each end point is mapped unchanged.

Definition at line 51 of file motion_adaption.h.


Constructor & Destructor Documentation

Definition at line 57 of file motion_adaption.cpp.

Definition at line 172 of file motion_adaption.cpp.


Member Function Documentation

This method consists of a hierarchy of all private methods of this class. Each method gets called, if the previous method has finished successfully.

Definition at line 182 of file motion_adaption.cpp.

The elbows are placed inside the arm planes at the intersection of the circles around the hands and elbows. Their radii are given by the upper and lower arm lengths. If arms are not completely stretched the normal vectors of the arm planes are used to chose among the two possible solutions. Further additions are made to handle small calculation errors, such as assuming stretched arms, when they are very close to stretched.

Returns:
true, if all necessary transforms have been retrieved successfully

Definition at line 312 of file adapt_transforms.cpp.

The hands are placed at their scaled positions. The orientation is added manually in the way that the hands are aligned along the elbow. The plane normals are also used to define their orientation.

Returns:
true, if all necessary transforms have been retrieved successfully

Definition at line 407 of file adapt_transforms.cpp.

Simple adaption of the operator's head transformation, which only applies the orientation of the operator's torso to the goal transformation; the position is a constant offset from the reference frame

Returns:
true, if all necessary transforms have been retrieved successfully

Definition at line 90 of file adapt_transforms.cpp.

A constant offset from the reference frame defines the position of the shoulders. Their orientation is calculated based on the position of the elbows and hands. Therefore arm planes are calculated for both arms, which contain the elbows and hands.

Returns:
true, if all necessary transforms have been retrieved successfully

Definition at line 179 of file adapt_transforms.cpp.

Simple adaption of the operator's torso transformation, which only applies the orientation of the operator's torso to the goal transformation; the position is the same as the reference frame

returns always true

Definition at line 78 of file adapt_transforms.cpp.

Contains the hierarchy of methods for adapting the several end points of the upper body.

Returns:
true, if all adaptions of the end points returned true
Author:
Marcus Liebhardt

Definition at line 44 of file adapt_transforms.cpp.

Retrieves transforms from the operator's torso to the upper body end points hands, elbows, shoulder, head and the transform from the torso's reference frame to the torso.

Returns:
true, if all transforms of the operator have been retrieved successfully
Author:
Marcus Liebhardt

Definition at line 41 of file get_transforms.cpp.

void MotionAdaption::publishData ( ) [private]

Deprecated! Publishes the goal frames as messages. Not used anymore.

Author:
Marcus Liebhardt

Definition at line 41 of file publish_msgs.cpp.

First part of the more complicated adaptions of the hands: This method scales the position of the hands and elbows using both the body proportions of the operator and the robot.

Returns:
true, if all necessary transforms have been retrieved successfully

Definition at line 119 of file adapt_transforms.cpp.

void MotionAdaption::setGoals ( ) [private]

In this last step of motion adaption all goal frames (hands, elbows, head and torso) are manually aligned with the robot's convention.

Author:
Marcus Liebhardt

Definition at line 40 of file set_goals.cpp.

Sets the reference frame on the robot needed for the adaption of the operator's transforms.

Returns:
true, if the specified frame for the reference frame on the robot has been retrieved successfully
Author:
Marcus Liebhardt

Definition at line 41 of file set_ref_frame.cpp.


Member Data Documentation

Definition at line 66 of file motion_adaption.h.

double MotionAdaption::elbow_x_ [private]

Definition at line 259 of file motion_adaption.h.

double MotionAdaption::elbow_y_ [private]

Definition at line 259 of file motion_adaption.h.

Definition at line 197 of file motion_adaption.h.

Definition at line 65 of file motion_adaption.h.

Definition at line 264 of file motion_adaption.h.

Definition at line 200 of file motion_adaption.h.

Definition at line 201 of file motion_adaption.h.

double MotionAdaption::limb_length_ [private]

Definition at line 259 of file motion_adaption.h.

btMatrix3x3 MotionAdaption::mat_orientation_ [private]

Definition at line 265 of file motion_adaption.h.

Definition at line 153 of file motion_adaption.h.

Definition at line 153 of file motion_adaption.h.

geometry_msgs::PoseStamped MotionAdaption::pose_ [private]

Definition at line 171 of file motion_adaption.h.

Definition at line 166 of file motion_adaption.h.

Definition at line 169 of file motion_adaption.h.

Definition at line 170 of file motion_adaption.h.

Definition at line 167 of file motion_adaption.h.

Definition at line 168 of file motion_adaption.h.

Definition at line 165 of file motion_adaption.h.

Definition at line 254 of file motion_adaption.h.

Definition at line 254 of file motion_adaption.h.

Definition at line 264 of file motion_adaption.h.

Definition at line 198 of file motion_adaption.h.

Definition at line 199 of file motion_adaption.h.

Definition at line 195 of file motion_adaption.h.

Definition at line 257 of file motion_adaption.h.

std::string MotionAdaption::robot_base_str_ [private]

Definition at line 183 of file motion_adaption.h.

Definition at line 256 of file motion_adaption.h.

std::string MotionAdaption::robot_head_str_ [private]

Definition at line 186 of file motion_adaption.h.

std::string MotionAdaption::robot_l_elbow_str_ [private]

Definition at line 191 of file motion_adaption.h.

std::string MotionAdaption::robot_l_hand_str_ [private]

Definition at line 192 of file motion_adaption.h.

Definition at line 190 of file motion_adaption.h.

Definition at line 257 of file motion_adaption.h.

std::string MotionAdaption::robot_r_elbow_str_ [private]

Definition at line 188 of file motion_adaption.h.

std::string MotionAdaption::robot_r_hand_str_ [private]

Definition at line 189 of file motion_adaption.h.

Definition at line 187 of file motion_adaption.h.

std::string MotionAdaption::robot_ref_torso_str_ [private]

Definition at line 184 of file motion_adaption.h.

Definition at line 256 of file motion_adaption.h.

Definition at line 256 of file motion_adaption.h.

Definition at line 256 of file motion_adaption.h.

std::string MotionAdaption::robot_torso_str_ [private]

Definition at line 185 of file motion_adaption.h.

Definition at line 257 of file motion_adaption.h.

Definition at line 159 of file motion_adaption.h.

Definition at line 229 of file motion_adaption.h.

Definition at line 250 of file motion_adaption.h.

Definition at line 249 of file motion_adaption.h.

Definition at line 248 of file motion_adaption.h.

Definition at line 247 of file motion_adaption.h.

Definition at line 246 of file motion_adaption.h.

Definition at line 252 of file motion_adaption.h.

Definition at line 251 of file motion_adaption.h.

Definition at line 244 of file motion_adaption.h.

Definition at line 243 of file motion_adaption.h.

Definition at line 245 of file motion_adaption.h.

Definition at line 242 of file motion_adaption.h.

Definition at line 156 of file motion_adaption.h.

Definition at line 238 of file motion_adaption.h.

Definition at line 237 of file motion_adaption.h.

Definition at line 236 of file motion_adaption.h.

Definition at line 235 of file motion_adaption.h.

Definition at line 234 of file motion_adaption.h.

Definition at line 240 of file motion_adaption.h.

Definition at line 241 of file motion_adaption.h.

Definition at line 239 of file motion_adaption.h.

Definition at line 232 of file motion_adaption.h.

Definition at line 231 of file motion_adaption.h.

Definition at line 233 of file motion_adaption.h.

Definition at line 230 of file motion_adaption.h.

Definition at line 226 of file motion_adaption.h.

Definition at line 224 of file motion_adaption.h.

Definition at line 222 of file motion_adaption.h.

Definition at line 223 of file motion_adaption.h.

Definition at line 217 of file motion_adaption.h.

Definition at line 219 of file motion_adaption.h.

Definition at line 221 of file motion_adaption.h.

Definition at line 220 of file motion_adaption.h.

Definition at line 218 of file motion_adaption.h.

Definition at line 227 of file motion_adaption.h.

Definition at line 228 of file motion_adaption.h.

Definition at line 204 of file motion_adaption.h.

Definition at line 214 of file motion_adaption.h.

Definition at line 215 of file motion_adaption.h.

Definition at line 216 of file motion_adaption.h.

Definition at line 211 of file motion_adaption.h.

Definition at line 212 of file motion_adaption.h.

Definition at line 213 of file motion_adaption.h.

Definition at line 208 of file motion_adaption.h.

Definition at line 209 of file motion_adaption.h.

Definition at line 210 of file motion_adaption.h.

Definition at line 205 of file motion_adaption.h.

Definition at line 206 of file motion_adaption.h.

Definition at line 207 of file motion_adaption.h.

Definition at line 203 of file motion_adaption.h.

Definition at line 196 of file motion_adaption.h.

Definition at line 258 of file motion_adaption.h.

std::string MotionAdaption::user_head_str_ [private]

Definition at line 176 of file motion_adaption.h.

std::string MotionAdaption::user_l_elbow_str_ [private]

Definition at line 181 of file motion_adaption.h.

std::string MotionAdaption::user_l_hand_str_ [private]

Definition at line 182 of file motion_adaption.h.

std::string MotionAdaption::user_l_shoulder_str_ [private]

Definition at line 180 of file motion_adaption.h.

std::string MotionAdaption::user_r_elbow_str_ [private]

Definition at line 178 of file motion_adaption.h.

std::string MotionAdaption::user_r_hand_str_ [private]

Definition at line 179 of file motion_adaption.h.

std::string MotionAdaption::user_r_shoulder_str_ [private]

Definition at line 177 of file motion_adaption.h.

Definition at line 258 of file motion_adaption.h.

Definition at line 258 of file motion_adaption.h.

std::string MotionAdaption::user_torso_str_ [private]

Definition at line 175 of file motion_adaption.h.

Definition at line 258 of file motion_adaption.h.

btVector3 MotionAdaption::vec_elbow_hand_ [private]

Definition at line 261 of file motion_adaption.h.

btVector3 MotionAdaption::vec_helper_ [private]

Definition at line 261 of file motion_adaption.h.

Definition at line 263 of file motion_adaption.h.

Definition at line 262 of file motion_adaption.h.

btVector3 MotionAdaption::vec_normal_ [private]

Definition at line 261 of file motion_adaption.h.

Definition at line 263 of file motion_adaption.h.

Definition at line 262 of file motion_adaption.h.

Definition at line 261 of file motion_adaption.h.

Definition at line 261 of file motion_adaption.h.

double MotionAdaption::wait_for_tf_ [private]

Definition at line 162 of file motion_adaption.h.

std::string MotionAdaption::world_ref_frame_str_ [private]

Definition at line 174 of file motion_adaption.h.

double MotionAdaption::x_adapt_ [private]

Definition at line 259 of file motion_adaption.h.

double MotionAdaption::x_norm_ [private]

Definition at line 259 of file motion_adaption.h.

double MotionAdaption::y_adapt_ [private]

Definition at line 259 of file motion_adaption.h.

double MotionAdaption::y_norm_ [private]

Definition at line 259 of file motion_adaption.h.

double MotionAdaption::z_adapt_ [private]

Definition at line 259 of file motion_adaption.h.

double MotionAdaption::z_norm_ [private]

Definition at line 259 of file motion_adaption.h.


The documentation for this class was generated from the following files:


motion_adaption
Author(s): Marcus Liebhardt
autogenerated on Mon Jan 6 2014 11:39:55