This is an old revision of the document!
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.
|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
(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.
Open the System Builder view and check that the project you want to copy is in the workspace. In this tutorial, we create a new system project by copying the already existing
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 and location and then select copy.
Now the new project
SystemWebotsRobotino3NavigationNew is created and you can see it in the workspace.
The system parameters in the file
«project name».systemParam specify the initial configuration of the components. In this tutorial, our system project is named
SystemWebotsRobotino3NavigationNew and thus, the file with the system parameters is named
In our system project in this tutorial, we use the Webots simulator and we need to tell Webots which world to use. As we will use the map created in tutorial Map a New Environment by Driving Around with a Joystick or via Keyboard, we need to use that world here again. Otherwise, obviously, the map would not match the world. Thus, as shown below, we update in the file
SystemWebotsRobotino3NavigationNew.systemParam the parameter
Since the flexible navigation stack remains the same, we don't have to modify the other models in the system project, i.e. Component Architecture, Deployment, Target, etc.
We use the map generated in Map a New Environment by Driving Around with a Joystick or via Keyboard (i.e. laserMap.pgm, laserMap.yaml).
SmartMapperGridMapto find a free path to the goal.
Data used by components of a system project is placed in the project folder
SystemProjectName/smartsoft/src/. Each component has it own data folder, e.g.
SmartAmcl uses the data folder
We first delete the old maps which we do not use anymore in this system project:
SmartAmcl_data: localizaion-map.pgm, localization-map.yaml
SmartMapperGridMap_data: navigation-map.pgm, navigation-map.yaml
You can delete them either via the file explorer or via a terminal with below commands:
laserMap.pgm into SmartAmcl_data and rename it as
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
localization-map.yaml looks as below:
laserMap.pgm into SmartMapperGridMap_data folder and rename it as
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
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.
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
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
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.
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
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.
Now you can proceed with tutorial «to be added»