![](/media/cache/profiles/e5815151957be36ad2085b7a1a02c5cc.jpg.50x50_q85.jpg)
Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.
Dependencies: Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed
Diff: Motions.cpp
- Revision:
- 19:c2ec475367aa
- Parent:
- 18:7077bedc37eb
diff -r 7077bedc37eb -r c2ec475367aa Motions.cpp --- a/Motions.cpp Wed Apr 03 04:56:13 2013 +0000 +++ b/Motions.cpp Sun Apr 07 06:59:33 2013 +0000 @@ -39,6 +39,7 @@ CSV csv; pose_size = new int; csv.read(filename, data, &servo_size, &motion_size, pose_size); + //readMotion(filename, data, servo_size, motion_size, pose_size); // not so good at speed and has bug in handling float motion value. } void Motions::set(uint16_t* data) @@ -72,10 +73,10 @@ void Motions::setmotion(const int id) { if (!playing) { - //offline = new Motion(motions[id], pose_size[id], servo_size, pwm, &playing); - //tick.attach(offline, &Motion::step, TIMESTEP); - online = new OnlineMotion(1.0, TIMESTEP, servo_size, pwm, &playing); - tick.attach(online, &OnlineMotion::step, TIMESTEP); + offline = new Motion(motions[id], pose_size[id], servo_size, pwm, &playing); + tick.attach(offline, &Motion::step, TIMESTEP); + //online = new OnlineMotion(3.0, TIMESTEP, servo_size, pwm, &playing); + //tick.attach(online, &OnlineMotion::step, TIMESTEP); } }