This solution to exercise 2.5 is a little different.
- What does it mean to write arg name="" and then what does default="" do ?
- What is the function of
args="$(arg map_file)" in node tag?
- Does order not matter in .launch file ? (whether we write arg tag first or node tag)
arg name="map_file" you are creating a new parameter named map_file, which is going to be set to the value specified in
default="". Then, when you use
args="$(arg map_file)" you are basically indicating to pass to the map_server node the map_file parameter, which value is /home/user/catkin-ws/src/my_map.yaml.
Summarizing, you are passing to the map_server node a parameter that contains the path of the map file you want to load.