This repository contains the bot_spawn
ROS2 package, designed for spawning a robot model in the Gazebo simulator. The package includes URDF descriptions for various components such as camera, depth camera, lidar, and robot core. Additionally, it provides control configurations and launch files for simulation setup.
Before launching the bot_spawn
package, make sure you have the following ROS 2 packages installed:
sudo apt update
sudo apt install ros-$ROS_DISTRO-gazebo-ros-pkgs ros-$ROS_DISTRO-ros2-control ros-$ROS_DISTRO-ros2-controllers ros-$ROS_DISTRO-gazebo-ros2-control ros-$ROS_DISTRO-slam-toolbox ros-$ROS_DISTRO-navigation2 ros-$ROS_DISTRO-xacro python3-colcon-common-extensions
To install and utilize the bot_spawn
package, follow these steps:
-
Create Workspace: Create a workspace folder named
ros2_ws
if you haven't already. -
Clone Repository: Clone this repository into the
src
folder of your ROS2 workspace (ros2_ws/src/
). -
Build: Navigate to the root of your workspace (
ros2_ws/
) and build the packages using the following command:colcon build
-
Source Setup Script: After successful build, source the setup script to add the package to your ROS2 environment:
source install/setup.bash
-
Download Models For Gazebo:(61mb) extract this models.zip to
/home/.gazebo/
. Name should be models.
To launch the Gazebo simulation with the robot model, execute the following command:
ros2 launch bot_spawn gazebo.launch.py
To launch teleop:
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/diff_cont/cmd_vel_unstamped