Real Robot Lab Project: what does it mean by creating a script that automatically saves the map?

I am in RealRobotLab section 1: mapping

As per the subject, I dont understand what it means by this? Do I create a launch file or a python script that automatically saves the map to my package.

What I understand from this is that I have to create a launch file that basically does the same job as:

rosrun map_server map_saver -f my_map

Hence, I did this:

<launch>
    <arg name="map_name"/>

    <node pkg="map_server" type="map_saver" name="map_saver" 
        args="-f $(arg map_name)" output="screen"/>
    
</launch>

I just dont understand the whole point of making a launch file when both things are basically doing the same job at the same “speed”. I hope you can help me clarify this situation.

The point of creating launch files generally in ROS is that it can be used with roslaunch, which has more capabilities than rosrun:

Ahh I see, that makes sense but am I actually answering the question given or am I still missing something?

Creating the launch file is only part of the job. You need to make your package “launch” the launch file - I’ll leave you to figure out how.

I have read this question and the answers, but I am still puzzled about the topic of the subject line. Let me phrase the question a little bit differently:

In the introduction of SECTION I: Mapping, the instructions explain that the task is divided into 7 steps, the 6th step being “Create a script that automatically saves maps”.

Then in the detailed instructions that follow, only the first 5 and the 7th step are elaborated, the 6th step being left out.

In all the material which has been covered leading up to this, we have never learned of a need to automatically save maps, so I am wondering if the 6th step in the introduction is incorrect and the detailed instructions are correct.

@dblanding
In the unit 2 - Map Creation, in 2.4 Saving the map you learned how to save a map manually. In this exercise, we are asking you to apply that knowledge plus other knowledge of ROS basics to save the map automatically using a script.

Applying theoretical knowledge to practical applications would often require that you pull together different bits of knowledge from different topics, and the project is trying to prepare you for that. The theory for a single topic can hardly cover all the needs that may arise in a practical situation.