diff --git a/docs/_site/contributing/making_docs.html b/docs/_site/contributing/making_docs.html index 5a1ba811..e4322bf5 100644 --- a/docs/_site/contributing/making_docs.html +++ b/docs/_site/contributing/making_docs.html @@ -1,7 +1,7 @@
The source code for all the documentation can be found in {PROJECT_ROOT}/docs_src
{PROJECT_ROOT}/docs_src
We use Sphinx to create our documentation and host it in Github Pages.
Check out docs_src/index.rst for the layout of the pages (starting on line 6). That file will point to the source doc @@ -86,17 +83,17 @@
docs_src/index.rst
./build.sh
./git_add.sh
git commit -m "Doc changes" -git push +3.) The files are now staged in git, you can do +git commit -m "Doc changes" +git push and the website should update within the next 5-10minutes. diff --git a/docs/_site/index.html b/docs/_site/index.html index f2e8f27b..468d4645 100644 --- a/docs/_site/index.html +++ b/docs/_site/index.html @@ -1,7 +1,7 @@ - + Welcome to the Social Gym 2.0 documentation! — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Welcome to the Social Gym 2.0 documentation! View page source @@ -74,7 +71,7 @@ -Welcome to the Social Gym 2.0 documentation! +Welcome to the Social Gym 2.0 documentation! (Find the GitHub link at https://github.com/ut-amrl/social_gym) @@ -116,7 +113,7 @@ Welcome to the Social Gym 2.0 documentation! -Indices and tables +Indices and tables Index Module Index diff --git a/docs/_site/installation/advanced_usage.html b/docs/_site/installation/advanced_usage.html index 87efb5a8..8a7fee0d 100644 --- a/docs/_site/installation/advanced_usage.html +++ b/docs/_site/installation/advanced_usage.html @@ -1,7 +1,7 @@ - + Advanced Usage — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Usage View page source @@ -74,7 +71,7 @@ -Advanced Usage +Advanced Usage There’s a FAQ at the bottom (maybe worth reading first). Expect this process to take about 3-6 hours :/ WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -84,7 +81,7 @@ Advanced Usage -Requirements +Requirements We have only tested this full process on Pycharm and CLion Professional IDEs. However, what’s really needed is the ability to have a remote source or remote server that you can plug your IDE into. Specifically, we are going to plug our IDE (Pycharm/CLion) into a docker container via SSH. Our IDE’s allow us to do this @@ -92,38 +89,38 @@ Requirements -Advanced Usage setup (buckle up!) +Advanced Usage setup (buckle up!) We’ve broken this tutorial into 3 parts, the first is the basic setup, the second will get the submodules running, and the final part will focus on the python code and running the actual simulator end to end. -Part 1: Setting up the basic Social Gym dependencies and containers +Part 1: Setting up the basic Social Gym dependencies and containers -1.) From the basic installation guide follow steps 1-5 +1.) From the basic installation guide follow steps 1-5 They are not repeated here in case they change at some time -2.) Build and “up” the docker containers +2.) Build and “up” the docker containers From the root directory of the project -docker-compose build && docker-compose up +docker-compose build && docker-compose up Make sure you see an RVIS window after the docker-up command finishes. If you don’t, check your logs for build errors. -3.) Open the submodule projects ut_multirobot_sim and graph_navigation in a separate IDE window (I use CLion for these) +3.) Open the submodule projects ut_multirobot_sim and graph_navigation in a separate IDE window (I use CLion for these) Make sure you are opening them from the directory {PROJECT_ROOT}/submodules/ut_multirobot_sim and {PROJECT_ROOT}/submodules/graph_navigation – we will be running the submodules from these windows (you could also run them from the ssh terminal in the subsequent steps) -Part 2: Setting up the submodules +Part 2: Setting up the submodules This part of the setup was heavily inspired by https://github.com/nocoinman/ros-docker-clion – big shoutout to this project :) -1.) SSH into the ROS submodules container -ssh rosdev@localhost -p 2222 +1.) SSH into the ROS submodules container +ssh rosdev@localhost -p 2222 yes 12345 @@ -134,25 +131,25 @@ 1.) SSH into the ROS submodules container -2.) Build static dependencies. +2.) Build static dependencies. There are a few submodules that really just contain libraries or code that does not need to be ran. We still need to compile them so that we can reference them in the other sobumodules. -source ~/set_paths.sh -rosdep update -cd social_gym/submodules/amrl_msgs +source ~/set_paths.sh +rosdep update +cd social_gym/submodules/amrl_msgs make -cd ../pedsim_ros +cd ../pedsim_ros catkin_make -cd ../ +cd ../ Make sure rosdep udpate succeeds! If it fails, you won’t be able to build the submodules. -3.) Build the Graph Navigation submodule +3.) Build the Graph Navigation submodule This submodule handles low level navigation for the agents. Assuming you are starting from the {PROJECT_ROOT}/submodules directory -cd graph_navigation +cd graph_navigation make @@ -163,7 +160,7 @@ 3.) Build the Graph Navigation submodule -4.) Setup Graph Navigation with your IDE +4.) Setup Graph Navigation with your IDE If you have a different IDE other than CLION Commercial or Professional find out how to configure a remote host via ssh. Some of this will be relevant (like setting global env variables) but most of it may be CLION specific. Before following the steps below, run @@ -196,8 +193,8 @@ 4.) Setup Graph Navigation with your IDEsudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ remember the password is 12345 if you have not changed it. @@ -213,9 +210,9 @@ 4.) Setup Graph Navigation with your IDE NOTE: If you are going to be using custom maps, this is one of the places you’ll have to update the name (-map) 21.) Hit Apply and OK then hit Run. You should see the IDE build the project and eventually produce -/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy -Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... -Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges +/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy +Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... +Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges If you see anything other than what’s shown here (except for maybe vertices counts) double check your configuration and @@ -223,28 +220,28 @@ 4.) Setup Graph Navigation with your IDE -5.) Setup UT Multirobot Sim with your IDE +5.) Setup UT Multirobot Sim with your IDE For this next step I like creating a new terminal in a new IDE window, but that’s entirely up to you. Keep those environment parameters we copied from the Graph Navigation setup for this step as well! I am going to go a bit faster here since almost all the steps are repeating what we’ve already done for Graph Nav. 1.) Navigate to your UT_Multirobot_sim IDE window and open a new terminal with a new ssh connection into the same container ssh rosdev@localhost -p 2222 (password is 12345 unless you changed it) 2.) Set up the shell -cd social_gym/submodules/ut_multirobot_sim/ +cd social_gym/submodules/ut_multirobot_sim/ 3.) Edit the source file to include a new submodule -vim ~/set_paths.sh +vim ~/set_paths.sh Uncomment the second line write and quit 4.) Source variables. -source ./set_paths.sh +source ./set_paths.sh 5.) Update rosdep -rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
git commit -m "Doc changes" +git push
and the website should update within the next 5-10minutes.
(Find the GitHub link at https://github.com/ut-amrl/social_gym)
Index
Module Index
There’s a FAQ at the bottom (maybe worth reading first). Expect this process to take about 3-6 hours :/
WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -84,7 +81,7 @@
We have only tested this full process on Pycharm and CLion Professional IDEs. However, what’s really needed is the ability to have a remote source or remote server that you can plug your IDE into. Specifically, we are going to plug our IDE (Pycharm/CLion) into a docker container via SSH. Our IDE’s allow us to do this @@ -92,38 +89,38 @@
We’ve broken this tutorial into 3 parts, the first is the basic setup, the second will get the submodules running, and the final part will focus on the python code and running the actual simulator end to end.
They are not repeated here in case they change at some time
From the root directory of the project
docker-compose build && docker-compose up +docker-compose build && docker-compose up Make sure you see an RVIS window after the docker-up command finishes. If you don’t, check your logs for build errors. -3.) Open the submodule projects ut_multirobot_sim and graph_navigation in a separate IDE window (I use CLion for these) +3.) Open the submodule projects ut_multirobot_sim and graph_navigation in a separate IDE window (I use CLion for these) Make sure you are opening them from the directory {PROJECT_ROOT}/submodules/ut_multirobot_sim and {PROJECT_ROOT}/submodules/graph_navigation – we will be running the submodules from these windows (you could also run them from the ssh terminal in the subsequent steps) -Part 2: Setting up the submodules +Part 2: Setting up the submodules This part of the setup was heavily inspired by https://github.com/nocoinman/ros-docker-clion – big shoutout to this project :) -1.) SSH into the ROS submodules container -ssh rosdev@localhost -p 2222 +1.) SSH into the ROS submodules container +ssh rosdev@localhost -p 2222 yes 12345 @@ -134,25 +131,25 @@ 1.) SSH into the ROS submodules container -2.) Build static dependencies. +2.) Build static dependencies. There are a few submodules that really just contain libraries or code that does not need to be ran. We still need to compile them so that we can reference them in the other sobumodules. -source ~/set_paths.sh -rosdep update -cd social_gym/submodules/amrl_msgs +source ~/set_paths.sh +rosdep update +cd social_gym/submodules/amrl_msgs make -cd ../pedsim_ros +cd ../pedsim_ros catkin_make -cd ../ +cd ../ Make sure rosdep udpate succeeds! If it fails, you won’t be able to build the submodules. -3.) Build the Graph Navigation submodule +3.) Build the Graph Navigation submodule This submodule handles low level navigation for the agents. Assuming you are starting from the {PROJECT_ROOT}/submodules directory -cd graph_navigation +cd graph_navigation make @@ -163,7 +160,7 @@ 3.) Build the Graph Navigation submodule -4.) Setup Graph Navigation with your IDE +4.) Setup Graph Navigation with your IDE If you have a different IDE other than CLION Commercial or Professional find out how to configure a remote host via ssh. Some of this will be relevant (like setting global env variables) but most of it may be CLION specific. Before following the steps below, run @@ -196,8 +193,8 @@ 4.) Setup Graph Navigation with your IDEsudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ remember the password is 12345 if you have not changed it. @@ -213,9 +210,9 @@ 4.) Setup Graph Navigation with your IDE NOTE: If you are going to be using custom maps, this is one of the places you’ll have to update the name (-map) 21.) Hit Apply and OK then hit Run. You should see the IDE build the project and eventually produce -/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy -Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... -Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges +/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy +Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... +Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges If you see anything other than what’s shown here (except for maybe vertices counts) double check your configuration and @@ -223,28 +220,28 @@ 4.) Setup Graph Navigation with your IDE -5.) Setup UT Multirobot Sim with your IDE +5.) Setup UT Multirobot Sim with your IDE For this next step I like creating a new terminal in a new IDE window, but that’s entirely up to you. Keep those environment parameters we copied from the Graph Navigation setup for this step as well! I am going to go a bit faster here since almost all the steps are repeating what we’ve already done for Graph Nav. 1.) Navigate to your UT_Multirobot_sim IDE window and open a new terminal with a new ssh connection into the same container ssh rosdev@localhost -p 2222 (password is 12345 unless you changed it) 2.) Set up the shell -cd social_gym/submodules/ut_multirobot_sim/ +cd social_gym/submodules/ut_multirobot_sim/ 3.) Edit the source file to include a new submodule -vim ~/set_paths.sh +vim ~/set_paths.sh Uncomment the second line write and quit 4.) Source variables. -source ./set_paths.sh +source ./set_paths.sh 5.) Update rosdep -rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
docker-compose build && docker-compose up
Make sure you see an RVIS window after the docker-up command finishes. If you don’t, check your logs for build errors.
docker-up
ut_multirobot_sim
graph_navigation
Make sure you are opening them from the directory {PROJECT_ROOT}/submodules/ut_multirobot_sim and {PROJECT_ROOT}/submodules/graph_navigation – we will be running the submodules from these windows (you could also run them from the ssh terminal in the subsequent steps)
{PROJECT_ROOT}/submodules/ut_multirobot_sim
{PROJECT_ROOT}/submodules/graph_navigation
This part of the setup was heavily inspired by https://github.com/nocoinman/ros-docker-clion – big shoutout to this project :)
ssh rosdev@localhost -p 2222 +1.) SSH into the ROS submodules container +ssh rosdev@localhost -p 2222 yes 12345 @@ -134,25 +131,25 @@ 1.) SSH into the ROS submodules container -2.) Build static dependencies. +2.) Build static dependencies. There are a few submodules that really just contain libraries or code that does not need to be ran. We still need to compile them so that we can reference them in the other sobumodules. -source ~/set_paths.sh -rosdep update -cd social_gym/submodules/amrl_msgs +source ~/set_paths.sh +rosdep update +cd social_gym/submodules/amrl_msgs make -cd ../pedsim_ros +cd ../pedsim_ros catkin_make -cd ../ +cd ../ Make sure rosdep udpate succeeds! If it fails, you won’t be able to build the submodules. -3.) Build the Graph Navigation submodule +3.) Build the Graph Navigation submodule This submodule handles low level navigation for the agents. Assuming you are starting from the {PROJECT_ROOT}/submodules directory -cd graph_navigation +cd graph_navigation make @@ -163,7 +160,7 @@ 3.) Build the Graph Navigation submodule -4.) Setup Graph Navigation with your IDE +4.) Setup Graph Navigation with your IDE If you have a different IDE other than CLION Commercial or Professional find out how to configure a remote host via ssh. Some of this will be relevant (like setting global env variables) but most of it may be CLION specific. Before following the steps below, run @@ -196,8 +193,8 @@ 4.) Setup Graph Navigation with your IDEsudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ remember the password is 12345 if you have not changed it. @@ -213,9 +210,9 @@ 4.) Setup Graph Navigation with your IDE NOTE: If you are going to be using custom maps, this is one of the places you’ll have to update the name (-map) 21.) Hit Apply and OK then hit Run. You should see the IDE build the project and eventually produce -/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy -Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... -Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges +/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy +Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... +Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges If you see anything other than what’s shown here (except for maybe vertices counts) double check your configuration and @@ -223,28 +220,28 @@ 4.) Setup Graph Navigation with your IDE -5.) Setup UT Multirobot Sim with your IDE +5.) Setup UT Multirobot Sim with your IDE For this next step I like creating a new terminal in a new IDE window, but that’s entirely up to you. Keep those environment parameters we copied from the Graph Navigation setup for this step as well! I am going to go a bit faster here since almost all the steps are repeating what we’ve already done for Graph Nav. 1.) Navigate to your UT_Multirobot_sim IDE window and open a new terminal with a new ssh connection into the same container ssh rosdev@localhost -p 2222 (password is 12345 unless you changed it) 2.) Set up the shell -cd social_gym/submodules/ut_multirobot_sim/ +cd social_gym/submodules/ut_multirobot_sim/ 3.) Edit the source file to include a new submodule -vim ~/set_paths.sh +vim ~/set_paths.sh Uncomment the second line write and quit 4.) Source variables. -source ./set_paths.sh +source ./set_paths.sh 5.) Update rosdep -rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
ssh rosdev@localhost -p 2222 yes 12345
There are a few submodules that really just contain libraries or code that does not need to be ran. We still need to compile them so that we can reference them in the other sobumodules.
source ~/set_paths.sh -rosdep update -cd social_gym/submodules/amrl_msgs +source ~/set_paths.sh +rosdep update +cd social_gym/submodules/amrl_msgs make -cd ../pedsim_ros +cd ../pedsim_ros catkin_make -cd ../ +cd ../ Make sure rosdep udpate succeeds! If it fails, you won’t be able to build the submodules. -3.) Build the Graph Navigation submodule +3.) Build the Graph Navigation submodule This submodule handles low level navigation for the agents. Assuming you are starting from the {PROJECT_ROOT}/submodules directory -cd graph_navigation +cd graph_navigation make @@ -163,7 +160,7 @@ 3.) Build the Graph Navigation submodule -4.) Setup Graph Navigation with your IDE +4.) Setup Graph Navigation with your IDE If you have a different IDE other than CLION Commercial or Professional find out how to configure a remote host via ssh. Some of this will be relevant (like setting global env variables) but most of it may be CLION specific. Before following the steps below, run @@ -196,8 +193,8 @@ 4.) Setup Graph Navigation with your IDEsudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ remember the password is 12345 if you have not changed it. @@ -213,9 +210,9 @@ 4.) Setup Graph Navigation with your IDE NOTE: If you are going to be using custom maps, this is one of the places you’ll have to update the name (-map) 21.) Hit Apply and OK then hit Run. You should see the IDE build the project and eventually produce -/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy -Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... -Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges +/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy +Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... +Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges If you see anything other than what’s shown here (except for maybe vertices counts) double check your configuration and @@ -223,28 +220,28 @@ 4.) Setup Graph Navigation with your IDE -5.) Setup UT Multirobot Sim with your IDE +5.) Setup UT Multirobot Sim with your IDE For this next step I like creating a new terminal in a new IDE window, but that’s entirely up to you. Keep those environment parameters we copied from the Graph Navigation setup for this step as well! I am going to go a bit faster here since almost all the steps are repeating what we’ve already done for Graph Nav. 1.) Navigate to your UT_Multirobot_sim IDE window and open a new terminal with a new ssh connection into the same container ssh rosdev@localhost -p 2222 (password is 12345 unless you changed it) 2.) Set up the shell -cd social_gym/submodules/ut_multirobot_sim/ +cd social_gym/submodules/ut_multirobot_sim/ 3.) Edit the source file to include a new submodule -vim ~/set_paths.sh +vim ~/set_paths.sh Uncomment the second line write and quit 4.) Source variables. -source ./set_paths.sh +source ./set_paths.sh 5.) Update rosdep -rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
source ~/set_paths.sh +rosdep update +cd social_gym/submodules/amrl_msgs make -cd ../pedsim_ros +cd ../pedsim_ros catkin_make -cd ../ +cd ../
Make sure rosdep udpate succeeds! If it fails, you won’t be able to build the submodules.
rosdep udpate
This submodule handles low level navigation for the agents.
Assuming you are starting from the {PROJECT_ROOT}/submodules directory
{PROJECT_ROOT}/submodules
cd graph_navigation +cd graph_navigation make @@ -163,7 +160,7 @@ 3.) Build the Graph Navigation submodule -4.) Setup Graph Navigation with your IDE +4.) Setup Graph Navigation with your IDE If you have a different IDE other than CLION Commercial or Professional find out how to configure a remote host via ssh. Some of this will be relevant (like setting global env variables) but most of it may be CLION specific. Before following the steps below, run @@ -196,8 +193,8 @@ 4.) Setup Graph Navigation with your IDEsudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ remember the password is 12345 if you have not changed it. @@ -213,9 +210,9 @@ 4.) Setup Graph Navigation with your IDE NOTE: If you are going to be using custom maps, this is one of the places you’ll have to update the name (-map) 21.) Hit Apply and OK then hit Run. You should see the IDE build the project and eventually produce -/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy -Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... -Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges +/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy +Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... +Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges If you see anything other than what’s shown here (except for maybe vertices counts) double check your configuration and @@ -223,28 +220,28 @@ 4.) Setup Graph Navigation with your IDE -5.) Setup UT Multirobot Sim with your IDE +5.) Setup UT Multirobot Sim with your IDE For this next step I like creating a new terminal in a new IDE window, but that’s entirely up to you. Keep those environment parameters we copied from the Graph Navigation setup for this step as well! I am going to go a bit faster here since almost all the steps are repeating what we’ve already done for Graph Nav. 1.) Navigate to your UT_Multirobot_sim IDE window and open a new terminal with a new ssh connection into the same container ssh rosdev@localhost -p 2222 (password is 12345 unless you changed it) 2.) Set up the shell -cd social_gym/submodules/ut_multirobot_sim/ +cd social_gym/submodules/ut_multirobot_sim/ 3.) Edit the source file to include a new submodule -vim ~/set_paths.sh +vim ~/set_paths.sh Uncomment the second line write and quit 4.) Source variables. -source ./set_paths.sh +source ./set_paths.sh 5.) Update rosdep -rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
cd graph_navigation make
If you have a different IDE other than CLION Commercial or Professional find out how to configure a remote host via ssh. Some of this will be relevant (like setting global env variables) but most of it may be CLION specific.
Before following the steps below, run
sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ remember the password is 12345 if you have not changed it. @@ -213,9 +210,9 @@ 4.) Setup Graph Navigation with your IDE NOTE: If you are going to be using custom maps, this is one of the places you’ll have to update the name (-map) 21.) Hit Apply and OK then hit Run. You should see the IDE build the project and eventually produce -/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy -Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... -Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges +/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy +Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... +Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges If you see anything other than what’s shown here (except for maybe vertices counts) double check your configuration and @@ -223,28 +220,28 @@ 4.) Setup Graph Navigation with your IDE -5.) Setup UT Multirobot Sim with your IDE +5.) Setup UT Multirobot Sim with your IDE For this next step I like creating a new terminal in a new IDE window, but that’s entirely up to you. Keep those environment parameters we copied from the Graph Navigation setup for this step as well! I am going to go a bit faster here since almost all the steps are repeating what we’ve already done for Graph Nav. 1.) Navigate to your UT_Multirobot_sim IDE window and open a new terminal with a new ssh connection into the same container ssh rosdev@localhost -p 2222 (password is 12345 unless you changed it) 2.) Set up the shell -cd social_gym/submodules/ut_multirobot_sim/ +cd social_gym/submodules/ut_multirobot_sim/ 3.) Edit the source file to include a new submodule -vim ~/set_paths.sh +vim ~/set_paths.sh Uncomment the second line write and quit 4.) Source variables. -source ./set_paths.sh +source ./set_paths.sh 5.) Update rosdep -rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/
remember the password is 12345 if you have not changed it.
12345
NOTE: If you are going to be using custom maps, this is one of the places you’ll have to update the name (-map)
-map
21.) Hit Apply and OK then hit Run. You should see the IDE build the project and eventually produce
/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy -Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... -Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges +/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy +Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... +Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges If you see anything other than what’s shown here (except for maybe vertices counts) double check your configuration and @@ -223,28 +220,28 @@ 4.) Setup Graph Navigation with your IDE -5.) Setup UT Multirobot Sim with your IDE +5.) Setup UT Multirobot Sim with your IDE For this next step I like creating a new terminal in a new IDE window, but that’s entirely up to you. Keep those environment parameters we copied from the Graph Navigation setup for this step as well! I am going to go a bit faster here since almost all the steps are repeating what we’ve already done for Graph Nav. 1.) Navigate to your UT_Multirobot_sim IDE window and open a new terminal with a new ssh connection into the same container ssh rosdev@localhost -p 2222 (password is 12345 unless you changed it) 2.) Set up the shell -cd social_gym/submodules/ut_multirobot_sim/ +cd social_gym/submodules/ut_multirobot_sim/ 3.) Edit the source file to include a new submodule -vim ~/set_paths.sh +vim ~/set_paths.sh Uncomment the second line write and quit 4.) Source variables. -source ./set_paths.sh +source ./set_paths.sh 5.) Update rosdep -rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
/home/rosdev/social_gym/submodules/graph_navigation/cmake-build-remotedebugger/../bin/social_nav -service_mode=true -map=exp2/train/easy +Loading /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json... +Loaded /home/rosdev/social_gym/submodules/amrl_maps/exp2/train/easy/exp2/train/easy.navigation.json with 18 states, 17 edges
If you see anything other than what’s shown here (except for maybe vertices counts) double check your configuration and @@ -223,28 +220,28 @@
For this next step I like creating a new terminal in a new IDE window, but that’s entirely up to you.
Keep those environment parameters we copied from the Graph Navigation setup for this step as well!
I am going to go a bit faster here since almost all the steps are repeating what we’ve already done for Graph Nav.
1.) Navigate to your UT_Multirobot_sim IDE window and open a new terminal with a new ssh connection into the same container ssh rosdev@localhost -p 2222 (password is 12345 unless you changed it)
ssh rosdev@localhost -p 2222
2.) Set up the shell
cd social_gym/submodules/ut_multirobot_sim/ +cd social_gym/submodules/ut_multirobot_sim/ 3.) Edit the source file to include a new submodule -vim ~/set_paths.sh +vim ~/set_paths.sh Uncomment the second line write and quit 4.) Source variables. -source ./set_paths.sh +source ./set_paths.sh 5.) Update rosdep -rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
cd social_gym/submodules/ut_multirobot_sim/
3.) Edit the source file to include a new submodule
vim ~/set_paths.sh +vim ~/set_paths.sh Uncomment the second line write and quit 4.) Source variables. -source ./set_paths.sh +source ./set_paths.sh 5.) Update rosdep -rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
vim ~/set_paths.sh
Uncomment the second line write and quit
4.) Source variables.
source ./set_paths.sh +source ./set_paths.sh 5.) Update rosdep -rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
source ./set_paths.sh
5.) Update rosdep
rosdep update +rosdep update 6.) Make the simulator @@ -265,8 +262,8 @@ 5.) Setup UT Multirobot Sim with your IDE/home/rosdev/social_gym/submodules/ut_multirobot_sim 12.) Click Apply and OK to close the settings window. 13.) Clean the projects CMAKE configs -sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
rosdep update
6.) Make the simulator
12.) Click Apply and OK to close the settings window.
13.) Clean the projects CMAKE configs
sudo rm -r cmake-build-debug/ -sudo rm -r cmake-build-remotedebugger/ +sudo rm -r cmake-build-debug/ +sudo rm -r cmake-build-remotedebugger/ 14.) Go to the CMake tab on your IDE (by the terminal window tab) @@ -280,23 +277,23 @@ 5.) Setup UT Multirobot Sim with your IDEEnvironment Variables should have the pasted environment variables from ~/get_vars.sh 19.) Click the Run button 20.) You should see the project rebuild and then an error message -/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
14.) Go to the CMake tab on your IDE (by the terminal window tab)
~/get_vars.sh
19.) Click the Run button
20.) You should see the project rebuild and then an error message
/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim +/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1 This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@ 5.) Setup UT Multirobot Sim with your IDE -Part 3: Setting up Python and Running everything! +Part 3: Setting up Python and Running everything! -1.) Open up Pycharm to the root folder of the project +1.) Open up Pycharm to the root folder of the project -2.) Set up your IDE with the container via SSH (Pycharm Specific) +2.) Set up your IDE with the container via SSH (Pycharm Specific) Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide. 1.) Open the settings window file < settings @@ -333,27 +330,27 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific)Parameters should have -c ./tmp_config.json Environment variables should have the pasted env vars we keep getting in the previous steps. 10.) Open a new ssh terminal -ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
/home/rosdev/social_gym/submodules/ut_multirobot_sim/cmake-build-debug-docremotetest/../bin/simulator -sim_config /home/rosdev/social_gym/config/gym_gen/sim_config.lua -scene_config /home/rosdev/social_gym/config/gym_gen/scene.xml -speedup_factor 1.0 --localize --use_pedsim -UT Multi-Robot Simulator +UT Multi-Robot Simulator -Publish GoAlone message -Publish GoAlone message -ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt -Run-time stats for Pass : mean run time = -nan ms, invocations = 0 -Run-time stats for Follow : mean run time = -nan ms, invocations = 0 -Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 -Run-time stats for Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 -Run-time stats for Step : mean run time = -nan ms, invocations = 0 -Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 -Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 +Publish GoAlone message +Publish GoAlone message +ERROR: Unable to load map maps/closed/door/t1/closed/door/t1.vectormap.txt +Run-time stats for Pass : mean run time = -nan ms, invocations = 0 +Run-time stats for Follow : mean run time = -nan ms, invocations = 0 +Run-time stats for GoAlone : mean run time = 0.017613 ms, invocations = 2 +Run-time stats for Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Publishing Halt : mean run time = -nan ms, invocations = 0 +Run-time stats for Step : mean run time = -nan ms, invocations = 0 +Run-time stats for StepUTMRS : mean run time = -nan ms, invocations = 0 +Run-time stats for StepPedsim : mean run time = -nan ms, invocations = 0 -Process finished with exit code 1 +Process finished with exit code 1
This is okay! This means the project was built correctly but the current configuration in the python project @@ -307,12 +304,12 @@
Similar to the UT Multirobot Sim and Graph Navigation guides, we assume your IDE has remote host available and if not, there’s some useful stuff here but you may have to translate the steps for your ide.
1.) Open the settings window file < settings
file < settings
-c ./tmp_config.json
Environment variables should have the pasted env vars we keep getting in the previous steps.
Environment variables
10.) Open a new ssh terminal
ssh rosdev@localhost -p 2223 -cd ./social_gym/submodules -vim ~/set_paths.sh +ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2 11.) Click run in your pycharm editor. It should hang around the input ... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode This means we can fire up the UT Multirobot simulator now @@ -365,7 +362,7 @@ 2.) Set up your IDE with the container via SSH (Pycharm Specific) -FAQ +FAQ All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files @@ -373,8 +370,8 @@ FAQ You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used. ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing -source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
ssh rosdev@localhost -p 2223 +cd ./social_gym/submodules +vim ~/set_paths.sh # uncomment the second line then save the file -source ~/set_paths.sh -rosdep update -pip install sb3_contrib -pip install supersuit==3.5.0 -pip install gym==0.26.2 +source ~/set_paths.sh +rosdep update +pip install sb3_contrib +pip install supersuit==3.5.0 +pip install gym==0.26.2
11.) Click run in your pycharm editor. It should hang around the input
... -Waiting on UTMRS -[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying -QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' -[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 -[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... -[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation -[ INFO] [1671386774.204534827]: node initialized, now running -Service Mode +Waiting on UTMRS +[WARN] [1671386774.168961]: wait_for_service(/utmrsStepper): failed to contact, will keep trying +QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-rosdev' +[ INFO] [1671386774.188148416]: Updated sim with live config: Rate=40 incoming rate=40 +[ INFO] [1671386774.192522299]: Using default queue size of 10 for publisher queues... +[ INFO] [1671386774.199740381]: Loading scene [/home/rosdev/social_gym/config/gym_gen/scene.xml] for simulation +[ INFO] [1671386774.204534827]: node initialized, now running +Service Mode
This means we can fire up the UT Multirobot simulator now
All my files are missing!: If at any point your files are missing or empty check out your path mappings for your project and make sure they are valid. Then, do git stash for every project that has missing or empty files
git stash
You will get tons of compile errors when you make a submodule saying “geometry” is undefined etc. This means you have to do git stash anywhere a thirdparty source is being used.
ROSDEP errors: If you see anything during the install about ROSDEP not working correctly, make sure you are doing
source ~/set_paths.sh -rosedep update +source ~/set_paths.sh +rosedep update often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@ FAQ CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding. Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run -sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
source ~/set_paths.sh +rosedep update
often – once you have built pedsim via catkin_make, you should remove the comment on the 2nd line of ~/set_paths.sh @@ -383,7 +380,7 @@
catkin_make
~/set_paths.sh
CMAKE errors: CMake is not fun. If you see weird issues with cmake not building or not finding stuff make sure you are removing the cmake folders then rebuilding.
Permission Issues: The easiest way to resolve weird permission issues when setting up the advanced usage is to run
sudo chmod -R 777 . +sudo chmod -R 777 . from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,20 +71,20 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@ Let’s Install Config Runner!apt. -1.) Clone the repo and checkout main -git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
sudo chmod -R 777 .
from the project root. This effectively gives all users access to the folder (warning: this may be too open if you are working diff --git a/docs/_site/installation/installation.html b/docs/_site/installation/installation.html index 5feeac6c..b59a5359 100644 --- a/docs/_site/installation/installation.html +++ b/docs/_site/installation/installation.html @@ -1,7 +1,7 @@
In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger.
config runner
Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing.
Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use)
WARNING: The authors of this project have had numerous issues with Docker and Docker-Compose when installed via snap. We @@ -95,24 +92,24 @@
git clone git@github.com:ut-amrl/social_gym.git -git checkout main +1.) Clone the repo and checkout main +git clone git@github.com:ut-amrl/social_gym.git +git checkout main Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Install requirements and run the install script! -python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
git clone git@github.com:ut-amrl/social_gym.git +git checkout main
Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff)
python ./scripts/install_config_runner.py +2.) Install requirements and run the install script! +python ./scripts/install_config_runner.py Expect this to take a while (20-40m depending on your machine, mostly for the last step.). -3.) Run the Config Runner! -python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
python ./scripts/install_config_runner.py
Expect this to take a while (20-40m depending on your machine, mostly for the last step.).
python config_runner/run.py -c 1_31_23/door/sacadrl.json +3.) Run the Config Runner! +python config_runner/run.py -c 1_31_23/door/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@ 3.) Run the Config Runner! NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
python config_runner/run.py -c 1_31_23/door/sacadrl.json
This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -122,7 +119,7 @@
NOTE: If you do NOT see windows, there’s a problem with the docker file.
First try running
sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -133,7 +130,7 @@ 3.) Run the Config Runner! -4.) Have fun! +4.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@ - + Installation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Installation View page source @@ -74,59 +71,59 @@ -Installation +Installation In this doc we are going to setup Social Gym’s config runner which allows you to run Social Gym using a configuration file. If all you need to do is train, evaluate, or test your installation of Social Gym, this is the only installation step you have to follow. However, if you wish to contribute and develop on Social Gym, we recommend the more indepth installation guide which goes over setting up a debugger. -Why are there two installation guides for Social Gym +Why are there two installation guides for Social Gym Social Gym uses ROS (Robot Operating System) submodules written in C, to ensure they installed correctly and can run on your machine, we use Docker. However, this poses challenges for debugging both the Python code and the C code because everything has to communicate with each other. To ease the process of setting Social Gym up, we separated installing Social Gym for running and experimenting from installing Social Gym for developing. -Let’s Install Config Runner! +Let’s Install Config Runner! Note: We require you have installed Docker and Python 3.8 (version 3.8 may not be necessary but it’s what we use) -1.) Checkout the right branch! (Eventually this will be main) -git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
sudo xhost +
and repeat the command. If it still fails to show windows then try adding
You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later.
If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/installation/installation__deprecated.html b/docs/_site/installation/installation__deprecated.html index fe4ef514..c69ad3ed 100644 --- a/docs/_site/installation/installation__deprecated.html +++ b/docs/_site/installation/installation__deprecated.html @@ -1,7 +1,7 @@
git checkout feature/20221218_multi_agent_finishing_and_cleanup -git submodule update --init --recursive +1.) Checkout the right branch! (Eventually this will be main) +git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive Although we use Docker to run Social Gym’s internals, we have scripts to set up Social Gym as well as scripts that kick off the process written in python (so you still need to install stuff) -2.) Build Vector Display (this creates the environments!) +2.) Build Vector Display (this creates the environments!) Assuming you are starting from the ROOT_DIRECTORY of the project: -cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
git checkout feature/20221218_multi_agent_finishing_and_cleanup +git submodule update --init --recursive
Assuming you are starting from the ROOT_DIRECTORY of the project:
cd docker/vectordisplay -docker build -t vector_display:custom . -cd ../.. +cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../.. Expect this to take a while (15-30m depending on your machine). -3.) Create a virtualenv to install python dependencies +3.) Create a virtualenv to install python dependencies Assuming linux/mac style, windows have their own special flavor for activating virtualenvs. -virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
cd docker/vectordisplay +docker build -t vector_display:custom . +cd ../..
Expect this to take a while (15-30m depending on your machine).
Assuming linux/mac style, windows have their own special flavor for activating virtualenvs.
virtualenv venv -source venv/bin/activate +virtualenv venv +source venv/bin/activate -4.) Install python requirements -pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
virtualenv venv +source venv/bin/activate
pip install -r requirements.txt +4.) Install python requirements +pip install -r requirements.txt -5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) -python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
pip install -r requirements.txt
python scripts/create_env_template.py -n exp1/train/easy +5.) Create the Environment for Social Gym (don’t worry, this is copying files really.) +python scripts/create_env_template.py -n exp1/train/easy The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi NOTE: If you do NOT see windows, there’s a problem with the docker file. First try running -sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
python scripts/create_env_template.py -n exp1/train/easy
The --name parameter is referencing a saved file checked in by a commit, you should expect to see two windows when @@ -136,7 +133,7 @@
--name
sudo xhost + +sudo xhost + and repeat the command. If it still fails to show windows then try adding @@ -147,17 +144,17 @@ 5.) Create the Environment for Social Gym (don’t worry, this is copying fi -6.) Build Config Runner +6.) Build Config Runner In order to run the docker container with Config Runner, you have to build the image. This can be done via -sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
In order to run the docker container with Config Runner, you have to build the image. This can be done via
sudo chmod +x ./config_runner/build.sh +sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh This may take 15-30minutes depending on your machine. -7.) Run the Config Runner! -python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
sudo chmod +x ./config_runner/build.sh ./config_runner/build.sh
This may take 15-30minutes depending on your machine.
python config_runner/run.py -c 11_20_22/sacadrl.json +7.) Run the Config Runner! +python config_runner/run.py -c 11_20_22/sacadrl.json This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@ 7.) Run the Config Runner! -7.) Have fun! +7.) Have fun! You can now specify your own configurations and run your own training or evaluation jobs. More documentation on this later. If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@ - + Advanced Training and Evaluation — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Advanced Training and Evaluation View page source @@ -74,7 +71,7 @@ -Advanced Training and Evaluation +Advanced Training and Evaluation Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below. # 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
python config_runner/run.py -c 11_20_22/sacadrl.json
This should open an RVIS window (looks like a 2D grid with options on the side-panels). It may CLOSE and re-open MANY @@ -170,7 +167,7 @@
If you need to develop or debug Social Gym – you’ll have to follow the full installation guide on the next diff --git a/docs/_site/intro/advanced_training_and_eval.html b/docs/_site/intro/advanced_training_and_eval.html index 5c5dbe13..f79a6701 100644 --- a/docs/_site/intro/advanced_training_and_eval.html +++ b/docs/_site/intro/advanced_training_and_eval.html @@ -1,7 +1,7 @@
Social Gym 2.0 uses a familiar Gym-like training loop with some important deviations, an example of training a new policy is shown below.
# 1.) Create the Scenario diff --git a/docs/_site/intro/features.html b/docs/_site/intro/features.html index 175a618f..cbede1df 100644 --- a/docs/_site/intro/features.html +++ b/docs/_site/intro/features.html @@ -1,7 +1,7 @@ - + What’s new in Social Gym 2.0 from the original release? — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + What’s new in Social Gym 2.0 from the original release? View page source @@ -74,7 +71,7 @@ -What’s new in Social Gym 2.0 from the original release? +What’s new in Social Gym 2.0 from the original release? Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier! @@ -86,7 +83,7 @@ What’s new in Social Gym 2.0 from the original release? -Social Gym Features +Social Gym Features Multi Agent training! * diff --git a/docs/_site/intro/making_a_new_scene.html b/docs/_site/intro/making_a_new_scene.html index 0f2d3ada..f33856a2 100644 --- a/docs/_site/intro/making_a_new_scene.html +++ b/docs/_site/intro/making_a_new_scene.html @@ -1,7 +1,7 @@ - + How to make a new Scene — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + How to make a new Scene View page source @@ -74,7 +71,7 @@ -How to make a new Scene +How to make a new Scene Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below. @@ -93,24 +90,24 @@ How to make a new Scene -Creating a new environment +Creating a new environment We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below. -1.) Using your local python interpreter of choice, run -python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
Social Gym 2.0 focused on multiagent training, enhanced feature extraction and policy modeling, modular control over environments and training, as well as various quality of life improvements to make training, evaluating, experimenting, and developing easier!
Multi Agent training! *
Scene (or environments) are what the agents are trained on. They consist of two important objects, the first are walls (denoted by blue lines). The next are navigation paths (denoted by pink/purple lines). These are explained a bit below.
We have an easy script for creating brand new scenes! It also allows editing scenes, or using an existing scene as a template for a new one. We’ll give a brief intro into how to make a new scene below.
python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} +1.) Using your local python interpreter of choice, run +python scripts/create_env_template --name {NAME YOUR NEW ENV HERE} -2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). +2.) If you have followed the Installation guide you should see a window pop up (if not double check that Social Gym was installed correctly). This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag Remove walls by [Control] + [Click] When you are satisfied with your walls, hit [Escape] -3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! +3.) A new window should have popped up that looks exactly like the last, but now we are in the Graph Navigation editor! The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”. Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@ 3.) A new window should have popped up that looks exactly like the last, but Hit [Escape] when done. -4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to +4.) Your Scene has been created and the files are in the right spot, but now you have to update the Social Gym code to reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so #... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
python scripts/create_env_template --name {NAME YOUR NEW ENV HERE}
This window is the Walls editor! It’s most likely blank on your screen, but you can add new walls by using [Shift] + [Click] + Mouse Drag
[Shift] + [Click] + Mouse Drag
Remove walls by [Control] + [Click]
[Control] + [Click]
When you are satisfied with your walls, hit [Escape]
[Escape]
The controls are the same except for one crucial difference. In the Graph Navigation editor, you create “Nodes” that can connect to each other through “Edges”. You must place “Nodes” first before you can draw an “Edge”.
Create a node by hitting [Shift] + [Click], Be advised - the nodes are literally the size of a pixel so they may be hard @@ -125,7 +122,7 @@
[Shift] + [Click]
Hit [Escape] when done.
reference your new scene. The easiest way to do this is to define a new GraphNavScenario scenario like so
GraphNavScenario
#... scenario = GraphNavScenario( diff --git a/docs/_site/intro/training_and_eval.html b/docs/_site/intro/training_and_eval.html index 48200431..dc169563 100644 --- a/docs/_site/intro/training_and_eval.html +++ b/docs/_site/intro/training_and_eval.html @@ -1,7 +1,7 @@ - + Training and Evaluation with ConfigRunner — Social Gym 2.0 documentation @@ -13,8 +13,9 @@ + + - @@ -25,16 +26,12 @@ - - - - - Social Gym 2.0 - + Social Gym 2.0 + - + @@ -62,7 +59,7 @@ - + Training and Evaluation with ConfigRunner View page source @@ -74,56 +71,56 @@ -Training and Evaluation with ConfigRunner +Training and Evaluation with ConfigRunner To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file) These configuration files are stored in {PROJECT ROOT}/config_runner/configs ConfigRunner allows you train and evaluate a policy using one of these files via -python config_runner/run.py -c {path_to_config} +
To ease batch training jobs we created a wrapper class around the training and evaluation code that can be configured via a configuration file (.yaml file)
These configuration files are stored in {PROJECT ROOT}/config_runner/configs
{PROJECT ROOT}/config_runner/configs
ConfigRunner allows you train and evaluate a policy using one of these files via
python config_runner/run.py -c {path_to_config} +