Unity - mintforpeople/robobo-programming GitHub Wiki

RoboboSim

Introduction

3D simulators that allow the use of realistic robot models such as CoppeliaSim or Gazebo are computationally cost software tools, complex to configure and not suitable for the starting educational level. But, on the other hand, if the simulators are too simple, the operation of sensors, motors and the physics of movement itself will be very different from those of the real robot. This means that students do not really learn robotics, since the problems they have to solve are different, so their training is clearly limited.

For these reasons, it was decided to develop our own simulator using Unity technology, which allows us to create a realistic and computationally light simulation, as well as allow the simulator to run in a browser. It should be noted here that Unity is used as a development engine for many video games, so it has usability and aesthetics similar to these, something that makes its acceptance by students greater.

Download

The simulator is fully functional although it is still in beta version, so some bugs could arise. The last version can be downloaded from the following links depending on your computer OS:

MacOS: unzip the file and execute the app file. It could be necessary to launch it by pressing the CTRL button while double clicking on the file, only for the first time.

Windows: unzip the file and execute the file "Robobo Simulator Win64.exe"

Linux: unzip the file and execute the "Robobo Simulator Linux.x86_64" by double clicking or through a window terminal

First steps

1 - Download and install the last version of RoboboSim.

2 - Launch RoboboSim on your computer. (*)

3 - Click on World Select. (*)

4 - Open “Four Walls” world. (*)

5 - Connect your program to the simulador: it varies depending on using the Scrath3 o Python library. The following sections explain how to connect to the simulator from both of them.

(*) Further information in the  Robobo Inteface Section.

Connection from Scratch

Once you launched the simulator:

If you need further information about the use of Robobo with Scracth you can check the Scratch documentation.

Connection from Python

To use it with Python, you just have to specify the IP address (localhost) in the class creation. as shown in this example:

# This imports the library    
from robobopy.Robobo import Robobo

# This creates an instance of the Robobo class with the localhost IP address
rob = Robobo("localhost")

# This connects to the robobo base
rob.connect()

# This makes Robobo move straight during 4 seconds
rob.moveWheelsByTime(10,10,4)

# This disconnects from the robobo base
rob.disconnect()

If you need further information about the use of Robobo with Python you can check the [Python documentation]https://github.com/mintforpeople/robobo-programming/wiki/python-doc).

RoboboSim Interface

Once you launched the simulator, you will see the home screen:

The buttons in the home screen allow you to perform the following actions:

  • World select: Allows to access to the selection of the different simulated worlds. If you click this button, you will access the following screen.

  • Options: Leads to the configuration and options menu. These options alter the behaviour of the simulator and allow you to adjust it to your needs.

  • Help: Displays the help on the wiki.

  • Exit: Exits the simulator application and closes it. This behaviour is identical to using the close window button in the title bar of the program.

Inside a world

Once you access to the "Wold select" screen:

If you click on one of the world, for example "Four Walls", you will enter in that simulated world. You will see a screen like the following:

The icons on the top left side of the screen let you control the behaviour of the simulation. Every button has a tooltip indicating its funtion.

Meaning of the icons, from left to right:

  • Back: Ends the simulation and returns to the previous view.
  • Restart: restarts the simulation, returning the robot to the initial position indicated in the world by the blue arrow icon on the floor and the different interacting elements to their original state and positions.
  • Pause/Play: Pauses or resumes the simulation.
  • Centered/Free: Toggles the control mode of the camera to be always located on the position of the robot in the world, following it when it moves, or to be fixed on the desired point, being able to move and rotate it with the mouse.
  • Robobo's Eye: Activates and deactivates the robot's perspective interface, which allows us to see the phone's camera and Robobo's expression in real time, as well as interacting on Robobo's face with the mouse, simulating touches and gestures on the phone's screen.

Tutorial with first steps

You can follow the steps in this pdf file to configure RoboboSim in Python, and start solving some basic challenges

RoboboSim QuickStart

RoboboSim library

The simulator provides a Python library named Robobosim.py that can be used to directly interact with the simulator. More information can be found in the Robobosim.py library documentation.

Acknowledgement

rosin_logo

Developing an artificial intelligence curriculum adapted to european high schools
2019-1-ES01-KA201-065742
More information: aiplus.udc.es


eu_flag
This project has been funded with support from the European Commission. This web reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein.
⚠️ **GitHub.com Fallback** ⚠️