Revision 730467d3 src/server/motion_generator.cpp

View differences:

src/server/motion_generator.cpp
45 45
MotionGenerator::~MotionGenerator(){
46 46
}
47 47

  
48
//! fetch the latest position and velocity and return the timestamp of that dataset
49
//! \param joint id
50
//! \param pointer to position variable
51
//! \param pointer to veolocity variable
52
//! \return Timestamp of this dataset
53
humotion::Timestamp MotionGenerator::get_timestamped_state(int joint_id,
54
                                                           float *position, float *velocity) {
55
    humotion::Timestamp stamp = joint_interface->get_ts_position(joint_id).get_last_timestamp();
56
    *position = joint_interface->get_ts_position(joint_id).get_interpolated_value(stamp);
57
    *velocity = joint_interface->get_ts_speed(joint_id).get_interpolated_value(stamp);
58
    return stamp;
59
}
60

  
48 61
//! fetch the latest (=current) speed of a joint
49 62
//! \param joint_id
50 63
//! \return float value of joint speed

Also available in: Unified diff