Skip to content

Commit

Permalink
Make data collection in main.launch as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Jun 25, 2016
1 parent 6a2075d commit 509467a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
10 changes: 6 additions & 4 deletions jsk_2016_01_baxter_apc/euslisp/main.l
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,12 @@
(send *ri* :move-arm-body->bin-overlook-pose arm target-bin)
(send *ri* :wait-interpolation)
(unix::sleep 6)
(ros::set-param
(format nil "~a_collect_sib_data/ready_to_save" (send *ri* :arm-symbol2str arm))
t)
(unix::sleep 2)
(when (ros::get-param "~collect_data")
(ros::set-param
(format nil "~a_collect_sib_data/ready_to_save" (send *ri* :arm-symbol2str arm))
t)
(unix::sleep 2)
)
(ros::ros-info "[main] Segmentating objects in bin" target-bin)
(send *ri* :recognize-objects-segmentation-in-bin arm target-bin
:stamp (ros::time-now))
Expand Down
26 changes: 18 additions & 8 deletions jsk_2016_01_baxter_apc/launch/main.launch
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<launch>
<arg name="launch_main" default="true" />
<arg name="json" />
<arg name="collect_data" default="false" />

<!-- bin contents data -->
<node pkg="jsk_2015_05_baxter_apc" type="bin_contents.py" name="bin_contents" respawn="true">
Expand Down Expand Up @@ -81,11 +82,17 @@
args="&quot;(progn (apc-init :larm-controller) (apc-mainloop :larm))&quot;"
respawn="true" output="screen">
<env name="DISPLAY" value="" />
<rosparam subst_value="true">
collect_data: $(arg collect_data)
</rosparam>
</node>
<node if="$(arg launch_main)" pkg="jsk_2016_01_baxter_apc" type="main.l" name="right_hand"
args="&quot;(progn (apc-init :rarm-controller) (apc-mainloop :rarm))&quot;"
respawn="true" output="screen">
<env name="DISPLAY" value="" />
<rosparam subst_value="true">
collect_data: $(arg collect_data)
</rosparam>
</node>

<!-- visualization -->
Expand All @@ -98,12 +105,15 @@
</node>

<!-- collecting data for sib -->
<include file="$(find jsk_2016_01_baxter_apc)/launch/include/collect_sib_data.launch">
<arg name="hand" value="right"/>
<arg name="json" value="$(arg json)"/>
</include>
<include file="$(find jsk_2016_01_baxter_apc)/launch/include/collect_sib_data.launch">
<arg name="hand" value="left"/>
<arg name="json" value="$(arg json)"/>
</include>
<group if="$(arg collect_data)">
<include file="$(find jsk_2016_01_baxter_apc)/launch/include/collect_sib_data.launch">
<arg name="hand" value="right"/>
<arg name="json" value="$(arg json)"/>
</include>
<include file="$(find jsk_2016_01_baxter_apc)/launch/include/collect_sib_data.launch">
<arg name="hand" value="left"/>
<arg name="json" value="$(arg json)"/>
</include>
</group>

</launch>

0 comments on commit 509467a

Please sign in to comment.