Checklist for mapping phase (with map editor)
March 19, 2024 ยท View on GitHub
F1TENTH autonomous grand prix (ICRA'23 London) - ForzaETH
Procedure
Precheck:
- Check the correct branch is used (
master) - Fully charged Battery plugged in
- Controller sufficiently charged and laying next to launch pc
- No wires in the way, battery is firmly positioned
- Car placed at a good position to start mapping (e.g. in the center of the track)
- Chosen NUC and controller are turned on
- Check that everybody is at their correct position:
[Mapping_MissionControl]: at the launch pc
[Control_MissionControl]: at the launch pc - Launch pc connected to a secondary display (e.g. monitor)
- In the config file
stack_master/config/global_planner_params.yaml, check: Thesafety_widthandsafety_width_sp(should be at least0.7)
Setup:
- Open a terminal and ssh into the car.
catkin buildandsauce - Open a terminal on your local pc. Open rviz and move it on the secondary display
pit_rvizX
Map with Mapping [Mapping_MissionControl]
If you have a clear racetrack, you can map with mapping
- Launch mapping with:
roslaunch stack_master mapping.launch racecar_version:=NUCX map_name:=PLACE_DAYMONTH_VN- Replace
PLACEwith the place where the track is, e.g.icraorhangar - Replace
DAYMONTHwith the zero-padded current day, e.g.2805if it is the 28th of may - Replace
VNwith the version of the map, e.g.v0if it is the first version of the map on that day
- Replace
- Drive at least one lap, using the automatic driving button (R1).
- After one completed lap you will be asked if the map is good enough.
- Press
yif the map looks good (clear trackbounds, no shifts) - Check if the waypoints were computed and the markers of the trackbounds look fine. Otherwise, kill everything and start over from 1.
- Press
Note: if the car does not prompt you to press y maybe the loop closure failed. Drive another lap manually
- If it does not work, use Map Editor
Map with Map_Editor [Mapping_MissionControl]
If you have problems with getting a correct map (gaps in the racetrack or other cars on the map) or want to adjust the raceline, you can use Map Editor. Prefer using Map Editor on our local machine, especially if the WLAN connection is bad.
Create global trajectory [Control_MissionControl]
Depending on whether you chose to use map editor locally or on the car, create the global trajectory according to the Readme.
You might want to make edits to the map to create specific racelines. However, remember that the pf_map should reflect the actual track, while the raceline-specific map can be edited as you wish.
- Slice the map into sectors with the GUI.
- Determine the overtaking sectors with the other GUI.
- Source all terminals freshly!
Copying maps / Renaming maps [Control_MissionControl]
- Rename the enclosing map folder from OLDNAME to NEWNAME.
- Inside the folder, rename:
OLDNAME.pbstreamtoNEWNAME.pbstream - Inside the folder, rename:
OLDNAME.pngtoNEWNAME.png - Inside the folder, rename:
OLDNAME.yamltoNEWNAME.yaml - Open up the
NEWNAME.yamland inside replace the reference toOLDNAME.pngtoNEWNAME.png
Verification (on car)
Verify that the map was created correctly by starting the base system with the new map and check if it runs without errors
roslaunch stack_master base_system.launch racecar_version:=<VERSION> map_name:=<map_name>
Congrats, you are done with mapping