To install run:
wsl --install
To check the version:
wsl -l -v
For more, access: WSL Instalation
To install RO2 Foxy, follow the steps in: ROS2 Foxy Instalation
After installing ROS2, you might still need to instal colcon: Colcon Instalation
To setup Turtlebot3 packages, run the following as in section (3.1.3) in Turtlebot3 Quick Start:
sudo apt-get install ros-foxy-gazebo-*
sudo apt install ros-foxy-cartographer
sudo apt install ros-foxy-cartographer-ros
sudo apt install ros-foxy-navigation2
sudo apt install ros-foxy-nav2-bringup
Finally, clone this repository and run:
cd ~/PMR_ws && colcon build --symlink-install
source PMR_ws/install/setup.bash
export TURTLEBOT3_MODEL=waffle
And launch the empty world example:
ros2 launch turtlebot3_gazebo empty_world.launch.py
Run the Gazebo Scenario:
ros2 launch turtlebot3_gazebo turtlebot3_islands.launch.py
And to run the algorithm, type as follows with the objective point as parameters:
python3 PMR_ws/src/PMR/turtlebot3_gazebo/scripts/tangent_bug.py 9,-1
Start the empty world:
ros2 launch turtlebot3_gazebo empty_world.launch.py
Run the algorithm:
python3 PMR_ws/src/PMR/turtlebot3_gazebo/scripts/vectorfield.py
Run the Gazebo Scenario:
ros2 launch turtlebot3_gazebo turtlebot3_islands.launch.py
Run the algorithm, selecting the objective point followed by the potential function type:
python3 PMR_ws/src/PMR/arp_controller.py 9 0 3
Wave-Front was tested in two scenarios, a curved path and a bifurcation. The current state of the implementation is configured to addopt the biffurcation map. To change the scenario, few changes in the code will be necessary. A fixed goal is previously considered for map computation, to change it, small alterations will also be needed.
To open the scene in Gazebo, run:
ros2 launch turtlebot3_gazebo turtlebot3_maze2.launch.py
To run the wave-front navigation:
python3 PMR_ws/src/PMR/wavefront.py
To open the scene in Gazebo, run:
ros2 launch turtlebot3_gazebo turtlebot3_maze.launch.py
Before running the wave-front navigation, change line 65 from PMR_ws/src/PMR/wavefront.py
to:
self.img = np.load(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'img/wave.npy'))
And then you can run:
python3 PMR_ws/src/PMR/wavefront.py
For a demonstration run:
python3 PMR_ws/src/PMR/scripts/graph.py
To run simulation of the path of demonstration, change line 310 from PMR_ws/src/PMR/scripts/vectorfield.py
to:
flag_method = 1
and then run:
ros2 launch turtlebot3_gazebo turtlebot3_islands.launch.py
python3 PMR_ws/src/PMR/scripts/vectorfield.py
To run PRM, the path is already computed in img/path_PRM.npy
, so all you need to change line 310 from PMR_ws/src/PMR/scripts/vectorfield.py
to:
flag_method = 2
and then run:
ros2 launch turtlebot3_gazebo turtlebot3_islands.launch.py
python3 PMR_ws/src/PMR/scripts/vectorfield.py
To run RRT, the path is already computed in img/path_RRT.npy
, so all you need to do is run:
ros2 launch turtlebot3_gazebo turtlebot3_islands.launch.py
python3 PMR_ws/src/PMR/turtlebot3_movement.py