Working with SimRobot¶
On Windows and macOS, SimRobot can either be started from the development environment or by starting a scene description file in Config/Scenes
1.
In the first case, a scene description file has to be opened manually, whereas it will already be loaded in the latter case.
On Linux, just run Build/Linux/SimRobot/<configuration>/SimRobot
, either from the shell or from a file browser, and load a scene description file afterwards.
When a simulation is opened for the first time, only the scene graph is displayed.
The simulation is already running, which can be noted from the increasing number of simulation steps shown in the status bar.
A scene view showing the soccer field can be opened by double-clicking RoboCup. The view can be adjusted by using the context menu of the window or the toolbar.
Double-clicking Console will open a window that shows the output of the robot code and that allows entering commands (cf. this section).
All windows can be docked in the main window.
After starting a simulation, a script file is automatically executed if it exists, setting up the robot(s) as desired.
The name of the script file is the same as the name of the scene description file but with the extension .con
.
Together with the ability of SimRobot to store the window layout, the software can be configured to always start with a setup suitable for a certain task.
Although any object in the scene graph can be opened, only displaying certain entries in the object tree makes sense, namely the main scene RoboCup, the objects in the group RoboCup/robots, and all other views, which can be found under the tree roots that are marked with the B-Human logo.
Please note that depending on the scene, the frame rate may be quite low.
Scenes whose names contain fast
or oracle
are generally faster than the normal scenes, as the image processing on the simulated robots is ignored.
Due to that, they may not be suitable for some test cases.
Especially scenes with many robots can be very demanding even on rather good hardware, as each robot has to be simulated and is running its code, so it might be useful to use a scene with a smaller number of robots if you want to test image processing.
-
On Windows, the first time starting such a file the
SimRobot.exe
must be manually chosen to open these files. Note that both on Windows and macOS, starting a scene description file bears the risk of executing a different version of SimRobot than the one that was just compiled. ↩