Skip to content

Commit

Permalink
Merge pull request leggedrobotics#141 from lorenwel/feature/launch_fi…
Browse files Browse the repository at this point in the history
…le_arg

Added arg for launch file parameter files
  • Loading branch information
mbjelonic authored Jan 14, 2019
2 parents 2fa54c0 + d31f350 commit a4dad8b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
8 changes: 6 additions & 2 deletions darknet_ros/launch/darknet_ros.launch
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
<arg name="yolo_weights_path" default="$(find darknet_ros)/yolo_network_config/weights"/>
<arg name="yolo_config_path" default="$(find darknet_ros)/yolo_network_config/cfg"/>

<!-- ROS and network parameter files -->
<arg name="ros_param_file" default="$(find darknet_ros)/config/ros.yaml"/>
<arg name="network_param_file" default="$(find darknet_ros)/config/yolov2-tiny.yaml"/>

<!-- Load parameters -->
<rosparam command="load" ns="darknet_ros" file="$(find darknet_ros)/config/ros.yaml"/>
<rosparam command="load" ns="darknet_ros" file="$(find darknet_ros)/config/yolov2-tiny.yaml"/>
<rosparam command="load" ns="darknet_ros" file="$(arg ros_param_file)"/>
<rosparam command="load" ns="darknet_ros" file="$(arg network_param_file)"/>

<!-- Start darknet and ros wrapper -->
<node pkg="darknet_ros" type="darknet_ros" name="darknet_ros" output="screen" launch-prefix="$(arg launch_prefix)">
Expand Down
22 changes: 7 additions & 15 deletions darknet_ros/launch/yolo_v3.launch
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>

<launch>
<!-- Console launch prefix -->
<arg name="launch_prefix" default=""/>

<!-- Use YOLOv3 -->
<arg name="network_param_file" default="$(find darknet_ros)/config/yolov3.yaml"/>

<!-- Config and weights folder. -->
<arg name="yolo_weights_path" default="$(find darknet_ros)/yolo_network_config/weights"/>
<arg name="yolo_config_path" default="$(find darknet_ros)/yolo_network_config/cfg"/>

<!-- Load parameters -->
<rosparam command="load" ns="darknet_ros" file="$(find darknet_ros)/config/ros.yaml"/>
<rosparam command="load" ns="darknet_ros" file="$(find darknet_ros)/config/yolov3.yaml"/>
<!-- Include main launch file -->
<include file="$(find darknet_ros)/launch/darknet_ros.launch">
<arg name="network_param_file" value="$(arg network_param_file)"/>
</include>

<!-- Start darknet and ros wrapper -->
<node pkg="darknet_ros" type="darknet_ros" name="darknet_ros" output="screen" launch-prefix="$(arg launch_prefix)">
<param name="weights_path" value="$(arg yolo_weights_path)" />
<param name="config_path" value="$(arg yolo_config_path)" />
</node>

<!--<node name="republish" type="republish" pkg="image_transport" output="screen" args="compressed in:=/front_camera/image_raw raw out:=/camera/image_raw" /> -->
</launch>

0 comments on commit a4dad8b

Please sign in to comment.