RLL virtual machine¶
If you don’t want to install the RLL environment manually you can use the provided VirtualBox VM. The VM contains a preconfigured development environment and is based on Lubuntu 18.04 with ROS Melodic Morenia.
If you do not have VirtualBox already installed, download and install VirtualBox first. If you encounter problems installing VirtualBox or want to read up on the configuration options available consult the Virtual Box Manual.
On some machines hardware virtualization is deactivated by default. In this case you need to enable the corresponding option in your computer’s BIOS. Depending on your system this will likely be called Intel Virtualization Technology or AMD-V virtualization.
The RLL VM requires about 15 GB of storage space and you should use a recent computer since running the simulation inside the VM can be quite resource intensive.
Setup the RLL VM Image¶
- Download the RLL Virtual Machine (VM) packaged as an .ova file here.
- Start VirtualBox and import the downloaded .ova file by choosing: File->Import Appliance from the menu.
- Select the downloaded .ova file and adjust the machine settings if required. The defaults should be fine and can be adjusted later.
- Click Import, this will take a while.
- Open the VM settings, go to the Display Settings and make sure that the VM has enough Video Memory available, i.e. set it to the maximum value of 128MB. You should also tick the Enable 3D Acceleration checkbox. If you later notice that the VM crashes or has display issues un-tick the checkbox.
- If you have completed these steps the VM is setup and can be powered on.
You cannot change the virtual machine’s settings while the VM instance is running. If you want to change the settings you need to first power if off.
Using the VM¶
The VM contains a fully functional OS based on Lubuntu 18.04, that is Ubuntu 18.04 with the LXDE desktop environment.
You can find all installed programs via the application menu in the bottom left of your VM desktop. You can launch the file explorer and web browser by clicking the icons next to it. You will often need to start a Terminal. The easiest way to do so is to use the keyboard shortcut Ctrl + Alt + T while you are within the VM window.
To power off the VM you can click on the icon in the bottom right and select Shutdown in the dialog that will appear. Alternatively you can shutdown the VM by closing the VirtualBox window and selecting Power off the machine in the dialog.
The default username and password are both: rll
The VM is configured to use a German keyboard layout by default.
The VM contains an already initialized catkin workspace in the
folder within the user’s home directory.
The Robot Playground project is set up and
ready to run. Additionally, the VM comes with some handy desktop shortcuts to
make launching and editing the robot playground project more convenient.
On Linux based systems, paths beginning with a leading
refer to the user’s home folder. The full path to the catkin workspace is
RLL desktop shortcuts¶
You can use the provided desktop shortcuts to build, edit and submit the robot playground project instead of running the commands manually as described in the documentation. The shortcuts are convenient but your development workflow will probably be faster if you execute the commands in a terminal. These desktop shortcuts are available:
Start the Robot Playground This will build the project, start the simulation and run your code as described in Run the project.
This will open a Tilix terminal displaying the log output and a Rviz window showing the robot visualization.
Edit the Robot Playground Launches the VS Code editor with the source code of the robot playground already opened.
3 Submit the Robot Playground uploads your code to be run on a real robot.
In order for this to work, you need to setup your API access token first as described in 4. Configure your API access
- RLL Website opens Firefox and loads the RLL website. From here you can go to the documentation by clicking the corresponding menu item. If you want to download your API access token, click on Settings -> Download API access config.
You can, of course, use any other text editor of your choice. Gedit, for example, is an alternative lightweight text editor.
Debugging your Code with VS Code¶
launch.json config is provided so you can debug your code right away.
For more information on debugging consult the VS Code documentation. To start the project with the VS Code debugger execute the following steps:
- Start the simulation environment: Either run
roslaunch rll_robot_playground_project setup_simulation.launchin a terminal or use the provided VS Code task. The task can be executed by opening the command pallette (Ctrl+Shift+P) typing Run Task and choose RLL: Setup playground simulation.
- Choose either one of the following options:
- Launch your Python code: Open the
playground.pyfile in the editor and place breakpoints if you wish. Go to the debug perspective (Ctrl + Shift + D). Make sure to select the configuration Python: Debug playground.py and start debugging.
- Launch your C++ code: Open the
playground.cppfile in the editor and place breakpoints if you wish. Go to the debug perspective (Ctrl + Shift + D). Make sure to select the configuration C++: Debug playground.cpp and start debugging. Don’t forget to build your code first, e.g. by running the RLL: Build C++ Code task.
- Launch your Python code: Open the
- Trigger the project execution: Run
roslaunch rll_tools run_project.launchin a terminal or use the provided VS Code task RLL: Trigger project execution.
If you run the project code directly e.g. in a terminal or other IDE you need to
set the environment variable
ROS_NAMESPACE=iiwa before you launch your
code. The VS Code
launch.json configuration already does this for you.