ARAP Robot is a ROS 2-based mobile robot project that combines navigation, localization, and simulation capabilities. This repository contains all the necessary packages to run and control the ARAP robot in both simulation and real-world environments.
- Ubuntu 24.04
- ROS 2 Jazzy
- Gazebo Harmonic
- Git
The following ROS 2 packages are required:
sudo apt install ros-jazzy-navigation2 ros-jazzy-nav2-bringup
sudo apt install ros-jazzy-gazebo-ros-pkgs
sudo apt install ros-jazzy-robot-localization
sudo apt install ros-jazzy-urdf-tutorial-
Install ROS 2 Jazzy Follow the official ROS 2 Jazzy installation guide for Ubuntu 24.04:
# Add ROS 2 apt repository sudo apt update && sudo apt install software-properties-common sudo add-apt-repository universe sudo apt update && sudo apt install curl sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null # Install ROS 2 Jazzy sudo apt update sudo apt install ros-jazzy-desktop
-
Install Gazebo Harmonic
sudo apt install gazebo-harmonic
-
Clone the Repository
mkdir -p ~/ros2_ws/src cd ~/ros2_ws/src git clone https://github.com/akooku/arap_robot.git
-
Build the Workspace
cd ~/ros2_ws colcon build
-
Source the Setup Files Add the following lines to your
~/.bashrcfile:# ROS 2 setup source /opt/ros/jazzy/setup.bash source ~/ros2_ws/install/setup.bash
-
Add Convenience Aliases Add these aliases to your
~/.bashrcfile for easier operation:# Build workspace alias build='cd ~/ros2_ws/ && colcon build && source ~/.bashrc && source install/setup.bash' # Launch robot visualization alias arap='ros2 launch urdf_tutorial display.launch.py model:=$(pwd)/src/arap_robot/arap_robot_description/urdf/robots/arap_robot.urdf.xacro' # Launch Gazebo simulation alias arap_robot='bash ~/ros2_ws/src/arap_robot/arap_robot_bringup/scripts/arap_robot_gazebo.sh' # Launch navigation alias nav='bash ~/ros2_ws/src/arap_robot/arap_robot_bringup/scripts/arap_navigation.sh'
After adding these lines, source your bashrc:
source ~/.bashrc
-
Build the Project
build
-
Launch the Robot in Gazebo
arap_robot
This will launch the robot in a simulated environment with all necessary components.
-
Launch Navigation
nav
This will start the navigation stack, including:
- SLAM for mapping (nav slam)
- Navigation2 for path planning
- Localization using AMCL
-
View Robot Model
arap
This will open RViz with the robot model for visualization.
arap_robot_bringup: Launch files and scripts for starting the robotarap_robot_description: URDF and mesh files for the robot modelarap_robot_gazebo: Gazebo simulation configurationsarap_robot_navigation: Navigation stack configurationsarap_robot_localization: Localization packagesarap_robot_system_tests: System test packages
-
Build Errors
- Ensure all dependencies are installed
- Try cleaning the build:
cd ~/ros2_ws && rm -rf build/ install/ log/ - Rebuild:
colcon build
-
Launch Failures
- Check if ROS 2 environment is sourced:
printenv | grep -i ROS - Verify workspace is built and sourced
- Check launch file permissions:
chmod +x ~/ros2_ws/src/arap_robot/arap_robot_bringup/scripts/*.sh
- Check if ROS 2 environment is sourced:
-
Navigation Issues
- Ensure map is properly loaded
- Check if robot's initial pose is set correctly
- Verify sensor data is being published
If you encounter any issues:
- Check the ROS 2 documentation
- Search existing GitHub issues
- Create a new issue with detailed information about your problem
Contributions are welcome! Please feel free to submit a Pull Request. Before contributing:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.