This repository outlines the setup and instructions for implementing SLAM algorithms on a Husky robot using ROS and Catkin. Initially focusing on simulations, this setup is tested on Ubuntu 20.04.6 LTS with ROS Noetic.
-
Install ROS Noetic: Ensure you are using Ubuntu 20.04 and install ROS Noetic. You can follow the detailed installation instructions provided on the ROS Wiki.
-
Setup Your ROS Environment: Configure your shell to source the ROS environment automatically.
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
- Install Dependencies: Install additional tools and dependencies.
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
sudo rosdep init
rosdep update
- Create Catkin Workspace: Create a workspace for your ROS packages. This is where you will build and manage your ROS packages.
mkdir -p ~/husky_ws/src
cd ~/husky_ws
catkin_make
- Source the Workspace: Source your new setup script to overlay this workspace on top of your environment.
echo "source ~/husky_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
markdown
- Clone Husky Repositories: Husky-related packages into your workspace. rosdep install --from-paths src --ignore-src -r -yd packages into your workspace.
cd ~/husky_ws/src
git clone https://github.com/husky/husky.git
- Install Dependencies: Install all required dependencies for the Husky packages.
cd ~/husky_ws
rosdep install --from-paths src --ignore-src -r -y
- Build the Workspace: Compile all packages in your workspace.
catkin build
sanity check (to be written)
This section outlines the setup for the Husky Frontier Exploration demo. Follow these steps to simulate the exploration tasks using the Husky robot. For more details, refer to the official Husky Frontier Exploration Guide.
Before starting, ensure ROS Noetic is installed and configured as outlined in the initial setup. Additionally, install roslint
and pcl
which are required for the demo:
# Install roslint
sudo apt-get install ros-noetic-roslint
# Install Point Cloud Library (PCL)
sudo apt-get install libpcl-dev
Clone the frontier_exploration
repository into your workspace:
cd ~/husky_ws/src
git clone https://github.com/paulbovbel/frontier_exploration.git
Install all required dependencies using rosdep
. This command is crucial as it ensures all necessary ROS dependencies are met:
cd ~/husky_ws
rosdep install --from-paths src --ignore-src -r -y
catkin build
source ~/husky_ws/devel/setup.bash
In the first terminal, start the Clearpath-configured Husky simulation in Gazebo, which includes a LiDAR sensor for the robot:
export HUSKY_LMS1XX_ENABLED=1; roslaunch husky_gazebo husky_playpen.launch
Once the installation and setup are complete, you can run the Husky Frontier Exploration demo. You will need to open three separate terminal windows to launch different parts of the simulation. Here are the steps for each:
In the first terminal, start the Clearpath-configured Husky simulation in Gazebo, which includes a LiDAR sensor for the robot:
export HUSKY_LMS1XX_ENABLED=1; roslaunch husky_gazebo husky_playpen.launch
In the second terminal, start the RViz visualizer. This tool provides a graphical interface to visualize the robot and its sensors in real-time:
roslaunch husky_viz view_robot.launch
In the third terminal, launch the frontier exploration demo. This will initiate the autonomous exploration behavior:
roslaunch husky_navigation exploration_demo.launch