Revision 35b3ca25 src/server/joint_interface.cpp

View differences:

src/server/joint_interface.cpp
48 48
//! set joint target position
49 49
//! \param joint_id of joint
50 50
//! \param float position
51
void JointInterface::set_target_position(int joint_id, float position, float speed){
51
void JointInterface::set_target(int joint_id, float position, float velocity){
52 52
    assert(joint_id < JOINT_ID_ENUM_SIZE);
53 53

  
54 54
    //update current value
55
    joint_target[joint_id] = position;
56
    joint_target_speed[joint_id] = speed;
55
    joint_target_position_[joint_id] = position;
56
    joint_target_velocity_[joint_id] = velocity;
57 57
}
58 58

  
59 59
//! fetch target position
60 60
//! \param joint_id of joint
61 61
float JointInterface::get_target_position(int joint_id){
62 62
    assert(joint_id < JOINT_ID_ENUM_SIZE);
63
    return joint_target[joint_id];
63
    return joint_target_position_[joint_id];
64
}
65

  
66
//! fetch target velocity
67
//! \param joint_id of joint
68
float JointInterface::get_target_velocity(int joint_id){
69
    assert(joint_id < JOINT_ID_ENUM_SIZE);
70
    return joint_target_velocity_[joint_id];
64 71
}
65 72

  
66 73
//! incoming position data
......
234 241
    gaze_enabled = false;
235 242
}
236 243

  
237
//! fetch maximum allowable joint position
244
//! fetch maximum allowed joint position
238 245
//! \return max position
239 246
float JointInterface::get_joint_max(int joint_id){
240 247
    assert((joint_id > 0) && (joint_id < JOINT_ID_ENUM_SIZE));
241 248
    return joint_max[joint_id];
242 249
}
243 250

  
244
//! fetch minimum allowable joint position
251
//! fetch minimum allowed joint position
245 252
//! \return min position
246 253
float JointInterface::get_joint_min(int joint_id){
247 254
    assert((joint_id > 0) && (joint_id < JOINT_ID_ENUM_SIZE));
......
253 260
bool JointInterface::get_joint_position_map_empty(){
254 261
    return (joint_ts_position_map.empty());
255 262
}
263

  
264
//! call the virtual store function with given position and velocities
265
void JointInterface::publish_target(int joint_id) {
266
    publish_target(joint_id, joint_target_position_[joint_id], joint_target_velocity_[joint_id]);
267
}

Also available in: Unified diff