amr_showcase_navigation.mp4
This repository contains a Gazebo simulation for a differential drive robot, equipped with an IMU, a depth camera and a 2D LiDAR. The primary contriution of this project is to support multiple ROS and Gazebo distros. Currently, the project supports the following versions -
- ROS Noetic + Gazebo Classic 11 (branch ros1)
- ROS2 Humble + Gazebo Classic 11 (branch ros2)
- ROS2 Humble + Gazebo Fortress (branch ros2)
Each of the following sections describes depedencies, build and run instructions for each of the above combinations
In addition to ROS1 Noetic and Gazebo Classic installations, the dependencies can be installed with rosdep
# From the root directory of the workspace. This will install everything mentioned in package.xml
rosdep install --from-paths src --ignore-src -r -y
catkin build --packages-select bcr_bot
To launch the robot in Gazebo,
roslaunch bcr_bot gazebo.launch
To view in rviz,
roslaunch bcr_bot rviz.launch
The launch file accepts multiple launch arguments,
roslaunch bcr_bot gazebo.launch
camera_enabled:=True
two_d_lidar_enabled:=True
position_x:=0.0
position_y:=0.0
orientation_yaw:=0.0
world_file:=small_warehouse.world
In addition to ROS2 Humble and Gazebo Classic installations, we need to manually install gazebo_ros_pkgs (since the same branch supports Classic and Fortress)
sudo apt-get install ros-humble-gazebo-ros-pkgs
Remainder of the dependencies can be installed with rosdep
# From the root directory of the workspace. This will install everything mentioned in package.xml
rosdep install --from-paths src --ignore-src -r -y
colcon build --packages-select bcr_bot
To launch the robot in Gazebo,
ros2 launch bcr_bot gazebo.launch.py
To view in rviz,
ros2 launch bcr_bot rviz.launch.py
The launch file accepts multiple launch arguments,
ros2 launch bcr_bot gazebo.launch.py
camera_enabled:=True
two_d_lidar_enabled:=True
position_x:=0.0
position_y:=0.0
orientation_yaw:=0.0
world_file:=small_warehouse.world
In addition to ROS2 Humble and Gazebo Fortress installations, we need to manually install interfaces between ROS2 and Gazebo sim as follows,
sudo apt-get install ros-humble-ros-gz-sim ros-humble-ros-gz-bridge ros-humble-ros-gz-interfaces
Remainder of the dependencies can be installed with rosdep
# From the root directory of the workspace. This will install everything mentioned in package.xml
rosdep install --from-paths src --ignore-src -r -y
colcon build --packages-select bcr_bot
To launch the robot in Gazebo,
ros2 launch bcr_bot gz.launch.py
To view in rviz,
ros2 launch bcr_bot rviz.launch.py
The launch file accepts multiple launch arguments,
ros2 launch bcr_bot gz.launch.py
camera_enabled:=True
two_d_lidar_enabled:=True
position_x:=0.0
position_y:=0.0
orientation_yaw:=0.0
world_file:=small_warehouse.world