Skip to content

Commit

Permalink
Use conditional in launch instead of group conditional
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Jan 7, 2025
1 parent 57b40e5 commit 891cd55
Showing 1 changed file with 10 additions and 23 deletions.
33 changes: 10 additions & 23 deletions free_fleet_adapter/launch/fleet_adapter.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,16 @@
<arg name="server_uri" default="" description="The URI of the api server to transmit state and task information."/>
<arg name="output" default="screen"/>

<!-- Fleet adapter -->
<group>
<group if="$(var use_sim_time)">
<node pkg="free_fleet_adapter"
exec="fleet_adapter.py"
args="-c $(var config_file) -n $(var nav_graph_file) -s $(var server_uri) -sim"
output="both">

<param name="use_sim_time" value="$(var use_sim_time)"/>
<param name="server_uri" value="$(var server_uri)"/>
</node>
</group>
<let name="use_sim_time_flag" if="$(var use_sim_time)" value="-sim"/>
<let name="use_sim_time_flag" unless="$(var use_sim_time)" value="" />

<group unless="$(var use_sim_time)">
<node pkg="free_fleet_adapter"
exec="fleet_adapter.py"
args="-c $(var config_file) -n $(var nav_graph_file) -s $(var server_uri)"
output="both">

<param name="use_sim_time" value="$(var use_sim_time)"/>
<param name="server_uri" value="$(var server_uri)"/>
</node>
</group>
</group>
<!-- Fleet adapter -->
<node pkg="free_fleet_adapter"
exec="fleet_adapter.py"
args="-c $(var config_file) -n $(var nav_graph_file) -s $(var server_uri) ${var use_sim_time_flag)"
output="both">
<param name="use_sim_time" value="$(var use_sim_time)"/>
<param name="server_uri" value="$(var server_uri)"/>
</node>

</launch>

0 comments on commit 891cd55

Please sign in to comment.