-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJoyPython1
More file actions
22 lines (17 loc) · 716 Bytes
/
JoyPython1
File metadata and controls
22 lines (17 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from pyjop import *
SimEnv.connect()
# variable pointing to the conveyor belt
conv = ConveyorBelt.find("_entityConveyorBelt0")
# set the speed of the conveyor belt (positive values are forwards, negative backwards)
conv.set_target_speed(1.5) #feel free to increase this!
# variable pointing to the delivery container.
container = DeliveryContainer.find("_entityDeliveryContainer0")
# open the delivery door and wait a few seconds for the barrel to arrive
container.open_door()
sleep(18) # after 18 seconds the barrel should've arrived
# close the door
container.close_door()
# wait until it is completely shut (takes about 7 seconds)
sleep(7)
# then deliver the barrel inside the container
container.deliver()