Tin

Examples · robots · 337 of 339

wave

Wave an SO-101 arm's shoulder for five seconds in the built-in kinematic world.

examples/robots/wave.tintin run examples/robots/wave.tin
// Wave an SO-101 arm's shoulder for five seconds in the built-in kinematic world.
robot Arm = so101

fn wave(o: Observation): Option<Pose> => Some(Pose { shoulder_pan: 0.5rad * sin(o.t / 1s * 2.0) })

fn main() {
  var arm = Arm()
  let r = arm.run(wave, 5s, 50Hz)
  print("{r.steps} steps, {r.holds} holds, stopped by {r.stoppedBy}")
}
250 steps, 0 holds, stopped by steps