Revision 35b3ca25 src/server/neck_motion_generator.cpp
src/server/neck_motion_generator.cpp | ||
---|---|---|
162 | 162 |
reflexxes_calculate_profile(); |
163 | 163 |
|
164 | 164 |
//tell the joint if about the new values: |
165 |
joint_interface->set_target_position(JointInterface::ID_NECK_PAN,
|
|
166 |
reflexxes_position_output->NewPositionVector->VecData[0],
|
|
167 |
reflexxes_position_output->NewVelocityVector->VecData[0]);
|
|
165 |
joint_interface->set_target(JointInterface::ID_NECK_PAN, |
|
166 |
reflexxes_position_output->NewPositionVector->VecData[0], |
|
167 |
reflexxes_position_output->NewVelocityVector->VecData[0]); |
|
168 | 168 |
|
169 |
joint_interface->set_target_position(JointInterface::ID_NECK_TILT,
|
|
170 |
reflexxes_position_output->NewPositionVector->VecData[1],
|
|
171 |
reflexxes_position_output->NewVelocityVector->VecData[1]);
|
|
169 |
joint_interface->set_target(JointInterface::ID_NECK_TILT, |
|
170 |
reflexxes_position_output->NewPositionVector->VecData[1], |
|
171 |
reflexxes_position_output->NewVelocityVector->VecData[1]); |
|
172 | 172 |
|
173 |
joint_interface->set_target_position(JointInterface::ID_NECK_ROLL,
|
|
174 |
reflexxes_position_output->NewPositionVector->VecData[2],
|
|
175 |
reflexxes_position_output->NewVelocityVector->VecData[2]);
|
|
173 |
joint_interface->set_target(JointInterface::ID_NECK_ROLL, |
|
174 |
reflexxes_position_output->NewPositionVector->VecData[2], |
|
175 |
reflexxes_position_output->NewVelocityVector->VecData[2]); |
|
176 | 176 |
|
177 | 177 |
printf("\n%f %f %f %f %f DBG\n", |
178 | 178 |
neck_pan_now, neck_pan_target, |
... | ... | |
186 | 186 |
void NeckMotionGenerator::publish_targets(){ |
187 | 187 |
//publish values if there is an active gaze input within the last timerange |
188 | 188 |
if (gaze_target_input_active()){ |
189 |
joint_interface->publish_target_position(JointInterface::ID_NECK_PAN);
|
|
190 |
joint_interface->publish_target_position(JointInterface::ID_NECK_TILT);
|
|
191 |
joint_interface->publish_target_position(JointInterface::ID_NECK_ROLL);
|
|
189 |
joint_interface->publish_target(JointInterface::ID_NECK_PAN); |
|
190 |
joint_interface->publish_target(JointInterface::ID_NECK_TILT); |
|
191 |
joint_interface->publish_target(JointInterface::ID_NECK_ROLL); |
|
192 | 192 |
} |
193 | 193 |
} |
194 | 194 |
|
Also available in: Unified diff