Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.24 KB

File metadata and controls

54 lines (36 loc) · 1.24 KB

diff_drive_sim

A package to demonstrate a simple differential drive robot simulation in Gazebo integrated with ROS2.

How to use

  1. Create a ROS2 workspace and clone this repository into the src folder:

    mkdir -p ~/ros2_ws/src
    cd ~/ros2_ws/src
    git clone https://github.com/ShravanDeva5327/diff_drive_sim.git
  2. Navigate to the workspace root and build the package:

    cd ~/ros2_ws
    colcon build
  3. Source the workspace:

    source ~/ros2_ws/install/setup.bash
  4. Launch the simulation:

    ros2 launch diff_drive_sim gazebo_sim.launch.py
  5. 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.

TODO

  1. Add ROS 2 nodes to control the robot using keyboard.
  2. Add Sensors like LIDAR, Camera, IMU, etc.
  3. Add ability to visualize sensor data in RViz.