Skip to content

Commit

Permalink
Increase CARLA startup time to 10 mins, log startup duration, and set…
Browse files Browse the repository at this point in the history
… volume throughput to 250
  • Loading branch information
lola831 committed Oct 28, 2024
1 parent 66d6b03 commit fac5811
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-simulators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
done
# Create a new volume from the latest snapshot
volume_id=$(aws ec2 create-volume --snapshot-id $LATEST_SNAPSHOT_ID --availability-zone us-west-1b --volume-type gp3 --size 400 --query "VolumeId" --output text)
volume_id=$(aws ec2 create-volume --snapshot-id $LATEST_SNAPSHOT_ID --availability-zone us-west-1b --volume-type gp3 --size 400 --throughput 250 --query "VolumeId" --output text)
echo "Created volume with ID: $volume_id"
# Set volume_id as output
Expand Down
8 changes: 7 additions & 1 deletion tests/simulators/carla/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,25 @@ def isCarlaServerRunning(host="localhost", port=2000):
@pytest.fixture(scope="package")
def getCarlaSimulator(getAssetPath):
carla_process = None
start_time = time.time()
if not isCarlaServerRunning():
CARLA_ROOT = checkCarlaPath()
carla_process = subprocess.Popen(
f"bash {CARLA_ROOT}/CarlaUE4.sh -RenderOffScreen", shell=True
)

for _ in range(120):
for _ in range(600):
if isCarlaServerRunning():
break
time.sleep(1)
else:
pytest.fail("Unable to connect to CARLA.")

# Log the time it took for CARLA to start
end_time = time.time()
elapsed_time = end_time - start_time
print(f"CARLA started successfully in {elapsed_time:.2f} seconds.")

# Extra 5 seconds to ensure server startup
time.sleep(5)

Expand Down

0 comments on commit fac5811

Please sign in to comment.