This project uses a DRL algorithm (TD3) to perform a goal-reaching task for a robotic arm, while avoiding obstacles using camera images. This is the result of my master thesis, which can be found here.
To get a local copy up and running follow these simple steps.
This project was tested using python versions 3.7.10 and 3.8.8, but any recent python version should work.
-
Clone the repo
git clone https://github.com/fpadula/visualcollisionarm
-
Navigate to the Python Scripts folder and create a new virtualenv
cd python_scripts/ python -m virtualenv venv
-
Enable the virtualenv and install all the necessary python packages
source venv/bin/activate pip install -r python_packages.txt
-
Run a pre-trained model with a single agent using visual and scalar inputs, and enable input visualization
python src/trainer.py --run_id VisualModel --config_file configs/base_config_visual_aug.yaml --device cuda --exec_type eval --env_location simu_envs/SingleAgentVisualization/scene.x86_64 --simu_spd 1 --eval_episodes 10 --seed 1 --visualize_input true
-
Run a pre-trained model using multiple agents that uses visual and scalar values
python src/trainer.py --run_id VisualModel --config_file configs/base_config_visual_aug.yaml --device cuda --exec_type eval --env_location simu_envs/AllAgentsVisual/scene.x86_64 --simu_spd 1
-
Run a pre-trained model using multiple agents that uses only scalar values
python src/trainer.py --run_id ScalarModel --config_file configs/base_config.yaml --device cuda --exec_type eval --env_location simu_envs/AllAgentsScalar/scene.x86_64 --simu_spd 1
-
Gym-Wrapper example; running a random policy:
python examples/gym_api.py
- Organize the code a little bit better
- Add more usage examples