How to simulate a simple pattern formation

1 view (last 30 days)
Shin
Shin on 7 Jan 2023
Answered: Harsh on 18 Jul 2025
Hi there, I'm new to matlab. I wanted to simulate a simple 3 coordinate triangle formation (coordinate = [3,3; 4.5,6; 6,3];) using Mobile Robotics Simulation Toolbox. I have already set the initial position which is randomly generated, but I had no idea how to simulate the motion for the robots to reach the targeted coordinates. Any idea? I would really appreciate the help. Thanks.
- Shin-

Answers (1)

Harsh
Harsh on 18 Jul 2025
Hi @Shin,
I understand that you want to simulate a simple triangle formation where three mobile robots move to the target coordinates [3,3; 4.5,6; 6,3] using the "Mobile Robotics Simulation Toolbox" in Simulink.
To accomplish this, refer to the following page - https://www.mathworks.com/matlabcentral/fileexchange/66586-mobile-robotics-simulation-toolbox and navigate to "Examples > Getting Started > Simulink Examples", then look for the example titled “Waypoint following using the Pure Pursuit Algorithm (Differential Drive)”. This Simulink model shows how to set up a multi‑robot simulation environment, assign each robot its own waypoint, and use Pure Pursuit Controller blocks to drive them toward their targets. You can adapt this example by replacing the default waypoints with your triangle coordinates to see the robots form the shape you want.

Tags

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!