In this repository we will track the process of the autonomous driving of an amazon deepracer model robot around certain tracks in Gazebo using reinforcement learning.
In order to run the project, firstly install Python for ROS:
sudo apt install python3-rosdep build-essential
Then, clone this repository:
git clone https://github.com/RoboticsLabURJC/2022-tfg-luismiguel-lopez.git
Once cloned, compile the workspace with
cd tfg_ws
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
Passing the intrepret to the compilation to ensure the correct usage of the nodes.
If any issue pops up while compiling, install the required dependencies using the command
rosdep install --from-paths src --ignore-src -r -y
And source it accordingly
source devel/setup.bash
According to the launch properties, models should be automatically launched when you execute the comand in order to load the simulation world. If this does not happen, make sure to copy the models of the project into the .gazebo folder on your user home. In order to do that, use the following command in the root of the workspace:
cp -r src/track_model/models/ ~/.gazebo
Firstly, make sure you have followed all the package configuration steps on this readme
In order to test out the functionalities, we need to firstly launch the world using
roslaunch track_model deepracer.launch
This will launch the world, the robot and the according topics for both the camera and the actuators control.
In order to execute a teleop operation, you must first launch the control node:
rosrun track_model control.py
Once the control node is launched, launch the teleop with the following command:
rosrun track_model teleop.py
In the same way the teleop works, firstly we need to launch the control
rosrun track_model control.py
Once the control node is launched, launch the follow line node with the following command:
rosrun track_model follow_line.py
With the launchers, you can launch either teleop or visual approach line following:
roslaunch track_model follow_line_launcher.launch
roslaunch track_model teleop_launcher.launch
NOTE: if any of the launching fails it may be related with this issue. Install ROSpkg with this command:
pip3 install rospkg