Skip to content

Commit

Permalink
Make node name configurable via launch file
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszanger committed Apr 3, 2024
1 parent 4380c8e commit 3655e41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mqtt_client/launch/standalone.launch
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<launch>

<arg name="params_file" default="$(find mqtt_client)/config/params.yaml" />
<arg name="node_name" default="mqtt_client" />

<node pkg="nodelet" type="nodelet" name="mqtt_client" args="standalone mqtt_client/MqttClient" output="screen">
<node pkg="nodelet" type="nodelet" name="$(arg node_name)" args="standalone mqtt_client/MqttClient" output="screen">
<rosparam command="load" file="$(arg params_file)" />
</node>

Expand Down
3 changes: 2 additions & 1 deletion mqtt_client/launch/standalone.launch.ros2.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<launch>

<arg name="params_file" default="$(find-pkg-share mqtt_client)/config/params.ros2.yaml" />
<arg name="node_name" default="mqtt_client" />

<node pkg="mqtt_client" exec="mqtt_client" name="mqtt_client" output="screen">
<node pkg="mqtt_client" exec="mqtt_client" name="$(var node_name)" output="screen">
<param from="$(var params_file)" />
</node>

Expand Down

0 comments on commit 3655e41

Please sign in to comment.