#include <pr2_teleop_general_commander.h>
Public Types | |
enum | ArmControlMode { ARM_NO_CONTROLLER, ARM_MANNEQUIN_MODE, ARM_POSITION_CONTROL } |
enum | HeadControlMode { HEAD_JOYSTICK, HEAD_TRACK_LEFT_HAND, HEAD_TRACK_RIGHT_HAND, HEAD_MANNEQUIN } |
enum | HeadSequence { HEAD_NOD, HEAD_SHAKE } |
enum | LaserControlMode { LASER_TILT_OFF, LASER_TILT_SLOW, LASER_TILT_FAST } |
enum | WhichArm { ARMS_LEFT, ARMS_RIGHT, ARMS_BOTH } |
Public Member Functions | |
GeneralCommander (bool control_body, bool control_head, bool control_rarm, bool control_larm, bool control_prosilica, std::string arm_controller_name=default_arm_controller_name) | |
ArmControlMode | getArmMode (WhichArm which) |
HeadControlMode | getHeadMode () |
bool | getJointPosition (const std::string &name, double &pos) const |
bool | getJointVelocity (const std::string &name, double &vel) const |
LaserControlMode | getLaserMode () |
bool | initWalkAlong () |
bool | isWalkAlongOk () |
bool | moveToWalkAlongArmPose () |
void | requestProsilicaImage (std::string ns) |
void | sendArmVelCommands (double r_x_vel, double r_y_vel, double r_z_vel, double r_roll_vel, double r_pitch_vel, double r_yaw_vel, double l_x_vel, double l_y_vel, double l_z_vel, double l_roll_vel, double l_pitch_vel, double l_yaw_vel, double hz) |
void | sendBaseCommand (double vx, double vy, double vw) |
void | sendGripperCommand (WhichArm which, bool close) |
void | sendHeadCommand (double req_pan, double req_tilt) |
void | sendHeadSequence (HeadSequence seq) |
void | sendHeadTrackCommand () |
void | sendProjectorStartStop (bool start) |
void | sendTorsoCommand (double pos, double vel) |
void | sendWalkAlongCommand (double thresh, double x_dist_max, double x_speed_scale, double y_dist_max, double y_speed_scale, double rot_scale) |
void | sendWristVelCommands (double right_wrist_vel, double left_wrist_vel, double hz) |
void | setArmMode (WhichArm which, ArmControlMode mode) |
void | setHeadMode (HeadControlMode mode) |
void | setLaserMode (LaserControlMode mode) |
void | switchControllers (const std::vector< std::string > &start_controllers, const std::vector< std::string > &stop_controllers) |
void | tuckArms (WhichArm arm) |
void | turnOffWalkAlong () |
void | untuckArms (WhichArm arm) |
void | updateCurrentWristPositions () |
~GeneralCommander () | |
Private Member Functions | |
double | calcAverage (const std::list< double > &av_list) const |
void | clampDesiredArmPositionsToActual (double max_dist) |
void | composeWristRotGoal (const std::string pref, pr2_controllers_msgs::JointTrajectoryGoal &goal, std::vector< double > &des_joints, double des_vel, double hz) const |
geometry_msgs::Pose | getPositionFromJointsPose (ros::ServiceClient &service_client, std::string fk_link, const std::vector< std::string > &joint_names, const std::vector< double > &joint_pos) |
void | jointStateCallback (const sensor_msgs::JointStateConstPtr &jointState) |
void | powerBoardCallback (const pr2_msgs::PowerBoardStateConstPtr &powerBoardState) |
void | unnormalizeTrajectory (trajectory_msgs::JointTrajectory &traj) const |
void | updateWalkAlongAverages () |
Definition at line 54 of file pr2_teleop_general_commander.h.
Enumerator | |
---|---|
ARM_NO_CONTROLLER | |
ARM_MANNEQUIN_MODE | |
ARM_POSITION_CONTROL |
Definition at line 64 of file pr2_teleop_general_commander.h.
Enumerator | |
---|---|
HEAD_JOYSTICK | |
HEAD_TRACK_LEFT_HAND | |
HEAD_TRACK_RIGHT_HAND | |
HEAD_MANNEQUIN |
Definition at line 70 of file pr2_teleop_general_commander.h.
Enumerator | |
---|---|
HEAD_NOD | |
HEAD_SHAKE |
Definition at line 83 of file pr2_teleop_general_commander.h.
Enumerator | |
---|---|
LASER_TILT_OFF | |
LASER_TILT_SLOW | |
LASER_TILT_FAST |
Definition at line 77 of file pr2_teleop_general_commander.h.
Enumerator | |
---|---|
ARMS_LEFT | |
ARMS_RIGHT | |
ARMS_BOTH |
Definition at line 58 of file pr2_teleop_general_commander.h.
GeneralCommander::GeneralCommander | ( | bool | control_body, |
bool | control_head, | ||
bool | control_rarm, | ||
bool | control_larm, | ||
bool | control_prosilica, | ||
std::string | arm_controller_name = default_arm_controller_name |
||
) |
Definition at line 68 of file pr2_teleop_general_commander.cpp.
GeneralCommander::~GeneralCommander | ( | ) |
Definition at line 262 of file pr2_teleop_general_commander.cpp.
|
private |
Definition at line 1480 of file pr2_teleop_general_commander.cpp.
|
private |
Definition at line 770 of file pr2_teleop_general_commander.cpp.
|
private |
Definition at line 660 of file pr2_teleop_general_commander.cpp.
GeneralCommander::ArmControlMode GeneralCommander::getArmMode | ( | WhichArm | which | ) |
Definition at line 319 of file pr2_teleop_general_commander.cpp.
GeneralCommander::HeadControlMode GeneralCommander::getHeadMode | ( | ) |
Definition at line 315 of file pr2_teleop_general_commander.cpp.
bool GeneralCommander::getJointPosition | ( | const std::string & | name, |
double & | pos | ||
) | const |
Definition at line 295 of file pr2_teleop_general_commander.cpp.
bool GeneralCommander::getJointVelocity | ( | const std::string & | name, |
double & | vel | ||
) | const |
Definition at line 303 of file pr2_teleop_general_commander.cpp.
GeneralCommander::LaserControlMode GeneralCommander::getLaserMode | ( | ) |
Definition at line 311 of file pr2_teleop_general_commander.cpp.
|
private |
Definition at line 1491 of file pr2_teleop_general_commander.cpp.
bool GeneralCommander::initWalkAlong | ( | ) |
Definition at line 1299 of file pr2_teleop_general_commander.cpp.
|
inline |
Definition at line 153 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 284 of file pr2_teleop_general_commander.cpp.
bool GeneralCommander::moveToWalkAlongArmPose | ( | ) |
Definition at line 1151 of file pr2_teleop_general_commander.cpp.
|
private |
Definition at line 1533 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::requestProsilicaImage | ( | std::string | ns | ) |
Definition at line 1542 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::sendArmVelCommands | ( | double | r_x_vel, |
double | r_y_vel, | ||
double | r_z_vel, | ||
double | r_roll_vel, | ||
double | r_pitch_vel, | ||
double | r_yaw_vel, | ||
double | l_x_vel, | ||
double | l_y_vel, | ||
double | l_z_vel, | ||
double | l_roll_vel, | ||
double | l_pitch_vel, | ||
double | l_yaw_vel, | ||
double | hz | ||
) |
Definition at line 899 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::sendBaseCommand | ( | double | vx, |
double | vy, | ||
double | vw | ||
) |
Definition at line 593 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::sendGripperCommand | ( | WhichArm | which, |
bool | close | ||
) |
Definition at line 536 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::sendHeadCommand | ( | double | req_pan, |
double | req_tilt | ||
) |
Definition at line 477 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::sendHeadSequence | ( | HeadSequence | seq | ) |
Definition at line 1516 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::sendHeadTrackCommand | ( | ) |
Definition at line 497 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::sendProjectorStartStop | ( | bool | start | ) |
Definition at line 327 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::sendTorsoCommand | ( | double | pos, |
double | vel | ||
) |
Definition at line 575 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::sendWalkAlongCommand | ( | double | thresh, |
double | x_dist_max, | ||
double | x_speed_scale, | ||
double | y_dist_max, | ||
double | y_speed_scale, | ||
double | rot_scale | ||
) |
Definition at line 1402 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::sendWristVelCommands | ( | double | right_wrist_vel, |
double | left_wrist_vel, | ||
double | hz | ||
) |
Definition at line 627 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::setArmMode | ( | WhichArm | which, |
ArmControlMode | mode | ||
) |
Definition at line 403 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::setHeadMode | ( | HeadControlMode | mode | ) |
Definition at line 380 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::setLaserMode | ( | LaserControlMode | mode | ) |
Definition at line 346 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::switchControllers | ( | const std::vector< std::string > & | start_controllers, |
const std::vector< std::string > & | stop_controllers | ||
) |
Definition at line 603 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::tuckArms | ( | WhichArm | arm | ) |
Definition at line 1552 of file pr2_teleop_general_commander.cpp.
|
inline |
Definition at line 157 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 845 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::untuckArms | ( | WhichArm | arm | ) |
Definition at line 1575 of file pr2_teleop_general_commander.cpp.
void GeneralCommander::updateCurrentWristPositions | ( | ) |
Definition at line 695 of file pr2_teleop_general_commander.cpp.
|
private |
Definition at line 1362 of file pr2_teleop_general_commander.cpp.
|
private |
Definition at line 226 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 184 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 185 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 187 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 188 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 186 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 205 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 205 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 244 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 215 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 224 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 215 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 248 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 201 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 229 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 202 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 199 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 243 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 195 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 196 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 194 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 191 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 192 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 190 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 233 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 232 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 235 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 246 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 221 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 222 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 228 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 252 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 210 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 250 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 208 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 204 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 182 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 230 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 223 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 198 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 245 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 219 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 220 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 227 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 251 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 210 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 249 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 208 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 204 of file pr2_teleop_general_commander.h.
|
private |
A model of the robot to see which joints wrap around.
Definition at line 238 of file pr2_teleop_general_commander.h.
|
private |
Flag that tells us if the robot model was initialized successfully.
Definition at line 240 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 242 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 218 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 217 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 225 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 253 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 207 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 213 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 207 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 212 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 212 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 212 of file pr2_teleop_general_commander.h.
|
private |
Definition at line 212 of file pr2_teleop_general_commander.h.