mobile-robot-simulation-environment
Experimental Implementation of Obstacle Avoidance Algorithms for Autonomous Agricultural Vehicle in a Simulation Environment
The goal of the project is to develop an algorithm that enables the robot to efficiently and safely detect and avoid obstacles while in motion. The robot's control and navigation are provided by the already implemented ArduPilot solution, so the algorithm being developed must integrate into its operation. Due to limited access to the physical robot, it is necessary to create a 3D simulation environment in which the algorithm can be developed and tested. For this, the simulation environment must be able to work in conjunction with the ArduPilot simulation as well.
The goal of the project is to enable the robot to navigate between two points (A and B) in a simulated space. The control and navigation are based on the following algorithms:
- ArduPilot Autopilot System: The system responsible for controlling the robot, which is capable of following predefined paths (waypoints), avoiding obstacles, and ensuring stable navigation.
- Sensor Data Processing: The robot is equipped with various sensors (e.g., cameras and RangeFinders) that provide information about the environment. By processing the sensor data, the robot can modify its path and mission to avoid obstacles.
To improve the precision of navigation and control, an algorithm are applied during the project. Continuous analysis of sensor data (e.g., from RangeFinders) to ensure the robot avoids obstacles in its environment.
The robot’s navigation and localization are supported by various sensors:
- Camera Sensors: These are used in the Webots simulation environment to model the robot's vision.
- RangeFinder Sensors: These sensors measure the distance to the robot's immediate surroundings, which are crucial for obstacle avoidance and spatial navigation.
The following tools and software are required for the project:
- WSL (Windows Subsystem for Linux): Allows running Linux-based tools on Windows.
- Ubuntu Operating System: The Linux distribution used inside WSL for development and execution.
- Webots: A simulation environment for robot modeling and testing.
- ArduPilot: An open-source autopilot system for controlling robots.
- MavProxy: An add-on for ArduPilot wich helps with the communication outside of ArduPilot
- QGroundControl: An open-source add-on for ArduPilot, with better UI and functionaliy
The Windows Subsystem for Linux (WSL) installation allows you to run a Linux distribution on Windows. Follow these steps:
-
Enable WSL:
-
Open PowerShell as Administrator and run the following command:
wsl --install
-
-
Install Ubuntu:
- Open the Microsoft Store, search for "Ubuntu", and choose the desired version (e.g., "Ubuntu 20.04 LTS").
- Click the "Install" button.
-
Verify WSL Version:
-
After installing WSL, check that the system is working correctly:
wsl --list --verbose
-
-
Update the system’s package list:
sudo apt update
-
Install the required packages:
sudo apt install git g++ make python3 python3-pip python3-dev python3-setuptools
-
Download Webots:
- Download Webots from the official website: Webots Download
- Follow the installation guide for Ubuntu.
-
Setting up Webots and Creating Simulation Projects:
- Create or open the Webots project that includes a robot with the RangeFinder sensor equipped.
-
Clone ArduPilot from GitHub:
git clone https://github.com/ArduPilot/ardupilot.git cd ardupilot
-
Initialize Submodules:
git submodule update --init --recursive
-
Set up the environment:
./Tools/environment_install/install-prereqs-ubuntu.sh -y
-
Build the simulation environment:
./waf configure ./waf build
-
Install MAVProxy:
sudo apt install python3-pip pip3 install MAVProxy
-
Start MAVProxy:
mavproxy.py --master=udp:127.0.0.1:14550 --console --map
To start the simulation, use the following command:
sim_vehicle.py -v Rover webots-python -w --speedup=1 --console --speedup=1 --map