Exercise 2.5 How to load a file in a launch file

I used the file argument to load but it gives an error. I don’t know the correct approach for this.
What should the launch file look like?

Hello @maanvisingh ,

The correct approach would be as follows:

<launch>
    <arg name="map_file" default="$(find provide_map)/src/map_server.yaml"/>
    <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
</launch>
2 Likes

This topic was automatically closed after 2 days. New replies are no longer allowed.