ROSBuzz_MISTLab/buzz_scripts/testalone.bzz

36 lines
671 B
Plaintext
Raw Normal View History

2017-06-19 17:15:18 -03:00
include "vec2.bzz"
include "update.bzz"
include "barrier.bzz" # don't use a stigmergy id=11 with this header.
include "uavstates.bzz" # require an 'action' function to be defined here.
include "vstigenv.bzz"
2017-02-19 18:02:00 -04:00
2017-06-19 17:15:18 -03:00
function action() {
statef=action
# test moveto cmd dx, dy
# uav_moveto(0.5, 0.5, 0.0)
2017-02-19 18:02:00 -04:00
}
# Executed once at init time.
function init() {
2017-08-30 15:58:44 -03:00
statef=turnedoff
UAVSTATE = "TURNEDOFF"
uav_initstig()
2017-02-19 18:02:00 -04:00
}
# Executed at each time step.
function step() {
2017-06-19 17:15:18 -03:00
uav_rccmd()
statef()
log("Current state: ", UAVSTATE)
2017-02-19 18:02:00 -04:00
}
# Executed once when the robot (or the simulator) is reset.
function reset() {
}
# Executed once at the end of experiment.
function destroy() {
}