laurenbramblett / Coordinated-Multi-Agent-Exploration-Rendezvous-Task-Allocation-in-Unknown-Environments

Code for the paper "Coordinated Multi-Agent Exploration, Rendezvous, & Task Allocation in Unknown Environments with Limited Connectivity"
12 stars 0 forks source link

Error with "runType = 'SR'" in "mainFSM_run.m": How to Run Simulations for Multiple Agents? #1

Closed mmyyen closed 3 months ago

mmyyen commented 3 months ago

Thank you for sharing your code! While studying and running the "mainFSM_run.m" file, I encountered an error after setting runType = "SR";: MATLAB show that in the functon 'function obj = stateChecker_One(obj, M)', it has the problem: Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL function to reduce operands to logical scalar values. I'm confused whether this runType mode supports only a single agent's search operation, or if it requires all agents to be in the same state. Additionally, if I want to run simulations for multiple agents in the runType = "SR" mode, could you provide the corresponding function function obj = stateChecker_One(obj, M) to help resolve this issue? Thank you very much!

laurenbramblett commented 3 months ago

Hi! Thank you for your question!

To simplify the comparison and to not implement formation control, in the paper we assumed that multiple agents acted as a single agent with a larger radius. That is why the stateChecker_One only takes in a single agent. I do have other works that incorporate a multiple robot search with formation control.

Thank you for pointing this out though! It is corrected now in the code to average the starting positions of the robots to simplify the starting positions to be one agent.

You can see the another one of my repositories for an implementation of multi-robot exploration with simple formation control using artificial potential fields: https://github.com/laurenbramblett/epistemic-planning-mrs-icra23 -- use runType = "CM"

mmyyen commented 3 months ago

Thank you very much for your prompt response. I completely agree that using a single agent with a larger detection range instead of multiple always-connected agents simplifies the design of comparative experiments. However, I have a follow-up question. In your paper(Coordinated Multi-Agent Exploration, Rendezvous, & Task Allocation in Unknown Environments with Limited Connectivity), you conducted comparative experiments using 3, 5, and 8 agents. Is the detection range set based on the covered area or the radius? For example, if the detection radius of one agent is r and the covered area is s, do you design the range for three agents as 3r or as 1.73r derived from 3s? Once again, thank you for your enthusiastic and helpful response.

laurenbramblett commented 3 months ago

Hello,

I did a little bit of a simplification. For example if 2 UGVs had a range of 5m and also needed to stay within 5m of each other, the resulting area would be

$$A_{total} = 25\pi + 25\pi = 50\pi$$

Then I found the area of overlap which in this case is:

$$A_{overlap} = \frac{50\pi}{3} - \frac{25\sqrt{3}}{2}$$

And so:

$$A{sight} = A{total}-A_{overlap} = \frac{100\pi}{3} + \frac{25\sqrt{3}}{2}$$

Then I found a radius that would give the same area as these two robots:

$$\pi r^2 = \frac{100\pi}{3} + \frac{25\sqrt{3}}{2}$$ $$ r = \sqrt{\frac{100}{3} + \frac{25\sqrt{3}}{2\pi}}$$

This is again a total simplification, but in this way, the one robot is exploring the same area as 2 robots that must stay together in a specific formation.

mmyyen commented 3 months ago

Thank you for your clarification. I don't have any further questions at the moment, so I will go ahead and close this issue. I truly appreciate your detailed responses and assistance.