Autonomous search of real-life environments combining dynamical system-based path planning and unsupervised learning
- Uyiosa Philip Amadasun
- Patrick McNamee
- Zahra Nili Ahmadabadi
- Peiman Naseradinmousavi
This project is the code portion of an arXiv submission for the paper "Autonomous Search of Real-Life Environments Combining Dynamical System-Based Path Planning and Unsupervised Learning". This README file provides instructions for installing the neccessary software to build and run the codes. The platforms used to develop these codes are Robot Operating System (ROS). The codes are developed to run in both ROS kinetic and ROS melodic. The following will provide instructions to build and run the chaotic_cpp package with the Turtlebot2 and Turtlebot3, the robots used in the published work. If using this code repository, please cite the work as follows.
@article{amadasun2025autonomous,
title={Autonomous search of real-life environments combining dynamical system-based path planning and unsupervised learning},
author={Amadasun, Uyiosa Philip and McNamee, Patrick and Ahmadabadi, Zahra Nili and Naseradinmousavi, Peiman},
journal={IEEE Access},
year={2025},
publisher={IEEE}
}
- Ubuntu 16.04 LTS for ROS kinectic
- Ubuntu 18.04 LTS for ROS melodic
- A working network connection
-
For instructions on installing and using Turtlebot3 ROS packages see here
-
For instructions on installing and using Turtlebot2 ROS packages see here
-
Make sure the any of the various exports needed to use these packages are in your bashrc file or are loaded in your terminal
- Create catkin workspace if you have not.
mkdir -p ~/catkin_ws/src
- Move into the source directory of your catkin workspace and clone this package into a directory named
chaotic_cpp
cd ~/catkin_ws/src && git clone [email protected]:dsim-lab/paper-codes/Autonomous_search_of_real-life_environments.git chaotic_cpp
- Build the package
catkin build #OR cd .. && catkin_make
- Make sure to source your workspace to your bashrc file.
-
Assuming all the necessary packages required to simulate a Turtlebot3 are installed, open up a simulation of a Turtlebot3 in a gazebo environment with a known map (via SLAM) using the launch file shown:
roslaunch turtlebot3_gazebo turtlebot3_world.launch
-
In another terminal, open the map in RVIZ
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=<your_map.yaml>
-
Make sure your robot is localized on the map using the
2D_Pose_Estimatebuttons on your RVIZ GUI (see here) -
Now launch the chaotic coverage path planner
roslaunch chaotic_CPP CCPP.launch
- Make sure workspace is sourced
- Make sure to connect Turtlebot to remote PC and bringup the drivers
ssh pi@{IP_ADDRESS_OF_RASPBERRY_PI}
roslaunch turtlebot3_bringup turtlebot3_robot.launch-
Make sure you have a map of the environment you want to create cover. You can use SLAM to generate the map
roslaunch turtlebot3_slam turtlebot3_slam.launch
Save the map by running rosrun map_server map_saver -f ~/map
-
Now load the map and the robot model to RVIZ
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=<your_map.yaml>
-
Make sure your robot is localized on the map using the
2D_Pose_Estimatebuttons on your RVIZ GUI (see here) -
Run the chaotic coverage path planner like discussed previously.
-
To bring up the Turtlebot2 base, use the
turtlebot_bringuppackage:roslaunch turtlebot_bringup minimal.launch
-
For running the navigation stack (ensure you have a map of the environment):
roslaunch turtlebot_navigation amcl_demo.launch map_file:=<your_map.yaml>
- If you don't have a map create one:
roslaunch turtlebot_navigation gmapping_demo.launch
-
To visualize the robot and its sensors in RViz, run:
roslaunch turtlebot_rviz_launchers view_robot.launch
-
Make sure your robot is localized on the map using the
2D_Pose_Estimatebuttons on your RVIZ GUI just as you do for the Turtlebot3. -
Run the chaotic coverage path planner like discussed previously.
The rest of the README goes over correspondance between paper and codebase and gives descriptions of the code files.
All codes in src directory.
- Algorithm 1 (ArnoldTrajectoryPlanner):
Corresponds to
ArnoldLogistic_coverageclass method inarnold_logistic_coverage.py. - Algorithm 2 (Shift): Corresponds to
shiftclass method inarnold_logistic_coverage.py. - Algorithm 3 (CostCalculator): Corresponds to
cost_calculatorclass method inarnold_logistic_coverage.py. - Algorithm 4 (CoverageCalculator): Corresponds to
logisticianclass method (which calls theCoverage_Calculatorclass method) inmap_zoner.py. Thelogisticiancontinuously calls theCoverage_Calculatorin a loop. Thelogisticiancontinuously provides new sensor data to theCoverage_Calculator. - Algorithm 5 (Worker): Corresponds to
workerclass method inmap_zoner.py.
Chaos control Techniques
- Obstacle Avoidance technique
- Quadtree algorithms imported from
quadtree.pyare used in themapmakerclass method inarnold_logistic_coverage.pyto create quadtree and query from it usingshiftclass method. - DS_index switching by changing dynamical system variable index as seen in
arnold_logistic_coverage.py.
- Quadtree algorithms imported from
- Map-zoning
- The
mapmakerclass method ofmap_zoner.pydivides the map into zones and records the zone centroids inself.m_z. The Kmeans clustering used is imported from the Python 2.7sklearnmodule. - The centroid of least covered zones is assigned to
self.x_y_zonesand is published via ROS inmap_zoner.py. The ArnoldTrajectoryPlanner receives the zone centroid through a subscriber.
- The
Real-time computation technique for coverage calculation
- Quadtree algorithms imported from
quadtree.pyare used in themapmakerclass method inmap_zoner.pyto create quadtree and query from it usingCoverage_Calculatorclass method. - Cell coverage status update is stored in
self.m_cwhich is created by thetablemakerclass method inmap_zoner.py. - The mutithreading option is set up in the
Coverage_Calculatorclass method inmap_zoner.py.
Contains all the configuration files used to set parameters of the chaotic coverage path planner on launch via CCPP.launch file.
ArnoldLogistic.yaml
- dt - time step
- n_iter - a total number of iterations
- ns - a set of iterations
- dist_to_goal - threshold of number of subgoals to trajectory point before switching to next trajectory point
- v - robot velocity
- A - Arnold system parameter
- B - Arnold system parameter
- C - Arnold system parameter
mapzoner.yaml
- zones - number of zones to break the free space in the environment into.
- sensing_range - querying radius (meters) for coverage calculation
- NumberofThreads - number of threads of Algorithm 5 to be created.
- scan_frame - name given to the sensor frame of the robot.
- Multi-threading - optionality for multi-threading.
1to enable,0to disable. - desired coverage - desired coverage rate
Contains the launch files of application.
CCPP.launch
This file executes the arnold_logistic_coverage.py and map_zoner.py scripts as ROS nodes to accomplish the chaotic coverage path planning process.
map_zoner.launch
This file executes the map_zoner.py as a ROS node to accomplish coverage calculation.
Contains all the Python source code.
quadtree.py - imported in arnold_logistic_coverage.py and map_zoner.py to access the algorithms to create and query a quadtree.
arnold_rk4.py - imported by arnold_logistic_coverage.py to use RK4 method.
arnold_logistic_coverage.py - applies Algorithms 1 to 3.
map_zoner.py - applies Algorithms 4 to 5.