Your first run with Player/Stage
This is the tutorial about how to use OpenRDK together with Player/Stage, in order to have a simulated robot in a 2D world on your own PC.
How to install Player/Stage
In order to run this tutorial, you should have installed the Player/Stage suite. Some distributions (e.g., Ubuntu/Kubuntu), have packages for them, so (if you are on a Ubuntu/Kubuntu), you can write:
$ sudo apt-get install robot-player-dev robot-player libstageplugin1
And everything should be installed. In any case: you should use only Player and Stage versions 2.0.x, not the new version 3.0, since OpenRDK is not tested with them. There is a bug in the code of the Stage plugin (the version 1 of the Stage 2 plugin:
$ sudo cp rgb.txt /usr/X11 $ sudo mkdir /usr/X11R6 $ sudo mkdir /usr/X11R6/lib $ sudo mkdir /usr/X11R6/lib/X11 $ sudo cp rgb.txt /usr/X11R6/lib/X11
Anyway, after the installation of Player/Stage, you have to reissue the command
$ cmake .
You have another choice: download the tarball from the Player/Stage website and use that one. The example explained in this tutorial has been tested with Player/Stage 2.0.3 and 2.0.4.
Running Player with a simulated 2D world
In the directory
$ robot-player freespace.cfg
You should see now the simulated robot (red) in the simulated environment.
Running the RAgent with a module that connects to Player
As for RAgent, we will use a configuration that works as shown in the figure to the right, in which the RDK Agent, thanks to the PlayerClientModule, is able to communicate to the Player server, that, in its turn, is connected to the Stage 2D simulator. Since the RDK Agent is a RConsole, we are able to inspect its properties and act on them.
As you can see, the modules of the GUI are in the same agent of the task-related modules. This can be used as a simple solution when you are testing your algorithms. When you want to deploy your application, all you need to do is to remove the GUI modules from the agent. You can create another agent with only the GUI modules and connect with the first one.
$ rconsoleqt -c rqra-player-randomMotion.config
The agent that is running now has inside also some more interesting modules. You can open the robot controller from the "Tools" menu and start moving the robot in the simulated world. If you open the property