Skip to content

Commit

Permalink
Merge pull request #32 from ll7/31-create-a-method-to-record-the-simu…
Browse files Browse the repository at this point in the history
…lation

31 create a method to record the simulation
  • Loading branch information
ll7 authored Jun 4, 2024
2 parents b6c458c + 6e6597a commit 99fc171
Show file tree
Hide file tree
Showing 11 changed files with 409 additions and 245 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pip install -e . || { echo "Failed to install the current directory as a package
pip install -e ./fast-pysf || { echo "Failed to install ./fast-pysf as a package"; exit 1; }

# Set the display environment variable for GUI applications based on the host OS
if [[ $HOST_OS == *"Windows"* ]]; then
if [ $HOST_OS == *"Windows"* ]; then
# We are in Windows
echo "export DISPLAY=host.docker.internal:0.0" >> ~/.bashrc || { echo "Failed to set DISPLAY environment variable for Windows"; exit 1; }
else
Expand Down
19 changes: 10 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
__pycache__/
.scannerwork
.pytest_cache
*.c
*.egg-info
*.o
*.so
profile.json
*training*.zip
.pytest_cache
.scannerwork
__pycache__/
build
*.egg-info
file.log
profiles
model
images
logs
model
profile.json
profiles
pysf_tests
pysocialforce
logs
*training*.zip
recordings/*.pkl
wandb
2 changes: 1 addition & 1 deletion examples/demo_offensive.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def training():
env_config = EnvSettings(
sim_config=SimulationSettings(difficulty=0, ped_density_by_difficulty=[0.02]),
robot_config=BicycleDriveSettings(radius=0.5, max_accel=3.0, allow_backwards=True))
env = RobotEnv(env_config, debug=True)
env = RobotEnv(env_config, debug=True, recording_enabled=True)
model = PPO.load("./model/run_043", env=env)

obs = env.reset()
Expand Down
4 changes: 4 additions & 0 deletions recordings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Recordings

The folder where recordings are stored by default.
However, recordings are in the `.gitignore` file, so they are not uploaded to the repository.
Loading

0 comments on commit 99fc171

Please sign in to comment.