A package to demonstrate a simple differential drive robot simulation in Gazebo integrated with ROS2.
-
Create a ROS2 workspace and clone this repository into the
srcfolder:mkdir -p ~/ros2_ws/src cd ~/ros2_ws/src git clone https://github.com/ShravanDeva5327/diff_drive_sim.git
-
Navigate to the workspace root and build the package:
cd ~/ros2_ws colcon build
-
Source the workspace:
source ~/ros2_ws/install/setup.bash
-
Launch the simulation:
ros2 launch diff_drive_sim gazebo_sim.launch.py
-
To Move the robot, run the following commands in 2 separate terminals:
ros2 topic pub /left_wheel/cmd_vel std_msgs/msg/Float64 "data: 2.0"ros2 topic pub /right_wheel/cmd_vel std_msgs/msg/Float64 "data: -2.0"DO NOT FORGET TO PRESS THE PLAY BUTTON IN THE BOTTOM LEFT CORNER OF GAZEBO BEFORE RUNNING THESE COMMANDS, ONLY THEN THE ROBOT WILL MOVE.
See TODO.
- Add ROS 2 nodes to control the robot using keyboard.
- Add Sensors like LIDAR, Camera, IMU, etc.
- Add ability to visualize sensor data in RViz.
