File Exchange

image thumbnail

MRSim - Multi-Robot Simulator (v1.0)

version 1.2.0.0 (2.18 MB) by Micael Couceiro
MRSim allows the user to simulate the behavior of multiple mobile robots in virtual environments.

4 Downloads

Updated 02 Oct 2012

View Version History

View License

The MRSim (Multi-Robot Simulator) is an extension of the Autonomous mobile robotics toolbox SIMROBOT (SIMulated ROBOTs) created for MatLab 5 in 2001. MRSim allows the user to simulate the behavior of multiple mobile robots in virtual environments. When compared to its predecessor SIMROBOT, MRSim presents two key contributions:

1) It is fitted to the new MatLab versions - Previously, users were unable to work with SIMROBOT functions since most of them were incompatible with the new MatLab versions. MatLab significantly evolved over the last 10 years, making SIMROBOT obsolete. In this extension, all features of SIMROBOT were updated and improved based on the new MatLab functions;

2)It is also fitted to suit multi-robot applications - although SIMROBOT was endowed with various interesting features for mobile robotics, it presented several limitations for multi-robot applications. Therefore, MRSim was created primarily to allow users to develop multi-robot applications, which would benefit working with some specific requirements such as multi-hop communication.

Moreover, most of the functionalities in MRSim have an integrated help (which can be accessed just by typing help function) that allows to easily understand the dynamics of how to create and run simulations. In sum, just like SIMROBOT, each robot in MRSim can be equipped with several virtual sensors and can be driven by its own control algorithm. The toolbox includes two independent applications. The first one is the EDITOR (simedit), which allows the user to create and modify the virtual environment,to edit the control algorithms of robots, to load and save simulation, and others. The second application, SIMULATOR (simview), can be run directly from the EDITOR or separately from MatLab Command Window and serves as a simulation viewer.

A MatLab help file is being currently created and will be add in the future.

Cite As

Micael Couceiro (2021). MRSim - Multi-Robot Simulator (v1.0) (https://www.mathworks.com/matlabcentral/fileexchange/38409-mrsim-multi-robot-simulator-v1-0), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (19)

CHERKI yacine

chen zhao

Anjaly Parayil

Dear Micael Couceiro,

Thank you for the robot simulator. I have downloaded your simulator but when I tried to run the demo I'm getting the following error message:
Undefined function 'prmex' for input arguments of type 'double'.

Error in simrobot/putrob (line 59)
if prmex(round([xd'+simrobot.position(1);yd'+simrobot.position(2)]),matrix,-1,simrobot.number) == -1

Error in simviewcb (line 425)
list1(i) = putrob(list1(i),history(1,1:2),matrix);

Error in simviewcb (line 385)
simviewcb loadfile;

Error while evaluating uimenu Callback

Undefined function 'prmex' for input arguments of type 'double'.

Error in simrobot/putrob (line 59)
if prmex(round([xd'+simrobot.position(1);yd'+simrobot.position(2)]),matrix,-1,simrobot.number) == -1

Error in simviewcb (line 425)
list1(i) = putrob(list1(i),history(1,1:2),matrix);

Error in simviewcb (line 385)
simviewcb loadfile;

Error while evaluating uimenu Callback
Kindly note that I'm using matlab version 2013b. Also I'm not getting the 'run' option in the simulation window.

Thanks in advance

Andrea Giantomassi

Hi, it does not work on new matlab version (e.g. 2014 and 2015).

Myriam EL MESBAHI

Hi,
I have downloaded the simulator but didn't know how to get it to work. Which file should I be running first?
Thank you

Andrew Stuntz

@Talluri

If you open up the rRun file you have to comment out this section:

% buffer = getdata(list(j));
% message = buffer{getnum(list(j))-1};
% % % update shared map - the map is shared with all robots
% % matrixin = matrixin.*buffer{j}.matrixout;
% % if (isempty(buffer{j}.idleness)==0)
% % matrix_idle(:,jj) = buffer{j}.idleness;
% % else
% % matrix_idle(:,jj) = Inf*ones(15,1);
% % end
% if (getnum(list(j))==2)
% visited = message.visited;
% firststep = message.firststep;
% end

Then it works. I haven't seen any other bugs so far, but if I get any I will update.

Wissem BOUSSETTA

Hi,
I am working on matlab r2015a and use the compiler provided with Microsoft visual studio 2013 and have encountered the same problems us you guys.
It was about the redefinition of the 'round' function in .c files and the mex compiler stops when he found the conflict with the 'round' function defined in 'math.h'
I have just commented the redefinitions in all files under 'mrsim/c/' and the simulation worked well.

Micael Couceiro: do you have any comments on this ?

thk you.

Wissem BOUSSETTA

Wissem BOUSSETTA

John

Hi, What is the sampling rate of the robots in simulation? Can it be adjusted? 1 Step corresponds to how much time in the simulated environment?

Thanks & Regards,

Oussama MOSLAH

Hi, I am trying to run the demo and m getting the following error. Also I am not getting the 'run' option in the simulation window..

Undefined function 'prmex' for input arguments of type 'double'.

Error in simrobot/putrob (line 59)
if
prmex(round([xd'+simrobot.position(1);yd'+simrobot.position(2)]),matrix,-1,simrobot.number)
== -1

Error in simviewcb (line 425)
list1(i) = putrob(list1(i),history(1,1:2),matrix);

Error in simviewcb (line 385)
simviewcb loadfile;

Error while evaluating uimenu Callback

Talluri Raviteja

I keep getting this error

Cell contents reference from a non-cell array object.

Error in simrobot/runR (line 29)
message = buffer{getnum(list(j))-1};

Error in simviewcb (line 176)
[list,matrix]=runR(list,matrix,step);

Error in simviewcb (line 100)
simviewcb run;

Error in simeditcb (line 338)
simviewcb sim;

Error while evaluating uimenu Callback

What does that mean??

sky nku

hi~I tried your works,but it seems there are a few
problems :
1 I make a simple map by myself,and put some robots using algorithm of alg2.m, but when run,it
turns out errors as follow:
Undefined function or variable "swarm".

Error in algDPSO (line 94)
message.swarm = swarm;

Error in simrobot/runR (line 22)
[list] = feval(list(j).af,list(j),list,matrix,step); % Take
robot from the list and execute algorithm

Error in simviewcb (line 176)
[list,matrix]=runR(list,matrix,step);

Error in simviewcb (line 100)
simviewcb run;

Error in simeditcb (line 338)
simviewcb sim;

Error while evaluating uimenu Callback

Akshay

Hi there,

I am trying to run the demo and m getting the following error. Also I am not getting the 'run' option in the simulation window..

??? Undefined function or method 'prmex' for input
arguments of type 'double'.

Error in ==> simrobot.putrob at 59
if
prmex(round([xd'+simrobot.position(1);yd'+simrobot.position(2)]),matrix,-1,simrobot.number)
== -1

Error in ==> simviewcb at 425
list1(i) =
putrob(list1(i),history(1,1:2),matrix);

Error in ==> simviewcb at 385
simviewcb loadfile;

??? Error while evaluating uimenu Callback

Micael Couceiro

Dear Timo,

I haven't heard about this problem before although I can understand it. It seems that the round function inside drmex.c is conflicting with the round function from matlab or another user-created function you may have.
Before we try to think about a possible solution, please download the following version of MRSim:

http://www2.isr.uc.pt/~micaelcouceiro/media/MRSim_vbeta.zip

This version already has the compiled files which may or may not work with your system. Try to run simview/simedit without compiling the files from this new version.

Timo

Hi there, I get the following error messages if i try to compile drmex.c with my MATLAB2011a and gcc4.7:
drmex.c:86:14: error: conflicting types for ‘round’
In file included from /usr/include/math.h:71:0,
from drmex.c:1:
/usr/include/i386-linux-gnu/bits/mathcalls.h:311:1: note: previous declaration of ‘round’ was here
drmex.c: In function ‘round’:
drmex.c:86:38: error: expected declaration specifiers before ‘/’ token
drmex.c:105:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
drmex.c:151:1: error: expected ‘{’ at end of input

mex: compile of ' "drmex.c"' failed.

Micael Couceiro

Did you added all the files to MatLab directory using the set path? All files within the zip should be added in the MatLab path.

Wern-Juin Choy

May I enquire as to what does this error mean >>
Error in simeditcb (line 50)
robotT = simrobot('',2,2,2,'',[1 1 0],1,10,10); % Create object

Error while evaluating uimenu Callback

Wern-Juin Choy

Have tried running your program. Tried loading the help file through the directions given but the command window keeps saying 'No help found for <xxx.m>'.
The simulator did appear after running but the About>help also did not produce a help screen.

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!