Some helpful resources to consider:
https://classic.gazebosim.org/tutorials?tut=ros_gzplugins
This website have some examples on Gazebo Plugin, However it is outdated.
https://github.com/ros-simulation/gazebo_ros_pkgs/tree/ros2/gazebo_plugins/include/gazebo_plugins
This folder in GitHub have good examples for various Gazebo Plugins and we will use it in this section.
A Gazebo plugin is a piece of code that extends the functionality of Gazebo by interacting with simulation elements such as robots, sensors, and the environment. Plugins are written in C++ and can be used to control robot behavior, process sensor data, or modify the physics engine. They are categorized into different types, including world plugins, model plugins, sensor plugins, and system plugins.
The Gazebo Plugin that we are going to use is called Differential Drive. Following the below link shows us a code example: