Skip to content

anurye/Mobile-Robot-Navigation-Using-Deep-Reinforcement-Learning-and-ROS

Repository files navigation

DRL-for-Mobile-Robot-Navigation-Using-ROS2

Requirements

Other requirements

pip install -r requirements.txt

Build

  • Clone this repository:
    mkdir -p ~/drl_agent_ws/src cd ~/drl_agent_ws/src git clone git@github.com:anurye/DRL-for-Mobile-Robot-Navigation-Using-ROS2.git
  • Export the environment variable DRL_AGENT_PACKAGE_PATH:
    echo 'export DRL_AGENT_PACKAGE_PATH=~/drl_agent_ws/src/drl_agent' >> ~/.bashrc source ~/.bashrc
  • Install dependencies:
    cd ~/drl_agent_ws rosdep install --from-path src -yi --rosdistro humble

If everything is set up correctly, you can proceed to the training step.

Training

  • Build the workspace:

    cd ~/drl_agent_ws colcon build
  • Launch the simulation:

    Terminal 1:

    cd ~/drl_agent_ws source install/setup.bash ros2 launch drl_agent_description simulation.launch.py

    Terminal 2:

    cd ~/drl_agent_ws source install/setup.bash ros2 run drl_agent environment.py 

    Terminal 3:

    cd ~/drl_agent_ws source install/setup.bash ros2 run drl_agent train_td7_agent.py

Note

The training process can take a a bit of time. You can stop it using CTRL+C once you notice an improvement.

Testing

If you have closed the terminals, restart the simulation in Terminal 1 and Terminal 2 as described above.

Terminal 3:

cd ~/drl_agent_ws source install/setup.bash ros2 run drl_agent test_td7_agent.py

Contribution

Feel free to contribute or ask questions by opening an issue

About

Deep Reinforcement Learning Based Mobile Robot Navigation Using ROS2 and Gazebo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published