MCA2 Puma Tutorial Chapter 1
This tutorial explains how to use the Modular Controller Architecture 2. First of all the framework has to be checked out and compiled which is subject to this chapter. Having completed the infrastructural setup the user interface builder mcagui is presented. After that we develop a simple joint simulation in order to clarify how functionality can be casted into MCA2 modules. In that context the configuration possibilities offered by MCA2 will be introduced. To conclude the tutorial several instances of the joint simulation implemented before will be integrated into a MCA2 group resulting in a complete puma robot simulation.
Checkout and compile MCA2
In order to use MCA2 you need to check out and compile the framework on your machine.
The next step is very time consuming. If you have already used the command scons configure=yes on mca do not use it again. This includes the calculator tutorial, all the libraries have already been compiled. We will build only the used programs later. So neglect scons as well if you have already used mca.
Only if not done before: scons configure=yes Only if not done before: scons
In this step we get a new folder called mcap_puma which will be moved to puma (the project which we create in the next steps) later.
Compiling the complete system for the first time may take a while (approximately 15 to 20 minutes). Later on your project will compile a lot faster.
As we have cloned all the files in this step all the files are existent. In the following you can just overwrite the existing files. In some steps this is as well necessary as the files include options that are not yet available and will be unknown to the system.
Hint: It might be necessary to call scons twice, if something goes wrong. If there are still error messages ask one of the tutors.
Create a new project
Before starting our tutorial we have to set up a new project. As we will simulate and control a puma robot our project directory could be named puma. The script newProject helps us to set up the project infrastructure:
[mca2-home] $ new_project puma
This call creates the directory puma in ~/mca2/projects and adds several subdirectories (script, etc, doc as well as a file named SConscript which is used to compile the project. Finally the following preparations have to be done:
$ cd ~/mca2/projects $ mv puma mcap_puma [mca2-home] $ source script/mcasetenv -p puma //set environment variables to the puma project $ cd projects/puma
We will later learn how to edit the configuration file SConscript in order to build executables.
Remark: How to resume working: If you terminate your session or open a new shell the MCA2 environment variables set using script/mcasetenv will be lost. In order to resume working you will need to procede as described below.