Revision 21444915 src/server/neck_motion_generator.cpp

View differences:

src/server/neck_motion_generator.cpp
151 151
    reflexxes_calculate_profile();
152 152

  
153 153
    //tell the joint if about the new values:
154
    joint_interface->set_target_position(JointInterface::ID_NECK_PAN,  reflexxes_position_output->NewPositionVector->VecData[0]);
155
    joint_interface->set_target_position(JointInterface::ID_NECK_TILT, reflexxes_position_output->NewPositionVector->VecData[1]);
156
    joint_interface->set_target_position(JointInterface::ID_NECK_ROLL, reflexxes_position_output->NewPositionVector->VecData[2]);
154
    joint_interface->set_target_position(JointInterface::ID_NECK_PAN,
155
                                         reflexxes_position_output->NewPositionVector->VecData[0],
156
                                         reflexxes_position_output->NewVelocityVector->VecData[0]);
157

  
158
    joint_interface->set_target_position(JointInterface::ID_NECK_TILT,
159
                                         reflexxes_position_output->NewPositionVector->VecData[1],
160
                                         reflexxes_position_output->NewVelocityVector->VecData[1]);
161
    joint_interface->set_target_position(JointInterface::ID_NECK_ROLL,
162
                                         reflexxes_position_output->NewPositionVector->VecData[2],
163
                                         reflexxes_position_output->NewVelocityVector->VecData[2]);
157 164
}
158 165

  
159 166
//! publish targets to motor boards:
......
206 213
    if (max_accel>1000){
207 214
        max_accel = 1000;
208 215
    }
209

  
210 216
    ///printf("MAX SPEED %4.2f / max accel %4.2f\n",max_speed, max_accel);
211 217

  
212 218
    //feed reflexxes api with data
213
    reflexxes_set_input(dof, target, max_speed, max_accel);
219
    reflexxes_set_input(dof, target, now, max_speed, max_accel);
214 220
}

Also available in: Unified diff