This project demonstrates the deployment of an autonomous navigation system using ROS. It includes SLAM, path planning, and obstacle avoidance algorithms.
- SLAM for mapping and localization
- Path planning for navigation
- Obstacle avoidance for safe traversal
Clone the repository:
git clone https://github.com/kavehsgh/autonomous-navigation-ros2.git
cd autonomous-navigation-ros2
Install ROS2 Humble and Nav2:
sudo apt update
sudo apt install ros-humble-desktop
sudo apt install ros-humble-navigation2 ros-humble-nav2-bringup
Build the workspace:
colcon build
Source the setup file:
source install/setup.bash
Launch the navigation system:
ros2 launch navigation_system navigation_launch.py
src/
: Source code for navigation, SLAM, and obstacle avoidance.launch/
: ROS launch files.config/
: Configuration files.docs/
: Documentation and tutorials.
- SLAM Implementation:
- Create a ROS2 package for SLAM:
cd src
ros2 pkg create --build-type ament_python slam
cd slam/slam
mkdir src
- Implement SLAM using
slam_toolbox
: - Example: 'src/slam/slam/slam_node.py'
- Path Planning with Nav2:
- Create a ROS2 package for navigation:
cd ../..
ros2 pkg create --build-type ament_python navigation
cd navigation/navigation
mkdir src
- Implement path planning using Nav2.
- Example: 'src/navigation/navigation/navigation_node.py'
- Obstacle Avoidance:
- Create a ROS2 package for obstacle avoidance:
cd ..
catkin_create_pkg obstacle_avoidance rospy std_msgs sensor_msgs geometry_msgs
mkdir -p obstacle_avoidance/src
- Implement obstacle avoidance using sensor data:
- Example: 'src/obstacle_avoidance/obstacle_avoidance/obstacle_avoidance_node.py'
- Launch Files:
- Create launch files for each component in the launch directory.
- Example: 'launch/navigation_launch.py'
This project is licensed under the MIT License - see the LICENSE file for details