> Next robot:park
< Previous make-robot robot:move

robot:move {axis} {position} (#:time {time}) (#:speed {speed}) (#:placement {’spatial|’relative|’absolute}) (’counter)

This procedure is entirely compatible with the Level 2 robot:move command, but adds an extra key movement-type argument which causes the position argument to be interpreted in different ways. This means that programs written against the Level 2 API will work identically if they use the Level 3 API.

Because of the nature of Scheme procedure definitions, if you want to specify a movement-type you must also specify time and speed parameters; if you want default behaviour with regard to these you can give their values as #f.


Before you do anything with the Level 3 API, you need to instantiate a robot object to represent the device, and then you need to park it to ensure it is in a well-known initial state:

(load "level-3.scm")
(use-modules (robot level 3))

(define robot (make-robot))
(robot:park robot)

Now you can make the robot do things. To get the forearm horizontal (in two seconds),

(robot:move robot ’elbow 0 #:movement-type ’space #:time 2)

and the wrist

(robot:move robot ’wrist 0 #:movement-type ’space #:time 2)

Now move the shoulder forward 30°, keeping the entire forearm horizontal,

(robot:move robot ’shoulder -30 #:movement-type ’parallel #:time 2)

And when you’re finished playing, don’t forget to put the robot back into the neutral position, so that it will be well-behaved when it starts up again

(robot:park robot)
> Next robot:park
< Previous make-robot
Copyright © 2010, 2012 DM Bespoke Computer Solutions Ltd
All rights reserved