Create a point cloud map - AD-EYE/AD-EYE_Core GitHub Wiki
PreScan GUI
The process of creating a point cloud map is done in Simulink on a Windows computer, without using ROS on Ubuntu. The ego vehicle will follow a predefined trajectory for mapping, eliminating the need for autonomous driving intelligence and ROS.
Steps to Create a Point Cloud Map
-
Open the World PEX File:
- Open your respective world PEX file in PreScan (for example the W06_Tiny_Town :
C:\Users\adeye\AD-EYE_Core\AD-EYE\Experiments\W06_Tiny_Town\Simulation\W06_Tiny_Town.pex
). - Select the option
Save Experiment As
and leave the name and location options unchanged.
- Open your respective world PEX file in PreScan (for example the W06_Tiny_Town :
-
Folder Creation:
- A folder will be created in the respective world folder (with our example in :,
C:\Users\adeye\AD-EYE_Core\AD-EYE\Experiments\W06_Tiny_Town
) with the same name (here the name is :,W06_Tiny_Town
). - Remove the existing mapping folder and rename the newly created folder (
W06_Tiny_Town
) tomapping
.
Note: In some versions of PreScan, saving an experiment with the same name and location may overwrite the old folder. In that case, save the experiment as
Mapping
. If you do this, there is no need to rename the newly created folder. - A folder will be created in the respective world folder (with our example in :,
-
Remove Moving Actors:
- The mapping world must be identical to its simulation counterpart without mobile actors (cars, trucks, humans, etc.).
- Open the world in PreScan and remove all moving actors by selecting them in the experiment components list under the actors category and pressing the delete key.
-
Configure Ego Vehicle Sensors:
- Under the actors, locate the ego vehicle (e.g.,
BMW_X5_SUV_1
). - In the sensor section, remove all sensors except the Pointcloud sensors.
- Under the actors, locate the ego vehicle (e.g.,
-
Set Pointcloud Sensor Output Mode:
- Ensure the Pointcloud sensors have their output modes set to WorldPosition.
- Right-click on the PointCloud sensor and open the object configuration.
- The following windows should appear, and in the Basic tab, select the World position mode.
- Click
OK
and ensure that in the property editor on the right side, the fieldAngles
is set to False (see below).
- Define the Path for the Ego Vehicle:
- The ego vehicle should follow a path along which it will save measurements.
- The path should cover as much of the map as possible. Overlaps are not an issue but will unnecessarily increase the size of the point cloud map.
- Set the simulation frequency ego vehicle speed so that there is roughly one measurement every 8 meters. This can be achieved by setting the speed profile to a constant 8 m/s and the frame rate of the sensors to 1 Hz. (you can set the frame rate for each Pointcloud sensors in the object configuration as earlier)
- After creating the path, place the vehicle on the path and double-click on the speed profile to set the speed in the “Initial state” and the “End Speed” to 8 m/s.
Simulink
-
Create Pointcloud Files Folder:
- Manually create a folder named
Pointcloud_Files
in theExperiment/Your_Map
directory. - Ensure the computer has the necessary permissions to create the folder.
- Manually create a folder named
-
Prepare for Point Cloud Map Creation:
- If creating the point cloud map later, delete any existing files first.
- In Simulink, connect the output of the sensors to the point cloud map creator block. The block assumes four sensors are used for mapping. (Copy and paste the block from another existing world if needed). Conceive it as shown below:
-
Simulation Settings:
- Do not generate the compilation sheet.
- Set the simulation time in Simulink according to the time required to drive the path in PreScan.
- Run the simulation to create the PCD files.
-
Verify PCD Files:
- The PCD files will be saved in the experiment directory.
- Ensure the PCD files do not contain only zeros. This issue can occur if the
Angles
property of the Pointcloud sensor is set toTrue
in PreScan while the output mode is set toWorld Position
. If this happens, change the output mode toRange
and back toWorld Position
through the object configuration window (not the property editor).
If everything is finished, You can now use your point cloud map to run a simulation by building the Simulink model