Skip to content

DAGABO98/cs286_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

cs286_project

Overview

This repo contains the code for biased frontier exploration leveraging UWB information to triangulate the location of a target. Frontiers will be chosen based on the frontier that is closer to the general direction of the target. Our implementation relies on the following packages:

  • explore_lite (http://wiki.ros.org/explore_lite)
  • ROS navigation stack (https://github.com/ros-planning/navigation)
  • turtlebot3_simulations (http://wiki.ros.org/turtlebot3_simulations)
  • tb3_navigations (https://github.com/hsrwrobotics/tb3_navigations) All these packages have been included inside the repo for the user's convenience. Packages that have a "_1" attached to the end of their folder have been modified to provide additional functionality. For instance, the explore-lite package has been modified to bias frontier in the direction of the target, and tb3_navigations has been modified to allow for multiple robots to be spawn using a single launch file. For this project, we also created a package (uwb_publish) and a script (uwb_sim.py) to control the UWB sensors, and two scripts for the triangulation of the target (proximity_process.py and proximity_process_sim.py).

Important Note

This project was developed for ROS Melodic and it is approximately self-contained, having most of the needed packages already in the repo. However, depending on your system, you might need to resolve dependency issues before running the code. To check which dependencies haven't been satisfied just run catkin_make inside the cs286_project folder and follow the instructions to install the missing packages.

Running the simulation

For this part, we implemented our simulation using Gazebo. We used the standard domestic environment and we added three wafflebots and a single beacon as a target. To run the simulation, you need to follow the instructions below:

  1. Computer prep: on your device, download this github repository and build it by running the following commands in order
git clone 
cd cs286_project-main
catkin_make
source devel/setup.bash
  1. Launch roscore on your computer by running the following command:
roscore
  1. Open a new terminal and launch the Gazebo simulation environment by running:
roslaunch turtlebot3_gazebo multi_turtlebot3.launch
  1. Once the Gazebo simulation is up and running, open a new terminal and start the script for simulating UWB measurements by running:
python src/uwb_sim.py
  1. Open a new terminal and start target traingulation and measurement optimization by running:
python src/proximity_process_sim.py
  1. Launch the frontier exploration process by running:
 roslaunch tb3_navigations explore_lite.launch

Running the project on hardware

This project was implemented to run on waffle bots. To execute the code, follow the instructions below:

  1. Computer prep: on your device, download this github repository and build it by running the following commands in order
git clone 
cd cs286_project-main
catkin_make
source devel/setup.bash
  1. Launch roscore on your computer by running the following command:
roscore
  1. Copy the cs_286_turtlebot3 directory inside cs286_project-main/src and the uwb_publish_multi.py inside cs286_project-main/src/uwb_publish/scripts to the robots. Remember that you might need to change the namespaces inside the rtab_turtlebot3_1.launch file and the param files so that they match your robot namespaces. For instance, we used all-waffle4, and all-waffle5 bots, so our namespaces were tb3_4, and tb3_5 respectively.
  2. SSH into each of the robots and make sure the .bashrc contains the IP address of your master node (the computer running roscore)
  3. Execute the following commands in each all-waffleX robot (remember to replace the X with the corresponding all-waffle bot number):
python uwb_publish_multi.py -s 1 -n tb3_X/
roslaunch cs_286_turtlebot3 rtab_turtlebot3_1.launch robot_name:=tb3_X
  1. To visualize the map generated by each of the all-waffleX bots, run the following command on a different terminal inside your main computer (remember to replace the X with the corresponding all-waffle bot number):
roslaunch interbotix_xslocobot_descriptions turtlebot3_rviz.launch rviz_frame:=tb3_X/map robot_name:=tb3_X
  1. To start target triangulation launch the following script from a different terminal inside your main computer:
python proximity_process.py
  1. Once all the maps inside the robots have been loaded (rtab has finished the initial setup) and proximity_process.py has been running for at least 10 seconds (so that the data buffer for the optimization is populated with enough data), you can launch the exploration process for each all-waffleX bot by running the following command in a different terminal for each waffle bot that you want to launch (remember to replace the X with the corresponding all-waffle bot number):
ROS_NAMESPACE=tb3_X roslaunch explore_lite explore_tb3_X.launch

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published