Revision f10ec142
| examples/meka/src/mekajointinterface.cpp | ||
|---|---|---|
| 130 | 130 |
|
| 131 | 131 |
trajectory_msgs::JointTrajectoryPoint p; |
| 132 | 132 |
p.positions.push_back(joint_target[ID_NECK_TILT] * M_PI / 180.0); |
| 133 |
p.positions.push_back(joint_target[ID_NECK_PAN] * M_PI / 180.0); |
|
| 133 |
//pan joint is inverted! |
|
| 134 |
p.positions.push_back(-joint_target[ID_NECK_PAN] * M_PI / 180.0); |
|
| 134 | 135 |
//printf("targets pan=%4.1f tilt=%4.1f (eye p %4.1f t %4.2f)\n",joint_target[ID_NECK_TILT],joint_target[ID_NECK_PAN],joint_target[ID_EYES_LEFT_LR],joint_target[ID_EYES_BOTH_UD]);
|
| 135 | 136 |
|
| 136 | 137 |
p.time_from_start = ros::Duration(1.2 * 1.0 / humotion::server::Server::MOTION_UPDATERATE); |
| ... | ... | |
| 209 | 210 |
} |
| 210 | 211 |
|
| 211 | 212 |
void MekaJointInterface::init_joints(){
|
| 212 |
store_min_max(ID_NECK_TILT, -18, 1);
|
|
| 213 |
store_min_max(ID_NECK_PAN, -56, 56);
|
|
| 213 |
store_min_max(ID_NECK_TILT, -37, 1);
|
|
| 214 |
store_min_max(ID_NECK_PAN, -70, 70);
|
|
| 214 | 215 |
|
| 215 | 216 |
store_min_max(ID_NECK_ROLL, -1, 1); |
| 216 | 217 |
store_min_max(ID_EYES_BOTH_UD, -1, 1); |
| src/server/controller.cpp | ||
|---|---|---|
| 117 | 117 |
absolute_gaze.pan = pan + relative.pan; |
| 118 | 118 |
absolute_gaze.tilt = tilt + relative.tilt; |
| 119 | 119 |
absolute_gaze.roll = roll + relative.roll; |
| 120 |
printf("pan now = %4.1f, rel=%4.1f ===> %4.2f\n",pan,relative.pan,absolute_gaze.pan);
|
|
| 120 |
//printf("pan now = %4.1f, rel=%4.1f ===> %4.2f\n",pan,relative.pan,absolute_gaze.pan);
|
|
| 121 |
//printf("tilt now = %4.1f, rel=%4.1f ===> %4.2f\n",tilt,relative.tilt,absolute_gaze.tilt);
|
|
| 121 | 122 |
|
| 122 | 123 |
//FIXME: use ros TF for that calculation... |
| 123 | 124 |
//see http://wiki.ros.org/tf/Tutorials/Time%20travel%20with%20tf%20%28C%2B%2B%29 |
Also available in: Unified diff