Update
This commit is contained in:
parent
09f564086b
commit
26cf31f29f
@ -31,7 +31,7 @@ DO_FORK_ALIGN = True
|
|||||||
DO_PICKUP_CARGO = True
|
DO_PICKUP_CARGO = True
|
||||||
DO_REVERSE_TURN = False
|
DO_REVERSE_TURN = False
|
||||||
DO_GPS_RETURN = False
|
DO_GPS_RETURN = False
|
||||||
DO_DROPOFF_CARGO = False
|
DO_DROPOFF_CARGO = True
|
||||||
DO_RETURN_TO_NEUTRAL = False
|
DO_RETURN_TO_NEUTRAL = False
|
||||||
DO_LOOP = True
|
DO_LOOP = True
|
||||||
|
|
||||||
@ -111,13 +111,6 @@ def __put_down_cargo(vehicle_ctrl):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def __put_cargo_down_and_reverse_turn(vehicle_ctrl):
|
|
||||||
executor_logger.info(f"Dropping cargo")
|
|
||||||
__put_down_cargo(vehicle_ctrl)
|
|
||||||
__reverse_turn(vehicle_ctrl)
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
def __reverse_turn(vehicle_ctrl):
|
def __reverse_turn(vehicle_ctrl):
|
||||||
executor_logger.info(f"performing reverse turn")
|
executor_logger.info(f"performing reverse turn")
|
||||||
vehicle_ctrl.nudge_drive(False, 5, 2000)
|
vehicle_ctrl.nudge_drive(False, 5, 2000)
|
||||||
@ -233,7 +226,7 @@ def queue_executor_thread():
|
|||||||
|
|
||||||
if DO_DROPOFF_CARGO:
|
if DO_DROPOFF_CARGO:
|
||||||
FORKLIFT.set_state("MANIPULATING_CARGO")
|
FORKLIFT.set_state("MANIPULATING_CARGO")
|
||||||
cargo_down_success = __put_cargo_down_and_reverse_turn(FORKLIFT)
|
cargo_down_success = __put_down_cargo(FORKLIFT)
|
||||||
if not cargo_down_success:
|
if not cargo_down_success:
|
||||||
executor_logger.critical("Problem with cargo put down, check logs !")
|
executor_logger.critical("Problem with cargo put down, check logs !")
|
||||||
FORKLIFT.set_state("OTHER_ERROR")
|
FORKLIFT.set_state("OTHER_ERROR")
|
||||||
@ -241,7 +234,14 @@ def queue_executor_thread():
|
|||||||
else:
|
else:
|
||||||
executor_logger.warning("DO_DROPOFF_CARGO flag is false, skipping dropping off cargo")
|
executor_logger.warning("DO_DROPOFF_CARGO flag is false, skipping dropping off cargo")
|
||||||
|
|
||||||
|
if DO_REVERSE_TURN:
|
||||||
|
reverse_turn = reverse_turn(FORKLIFT)
|
||||||
|
if not reverse_turn:
|
||||||
|
executor_logger.critical("Problem with reverse turn, check logs !")
|
||||||
|
FORKLIFT.set_state("OTHER_ERROR")
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
executor_logger.warning("DO_REVERSE_TURN flag is false, skipping reverse turn")
|
||||||
|
|
||||||
if current_job['on_finish']['goto'] == True:
|
if current_job['on_finish']['goto'] == True:
|
||||||
if DO_RETURN_TO_NEUTRAL:
|
if DO_RETURN_TO_NEUTRAL:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user