I am trying to work on a Digital Twin of a Physical Robot which is used at my uni. I made a rough model of the robot using Webots (Open source). I need to design certain controllers aiming at the Tilt, Heading, Velocity control of the robot. Can anyone explain to me the implementation & the initial steps for designing the control part using Webots?
Since you already have controller code written for the physical robot, I recommend creating a set of adapters so you can run the same code in Webots, instead of rewriting everything from scratch.
The Webots User Guide provides extensive guidance on how to setup and interface with the platform. In particular I recommend taking a look into the chapters on how to setup MATLAB language support and the Webots MATLAB API. You'll probably also want to go through the tutorials, especially the one about controllers. Notice that MATLAB code snippets are provided, but you may have to click the corresponding button in the code window to visualize it: