Convert baud, drone type, and mode into parameters

This commit is contained in:
Youssof 2024-06-06 15:16:50 -03:00
parent 73845b3e71
commit 2a6fe990bc
2 changed files with 12 additions and 7 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.vscode

View File

@ -1,16 +1,20 @@
<launch>
<arg name="port" default="/dev/ttyUSB0"/>
<!-- xmee_mav Drone type and Commununication Mode -->
<!-- node pkg="xbee_ros_node" type="xbee_mav" name="xbee_mav" args="master solo" output="screen" -->
<node pkg="xbee_ros_node" type="xbee_mav" name="xbee_mav" args="master swarm" output="screen" />
<!-- node pkg="xbee_ros_node" type="xbee_mav" name="xbee_mav" args="slave solo" output="screen" -->
<!--node pkg="xbee_ros_node" type="xbee_mav" name="xbee_mav" args="slave swarm" output="screen" -->
<!-- xmee_mav Topics and Services Names -->
<arg name="baud" default="9600"/>
<!-- master / slave-->
<arg name="drone" default="master"/>
<!-- swarm / solo -->
<arg name="mode" default="swarm"/>
<!-- xbee_mav Drone type and Commununication Mode -->
<node pkg="xbee_ros_node" type="xbee_mav" name="xbee_mav" args="$(arg drone) $(arg mode)" output="screen" />
<!-- xbee_mav Topics and Services Names -->
<param name="Xbee_In_From_Buzz" type="str" value="outMavlink" />
<param name="Xbee_Out_To_Buzz" type="str" value="inMavlink" />
<param name="Xbee_In_From_Controller" type="str" value="xbee_cmd" />
<param name="Xbee_Out_To_Controller" type="str" value="mav_dji_cmd" />
<param name="USB_port" type="str" value="$(arg port)" />
<param name="status_service" type="str" value="network_status" />
<param name="Baud_rate" type="double" value="230400" />
<param name="Baud_rate" type="double" value="$(arg baud)" />
</launch>