Multi‐Robot Simulators - LCAS/ROB1001 GitHub Wiki

NetLogo Simulator

NetLogo is installed on the lab computers in Ubuntu. You can download it from their official website.

The example Netlogo code (four_robots_time_delay.nlogo) is a simple multi-robot simulation, containing four robots (turtles), four home locations and one goal location.

Simulation

  • At the start of the simulation, the four robots are at their home locations in the four corners (white squares).
  • One by one the robots move towards the goal (the yellow circle at the center).
  • When the robot reaches the goal it waits for 10 ticks then turns around and returns to its home location.
  • When the robot reaches its home location the next robot moves towards the goal and so on until the fourth robot returns home.

Buttons

  • Press setup to set up the simulation.
  • Go one step moves the simulation forward by one tick step.
  • Run simulation runs the simulation forever.

image

When running the simulation make sure to set the speed to slower so the simulation doesn't run too fast.

image

Complete the code: Part 1

Run the example Netlogo code (four_robots_time_delay.nlogo) run the simulation and see how the code works.

Add to the example the necessary code to create human agents.

  • One human in each corner at the robot's home location.
  • One human in the center at the goal.
  • Create a graphic representation that distinguishes humans from robots.

Complete the code: Part 2

Once human agents have been created, the objective of the final simulation is to make the robots deliver items from their home positions to the goal position at the center.

Implement a method for the robots to "carry" items and create variables in the code that define:

  • How many items each robot will deliver.
  • How many items each robot can carry at each time.
  • How many items each robot is currently carrying.
  • How many items each robot has delivered.
  • A way to show the number of items left to be delivered and that have been delivered.

For example; remaining_items, current_items, carrying_capacity and delivered_items. The robots may need to make several trips from the start to the goal locations.

An example of the graphical representation of the robots and humans in the final simulation. Screenshot 2024-03-18 152258

Python Simulator

An alternative version of the NetLogo simulator described above is also provided in Python language. The Python code (four_robots_simulation_template.py) provides a basic template that can be expanded/completed following the steps mentioned above.