Skip to content

Commit

Permalink
Adapt launch file
Browse files Browse the repository at this point in the history
  • Loading branch information
Flova committed Jan 17, 2024
1 parent e9e7e6c commit 74a70bf
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions game_controller_hl/launch/game_controller.launch
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<launch>
<arg name="sim" default="false" />
<arg name="sim" default="false" description="Whether the robot is running in simulation or on real hardware" />

<node pkg="game_controller_hl" exec="game_controller" name="game_controller_hl" output="screen">
<arg name="team_id" default="1" description="The team id of the team the robot is playing in (not used if use_parameter_blackboard is true)" />
<arg name="bot_id" default="1" description="The id of the robot in the team (not used if use_parameter_blackboard is true)" />

<arg name="use_parameter_blackboard" default="false" description="Whether the parameter blackboard should be used to get the team and bot id dynamically" />
<arg name="parameter_blackboard_name" default="parameter_blackboard" description="The name of the parameter blackboard when it is used (see use_parameter_blackboard)" />
<arg name="team_id_param_name" default="team_id" description="The name of the parameter for the team id on the parameter blackboard when it is used (see use_parameter_blackboard)" />
<arg name="bot_id_param_name" default="bot_id" description="The name of the parameter for the bot id on the parameter blackboard when it is used (see use_parameter_blackboard)" />


<!-- launch the game controller client without a parameter blackboard -->
<node pkg="game_controller_hl" exec="game_controller" name="game_controller_hl" output="screen" unless="$(var use_parameter_blackboard)">
<param from="$(find-pkg-share game_controller_hl)/config/game_controller_settings.yaml" />
<param name="use_sim_time" value="$(var sim)" />

<param name="team_id" value="$(var team_id)" />
<param name="bot_id" value="$(var bot_id)" />
</node>

<!-- or -->

<!-- launch the game controller client with a parameter blackboard -->
<node pkg="game_controller_hl" exec="game_controller" name="game_controller_hl" output="screen" if="$(var use_parameter_blackboard)">
<param from="$(find-pkg-share game_controller_hl)/config/game_controller_settings.yaml" />
<param name="use_sim_time" value="$(var sim)" />

<param name="parameter_blackboard_name" value="$(var parameter_blackboard_name)" />
<param name="team_id_param_name" value="$(var team_id_param_name)" />
<param name="bot_id_param_name" value="$(var bot_id_param_name)" />
</node>
</launch>

0 comments on commit 74a70bf

Please sign in to comment.