Add road and actors to Pex file - AD-EYE/AD-EYE_Core GitHub Wiki
Process to add road or actor on the Pex file
Create a new experiment with Prescan or use existing one.
Copy Matlab files add_nametoadd
and writenametoaddToPexFile
where nametoadd is the name of the road or actor you would like to add, like BezierRoad. Paste in on the same folder than your experiment.
You also need to have Matlab files xml2struct
and strcut2xml
on this folder.
You need to have a template experiment. The variable pathToTemplatePex = ['C:\Users\adeye\Desktop\real_world_data\TemplatePexFile\TemplatePexFile.pex'];
at the end of the Matlab file add_nameoftheroad
need to have the good path to the template experiment. The template pex file must contain the road or the actor, you would like to add on your experiment.
On the Matlab file add_nameoftheroad
change information of the road like you would. For example, you can change orientation and position of the road.
Information neceessary to put correctly on Pex file
Bezier road
To add bezier road you need:
- position of the road (coordinate x1 y1 z1 on the picture) [meter]
- orientation of the road (angle between x axis of the road and x axis of the map) (angle b on the picture) [radian]
- relative heading of the road (correspond to the angle α on the picture) [radian]
- difference between end and start coordinate of the raod (corresponding to ΔX, Δy and Δz on the picture). We use the road frame and not the current frame. So coordinate in this frame [meter]
- Entry tension and exit tension [meter]
Flex road
To add flex road you need:
- position of the road (coordinate x1 y1 z1 on the picture) [meter]
- orientation of the road (angle between x axis of the road and x axis of the map) (angle b on the picture) [radian]
- relative heading of the road (correspond to the angle α on the picture) [degree]
- difference between end and start coordinate of the raod (corresponding to ΔX, Δy and Δz on the picture). We use the road frame and not the current frame. So coordinate in this frame [meter]
- characteristics of turns: position [meter], entry tension [meter], exit tension [meter], heading [radian].
X and Y crossing
Images/X_crossing.PNG Images/Y_crossing.PNG
To add X or Y crossing you need:
- position of the road (coordinates x1 y1 z1 on the picture) [meter]
- orientation of the road (angle between x axis of the road and x axis of the map) [radian]
- type of the road i.e. 'Y' or 'X'
- angle between x axis of the road and the branch for all branches. (a, b, c, d on the picture) [radian]
Roundabout
To add roundabout you need:
- position of the road (coordinates x1 y1 z1 on the picture) [meter]
- orientation of the road (angle between x axis of the road and x axis of the map) [radian]
- angle between x axis of the road and the branch for all branches. (a,b,c,d on the picture) [radian]
Actors
To add actors you need:
- type of actor. For exemple, 'car' or 'tree'
- position of the actor [meter]
- orientation of the actor if it is not a tree
Possible errors and important information
Prescan visualisation
Matlab codes don't permit to update the visualisation in Prescan. If you has open the experiment before run the script, you need to close it and open again. After, build the map.
Possible errors
When you build the map, it is possible an index error appear, like in the picture. To fix that, you need to click on autofix numerical id's. Then build again.