Revision fcc5e139
examples/meka/src/mekajointinterface.cpp | ||
---|---|---|
64 | 64 |
} |
65 | 65 |
|
66 | 66 |
void MekaJointInterface::store_dummy_data(int id, double timestamp){ |
67 |
JointInterface::store_incoming_position(joint_target[ID_NECK_PAN]id, 0.0, timestamp);
|
|
67 |
JointInterface::store_incoming_position(id, 0.0, timestamp); |
|
68 | 68 |
JointInterface::store_incoming_speed(id, 0.0, timestamp); |
69 | 69 |
} |
70 | 70 |
|
... | ... | |
124 | 124 |
|
125 | 125 |
trajectory_msgs::JointTrajectoryPoint p; |
126 | 126 |
p.positions.push_back(joint_target[ID_NECK_TILT] * M_PI / 180.0); |
127 |
p.positions.push_back(joint_target[ID_NECK_PAN] * M_PI / 180.0 +0.314);
|
|
128 |
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]); |
|
127 |
p.positions.push_back(joint_target[ID_NECK_PAN] * M_PI / 180.0); |
|
128 |
//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]);
|
|
129 | 129 |
|
130 | 130 |
p.time_from_start = ros::Duration(1.2 * 1.0 / humotion::server::Server::MOTION_UPDATERATE); |
131 | 131 |
|
src/server/neck_motion_generator.cpp | ||
---|---|---|
133 | 133 |
requested_neck_state = requested_gaze_state; |
134 | 134 |
} |
135 | 135 |
|
136 |
|
|
137 |
requested_neck_state.dump(); |
|
138 | 136 |
//get targets: this is the sum of stored neck target and up-to-date offset: |
139 | 137 |
float neck_pan_target = requested_neck_state.pan + requested_gaze_state.pan_offset; |
140 | 138 |
float neck_tilt_target = requested_neck_state.tilt + requested_gaze_state.tilt_offset; |
Also available in: Unified diff