fixed rosbag name and auto-takeoff for optimization
This commit is contained in:
parent
c12b29538a
commit
309f33fff1
|
@ -24,6 +24,7 @@ function init() {
|
|||
|
||||
# Starting state: TURNEDOFF to wait for user input.
|
||||
BVMSTATE = "TURNEDOFF"
|
||||
TAKEOFF_COUNTER = 20
|
||||
}
|
||||
|
||||
# Executed at each time step.
|
||||
|
@ -50,6 +51,16 @@ function step() {
|
|||
statef()
|
||||
|
||||
log("Current state: ", BVMSTATE)
|
||||
|
||||
# Auto-takeoff (delayed for simulator boot)
|
||||
if(id == 0) {
|
||||
if(TAKEOFF_COUNTER>0)
|
||||
TAKEOFF_COUNTER = TAKEOFF_COUNTER - 1
|
||||
else if(TAKEOFF_COUNTER == 0) {
|
||||
BVMSTATE="LAUNCH"
|
||||
TAKEOFF_COUNTER = -1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Executed once when the robot (or the simulator) is reset.
|
||||
|
|
Loading…
Reference in New Issue