Can I simulate simple mobile and communicating 'robots' without using the Robotics toolbox?

Hello, I am fairly new in using matlab for simulations and I'm not quite sure how to tackle the following problems and if it is possible to solve them without using the Robotics toolbox. I need to setup a basic visualizable simulation environment to test an algorithm, which has the following characteristics: coordinative system/grid where a number of "robots" (colored dots) are generated randomly. They have to pass messages to each other with a certain frequency when they are within a specific range (my idea is to use a distance matrix and to process a message if the distance is smaller than some value), and move in a random way in the grid. Each 'robot' executes the same behavioral model but has different characteristics (values of some variables). Can I treat 'robots' as objects?
Is this kind of setup possible? I need some guidelines about how to approach these issues, any useful links are appreaciated:).

 Accepted Answer

Yes, that is all possible.
Yes, you could use object-oriented programming for this. However, since the model is the same for each, you could just as easily implement as a struct array. Object oriented would be more appropriate for cases where they might have different behaviours.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!