Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ut-amrl/SocialGym2
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanchandra30 committed Feb 22, 2024
2 parents 1c5c9af + b8a648a commit de4e13d
Show file tree
Hide file tree
Showing 65 changed files with 2,037 additions and 20 deletions.
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Attach using Process Id",
"type": "python",
"request": "attach",
"processId": "${command:pickProcess}",
"justMyCode": true,

}
]
}
5 changes: 3 additions & 2 deletions config_runner/configs/1_31_23/door/sacadrl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"num_agents": [[0, 3], [35, 4], [70, 5]],
"num_agents": [[0,2]],
"eval_num_agents": [3, 4, 5, 7, 10, 20],
"train_length": 250000,
"ending_eval_trials": 25,
Expand All @@ -11,7 +11,7 @@
"policy_algo_kwargs": {"n_steps": 4096},
"monitor": true,

"experiment_names": ["envs_door"],
"experiment_names": ["envs_multi"],

"run_name": "1_31_23/door/sacadrl_1",
"run_type": "SACADRL",
Expand All @@ -27,6 +27,7 @@

"entropy_constant_penalty": -100000,
"entropy_constant_penalty_only_those_that_did_not_finish": true,
"socialnavAPI": true,

"timelimit": true,
"timelimit_threshold": 3000
Expand Down
2 changes: 1 addition & 1 deletion config_runner/run_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ docker run -d --name $1 -w /home/rosdev/social_gym/ --gpus all --privileged \
-e DISPLAY=unix$DISPLAY \
-v ${DIR}/data:/home/rosdev/social_gym/data \
-v ${DIR}/config_runner/configs:/home/rosdev/social_gym/config_runner/configs \
-v ${DIR}/submodules/amrl_maps/envs:/home/rosdev/social_gym/submodules/amrl_maps/envs \
-v ${DIR}/submodules/amrl_maps:/home/rosdev/social_gym/submodules/amrl_maps \
-v ${DIR}/submodules/ut_multirobot_sim/maps:/home/rosdev/social_gym/submodules/ut_multirobot_sim/maps \
--network host \
-v ${DIR}/src:/home/rosdev/social_gym/src \
Expand Down
94 changes: 94 additions & 0 deletions docker/vectordisplay/maps/multienv/multienv.navigation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"edges": [
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 0,
"s1_id": 2
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 0,
"s1_id": 1
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 1,
"s1_id": 3
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 2,
"s1_id": 3
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 0,
"s1_id": 3
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 2,
"s1_id": 1
}
],
"nodes": [
{
"id": 0,
"loc": {
"x": -11.379310607910156,
"y": 15.17241382598877
}
},
{
"id": 1,
"loc": {
"x": 8.448275566101074,
"y": 15.0
}
},
{
"id": 2,
"loc": {
"x": -8.793103218078613,
"y": -6.724138259887695
}
},
{
"id": 3,
"loc": {
"x": 9.82758617401123,
"y": -8.103448867797852
}
}
]
}
Empty file.
3 changes: 3 additions & 0 deletions docker/vectordisplay/maps/multienv/multienv.vectormap.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-19.655172, 21.724140, -19.655172, -7.241378
-19.827587, 22.241381, 13.275863, 22.586208
13.275863, 22.586208, 13.793104, -5.689654
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
{
"edges": [
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 0,
"s1_id": 1
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 1,
"s1_id": 2
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 2,
"s1_id": 3
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 3,
"s1_id": 4
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 4,
"s1_id": 5
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 5,
"s1_id": 6
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 7,
"s1_id": 8
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 8,
"s1_id": 9
},
{
"has_automated_door": false,
"has_door": false,
"has_elevator": false,
"has_stairs": false,
"max_clearance": 1.0,
"max_speed": 2.0,
"s0_id": 9,
"s1_id": 10
}
],
"nodes": [
{
"id": 0,
"loc": {
"x": -84.42088317871094,
"y": 36.796165466308594
}
},
{
"id": 1,
"loc": {
"x": -65.49714660644531,
"y": 35.95743942260742
}
},
{
"id": 2,
"loc": {
"x": -64.39631652832031,
"y": 13.678800582885742
}
},
{
"id": 3,
"loc": {
"x": -70.1101303100586,
"y": 13.573960304260254
}
},
{
"id": 4,
"loc": {
"x": -70.16255187988281,
"y": 7.860144138336182
}
},
{
"id": 5,
"loc": {
"x": -57.47683334350586,
"y": 8.01740550994873
}
},
{
"id": 6,
"loc": {
"x": -57.73893737792969,
"y": 37.844573974609375
}
},
{
"id": 7,
"loc": {
"x": -85.10234069824219,
"y": 6.602056503295898
}
},
{
"id": 8,
"loc": {
"x": -70.1101303100586,
"y": 6.287534236907959
}
},
{
"id": 9,
"loc": {
"x": -55.43243408203125,
"y": 6.339954853057861
}
},
{
"id": 10,
"loc": {
"x": -56.06148147583008,
"y": 38.001834869384766
}
}
]
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-87.844826, 40.172413, -88.017242, -13.965517
-19.000624, 26.448141, -19.000624, 26.448141
-20.026054, 26.319963, -20.026054, 26.319963
-87.704407, 30.549860, -68.605782, 30.549860
-60.658703, 39.906906, -60.530525, 9.913089
-68.477600, 30.678040, -68.093063, 18.501062
-68.033943, 18.292671, -79.927086, 18.129751
-79.927086, 18.129751, -79.764160, 10.309603
-79.764160, 10.146683, -73.573212, 10.146683
-60.621090, 10.146683, -66.893501, 10.228143
-88.073074, 5.014711, -73.654671, 4.933251
-73.654671, 4.933251, -73.736130, -13.476682
-66.730583, 4.770331, -66.486206, -13.639602
-66.730583, 4.444491, -53.126781, 4.444491
-53.126781, 4.281572, -54.104301, 40.042458
-88.073074, -13.721062, -66.404739, -13.558142
-87.828690, 40.205379, -60.702553, 39.716621
38 changes: 38 additions & 0 deletions logs_multienv.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/home/rosdev/social_gym
/home/rosdev/social_gym
Name: SuperSuit
Version: 3.9.0
Summary: Wrappers for Gymnasium and PettingZoo
Home-page: None
Author: None
Author-email: Farama Foundation <contact@farama.org>
License: MIT License
Location: /usr/local/lib/python3.8/dist-packages
Requires: tinyscaler, gymnasium, numpy
Required-by:
Name: pettingzoo
Version: 1.23.1
Summary: Gymnasium for multi-agent reinforcement learning.
Home-page: None
Author: None
Author-email: Farama Foundation <contact@farama.org>
License: MIT License
Location: /usr/local/lib/python3.8/dist-packages
Requires: gymnasium, numpy
Required-by:
Name: stable-baselines3
Version: 2.1.0
Summary: Pytorch version of Stable Baselines, implementations of reinforcement learning algorithms.
Home-page: https://github.com/DLR-RM/stable-baselines3
Author: Antonin Raffin
Author-email: antonin.raffin@dlr.de
License: MIT
Location: /usr/local/lib/python3.8/dist-packages
Requires: matplotlib, gymnasium, pandas, torch, cloudpickle, numpy
Required-by: sb3-contrib, imitation
Python 3.8.10
[ INFO] [1693431990.500186587]: Updated sim with live config: Rate=40 incoming rate=40
[ INFO] [1693431990.508012836]: Using default queue size of 10 for publisher queues... 
[ INFO] [1693431990.520342905]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation
[ INFO] [1693431990.540756953]: node initialized, now running 
Service Mode
2 changes: 2 additions & 0 deletions scripts/create_env_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def create_new_env(name: str, template: str = None):
out = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out.wait()

print("HI")

subprocess.Popen(["sudo", "chmod", "-R", "a+rwX", f"{ROOT_FOLDER}"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
subprocess.Popen(["sudo", "chmod", "-R", "a+rwX", f"{AMRL_MAPS_FOLDER}"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
subprocess.Popen(["sudo", "chmod", "-R", "a+rwX", f"{UT_MULTI_ROBOT_SIM_MAPS_FOLDER}"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Expand Down
Loading

0 comments on commit de4e13d

Please sign in to comment.