Service Robotics Research Center
at Ulm University of Applied Sciences

User Tools

Site Tools

This version is outdated by a newer approved version.DiffThis version (2021/05/22 16:09) is a draft.
Approvals: 0/1

This is an old revision of the document!

System Project - How to Select a New Map

Create a new system project from an existing one that already uses the flexible navigation stack. Then use the newly created map in our new system project.

Basic Information

Level Beginner
Role System builder, but also other roles like experienced users
Assumptions Having completed the tutorial Map a New Environment by Driving Around with a Joystick or via Keyboard
System Requirements Virtual Machine Image Installed, see ready-to-go virtual machine
You will learn - how to use a new map in a system project.
Options - SystemWebotsRobotino3Navigation
- SystemWebotsP3dxNavigation
(any system using the flexible navigation stack)


In the tutorial Map a New Environment by Driving Around with a Joystick or via Keyboard, we generated a map of the environment. In the tutorial Symbolic Names for Rooms - How to Update the Knowledge Base, we updated the behavior project for navigation by specifying symbolic names for places in the environment and storing them in a knowledge base.

In this tutorial, you learn how to use our newly created map with the flexible navigation stack. We create a new system project from an existing one that already uses the flexible navigation stack. Then we use the newly created map in our new system project.

Create a New System Project from an Existing Navigation System Project

Open the System Builder view and check that the project you want to copy is in the workspace, i.e. SystemWebotsRobotino3Navigation. In this tutorial, we create a new system project by copying the already existing SystemWebotsRobotino3Navigation.

Select project → right Click → Xito Utils → Copy and Rename Project.

Enter the new system project name i.e SystemWebotsRobotino3NavigationNew, uncheck Use default location and click Browse to specify the project location. Navigate to the location $SMART_ROOT_ACE/repos/SystemRepository and select open. Check the Project name, Location and select copy.

Now the new project SystemWebotsRobotino3NavigationNew is created and you can see this in the workspace.

Update the System Parameters

System parameters in .*systemParam file specify the initial configuration of the components. Since the ComponentWebots has to load the new world, we specify this by updating the WorldPath parameter to $SMART_ROOT_ACE/repos/DataRepository/webots/worlds/RobotinoHome.wbt in SystemWebotsRobotino3NavigationNew.systemParam as shown below. This was the webots world which we have used in the mapping stage.

Since the navigation stack is same as the previous project we don't have to modify the other models in the system project i.e. Component Architecture, Deployment, Target, Deployment models.

Update the Maps Correspond to the Environment

We generated the map of the new environment(i.e. laserMap.pgm, laserMap.yaml) from the mapping stage Map a New Environment by Driving Around with a Joystick or via Keyboard. SmartAmcl requires this map to estimate the current position of the robot using laser, odometry information. SmartMapperGridMap uses this map and updates it with the current environment as perceived from the laser. The updated map from SmartMapperGridMap is used by SmartPlannerBreadthFirstSearch to find the free path way points between the goal and the current robot location.

The data used by components in a system project is placed in the project folder SystemProjectName/smartsoft/src/. Each component has it own data folder. SmartAmcl uses data folder SmartAmcl_data.

Delete the old maps i.e localization-map.pgm, localization-map.yaml from SmartAmcl_data and navigation-map.pgm, navigation-map.yaml from SmartMapperGridMap_data. You can delete them either from file explorer or from terminal with below commands.

Copy laserMap.pgm into SmartAmcl_data and rename it as localization-map.pgm. Copy laserMap.yaml into SmartAmcl_data and rename it as localization-map.yaml. Now open the localization-map.yaml file and change name of the image in line 3 from laserMap-pgm to localization-map.pgm. Now localization-map.yaml looks as below:

Copy laserMap.pgm into SmartMapperGridMap_data folder and rename it as navigation-map.pgm. Copy laserMap.yaml into SmartMapperGridMap_data folder and rename it as navigation-map.yaml. Now open the navigation-map.yaml file and change name of the image in line 3 from laserMap-pgm to navigation-map.pgm. Now navigation-map.yaml looks as below:

Note: In most scenarios, same map is used in both localization (i.e. localization-map.pgm) and path planning (i.e. navigation-map.pgm). However, in some cases we want to restrict the robot from entering some areas of the environment, these areas in the map are modified as occupied from free space and this modified map is used path planning.

Update CDL-Lookup Files

SmartCdlServer requires CDL-lookup files to calculate the motion commands to drive the robot towards intermediate waypoints as received from the path planner. CDL-lookup files are generated using shape, kinematics and dynamics of the robot. CDL-lookup files improve the efficiency by reducing the number of calculations required to generate the motion commands.

Since SystemWebotsRobotino3NavigationNew and SystemWebotsRobotino3Navigation use same robot i.e robotino, we don't have to update the cdl-lookup files. However, this step is required due to a bug in the copying of the project. During the copying the CDL-lookup binary files effected. So we delete all files from the folder $SMART_ROOT_ACE/repos/SystemRepository/SystemWebotsRobotino3NavigationNew/smartsoft/src/SmartCdlServer_data/data/lookup-files. Copy all files from folder $SMART_ROOT_ACE/repos/SystemRepository/SystemWebotsRobotino3NavigationNew/smartsoft/src/SmartCdlServer_data/data/lookup-files to $SMART_ROOT_ACE/repos/SystemRepository/SystemWebotsRobotino3NavigationNew/smartsoft/src/SmartCdlServer_data/data/lookup-files.

Note that if we want to use another robot e.g. Pioneer3Dx, Tiago, we must use the corresponding lookup files and update the names of the lookup files in SmartCdlServer parameters in *.systemParameters file.

Now all the changes required in a system project for running the flexible navigation stack with a new environment are done. Now we can deploy and execute the system. The following section describes how to deploy and execute the system. These steps same for all the system projects as you have seen in the previous tutorials.

Deploying and Executing the System

Step 5.a: Right click on the project → Run Code-Generation. This step is required if there is any change in models of the project(i.e any file inside the model folder). In this tutorial, we modified the System parameters, code-generation generates the updated configuration files(i.e *.ini files). You can look at the generated configuration files in smartsoft/src-gen/params and smartsoft/src-gen/combined-ini-files folders.

Verify that there are no errors during the code generation by looking at the Console terminal:

Step 5.b: We now deploy the system by clicking the Deployment Action from the right-click menu of the project:

It depends on your configuration whether you are being asked for credentials of the configured login account. Finally, you see the following pop-up window which tells you that the deployment was successful:

Step 5.c: You can now start your system by clicking Yes. A terminal window will open and show the scenario control menu. Choose menu-start to start the scenario. Further terminals open automatically (one for each component and one additional window for the naming service). Note that they may not be visible initially in case they overlap. Choose menu-stop to stop the scenario.

Step 5.d: Wait until the webots simulator is up and all the components are started running. Look for the terminal which contains the ComponentTCLSequencer.

In the menu, select “5 - Approach location” and enter one of the offered names for locations.

Now, the robot navigates to this destination and stops there.

What to do next?

Now you can proceed with tutorial «to be added»


tutorials/flexible-navigation-stack-selenv/start.1621692572.txt.gz · Last modified: 2021/05/22 16:09 by Christian Schlegel