After successfully installing and running Ubuntu:
- Install ROS Noetic following the instructions at this link.
- Install all Turtlebot2 files necassary.
- Open New Terminal
- Install RealSense packages:
$ sudo apt-get install ros-noetic-realsense2-camera
- Install Tf2 sensor message packages:
$ sudo apt-get install ros-noetic-tf2-sensor-msgs
- Open New Terminal
- Setup working directory:
$ mkdir Directory_Name
$ cd Directory_Name
$ mkdir src
$ cd src
- Clone this repository:
$ git clone https://github.com/UoA-CARES/mobile_robot_learning_testbed.git
- Clone other required repositories:
$ git clone https://github.com/UoA-CARES/cares_msgs
$ git clone https://github.com/maraatech/aruco_detector
- Build and compile workspace:
$ cd ..
$ catkin_make
- Define source (so you don't have to do it everytime you open a terminal):
$ echo "~/Directory_Name/devel/setup.bash" >> ~/.bashrc
- Copy the mobile_robot.world file from the world folder into the folder Home/turtlebot2/src/turtlebot_simulator/turtlebot_gazebo/worlds
- Copy the mobile_robot.launch file from the launch folder into the folder Home/turtlebot2/src/turtlebot_simulator/turtlebot_gazebo/launch (keep real_robot.launch file as it is)
- Open the Home folder in file explorer and show hidden files (CTRL+H)
- Copy all folders in the aruco_marker_models into the folder Home/.gazebo/models
- Open New Terminal
- Launch the mobile robot world:
$ roslaunch turtlebot_gazebo mobile_robot.launch
- Run the main.py script in the src folder either through VS Code or a new terminal.
- Create Aruco marker models printed from this aruco marker genertor.
- Plce them with odd numbers on the left side and even numbers on the right side precisly space to match simualtion, where 1 simulation unit is 0.85m in the real world
- Connect Turtlebot2 platform and RealSense camera to a laptop that can be placed on the robotic platform, and place robot on track
- Open a new Terminal
- Launch camera and turtlebot, you should see a window pop up showing the camera view, and outlining Aruco markers it sees:
$ roslaunch mobile_robot_learning_testbed real_robot.launch
- To run the TD3 or DQN testing open the relevant algorithm_real.py file in VS Code
- Change the path of the loaded model, to match the model you wish to load
- Run the TD3_real.py or DQN_real.py file directly