KTH-SML / svea

Starter ROS workspace for working with the [s]mall [ve]hicles for [a]utonomy platform
MIT License
10 stars 21 forks source link

Cleaning up launch files #36

Open kaarmu opened 8 months ago

kaarmu commented 8 months ago

It is time to do some spring-cleaning of the launch files again.

To resolve this issue, I would like to see two PRs for svea_sensors and svea_core. Currently, there are many outdated and redundant launch files in svea_sensors. It would be good to streamline the things we are using and removing the things we are not using. Furthermore, to improve user experience it would be nice to have a main launch file in svea_core, much like what localize.launch is for svea_sensors. This launch file, maybe we can call it svea.launch, should call localize.launch, foxglove_bridge.launch, serial_node and more. IMO, the aim should be that for a typical experiment/demo there is only this:

<?xml version="1.0"?>
<launch>
    <!-- My Very Cool Experiment That Is Using AI, ML, Big Data, IoT, ... -->

    <include file="$(find svea_core)/launch/svea.launch">
        <!-- svea.launch arguments... -->
    </include>

    <node name="cool_node" pkg="awesome_project" type="cool_node.py">
        <!-- experiment parameters... -->
    </node>

</launch>

After the discussions we have had, I suggest that:

We should also think about abstraction levels, e.g. where things like map_server should be called (svea.launch or localize.launch?).

kaarmu commented 8 months ago

@frankjjiang what do you think of this?

frankjjiang commented 8 months ago

This is a good initiative! I like the proposal. Especially good to trim down the svea_sensors launch files, since they are very very bloated with legacy arguments+parameters.

Some ideas of arguments to bubble up to the top level launch:

<?xml version="1.0"?>
<launch>
    <!-- My Very Cool Experiment That Is Using AI, ML, Big Data, IoT, ... -->

    <include file="$(find svea_core)/launch/svea.launch">
        <arg name="is_outdoor" ... />
        <arg name="map_file" ... />
        <arg name="is_sim" ... />
        <!-- other svea.launch arguments... -->
    </include>

    <node name="cool_node" pkg="awesome_project" type="cool_node.py">
        <!-- experiment parameters... -->
    </node>

</launch>
kaarmu commented 8 months ago

Similar cleaning should also be done for other related SVEA repos, e.g. svea_vision.