Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jsk_data] add machine argument for record.launch #1438

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions jsk_data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,12 @@ if (CATKIN_ENABLE_TESTING)
roslint_add_test()

catkin_add_nosetests(src/jsk_data/tests)

find_package(roslaunch REQUIRED)
roslaunch_add_file_check(launch/baxter_play.launch)
roslaunch_add_file_check(launch/pr2_play.launch)
roslaunch_add_file_check(launch/baxter_record.launch)
roslaunch_add_file_check(launch/hrp2_record.launch)
roslaunch_add_file_check(launch/pr2_record.launch)
roslaunch_add_file_check(launch/urata_record.launch)
endif()
4 changes: 4 additions & 0 deletions jsk_data/launch/baxter_record.launch
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<arg name="save_hand_range" default="true" />
<arg name="camera_namespace" default="openni"/>
<arg name="save_dir" default="/tmp/bagfile/"/>
<arg name="bagfile_prefix" default="data" />
<arg name="machine" default="localhost" />
<!-- -->
<!-- Conditions -->
<!-- -->
Expand Down Expand Up @@ -40,10 +42,12 @@
<arg name="save_all_image" value="$(arg save_all_image)" />
<arg name="camera_namespace" value="$(arg camera_namespace)" />
<arg name="save_dir" value="$(arg save_dir)" />
<arg name="bagfile_prefix" value="$(arg bagfile_prefix)" />
<arg name="other_options" value="$(arg other_options)" />
<arg name="other_topics" value="$(arg other_topics)
$(arg robot_model_topics)
$(arg hand_range_topics)" />
<arg name="other_regex_topics" value="$(arg all_button_topics)"/>
<arg name="machine" value="$(arg machine)" />
</include>
</launch>
8 changes: 6 additions & 2 deletions jsk_data/launch/common_record.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<arg name="other_regex_topics" default=""/>
<arg name="other_options" default=""/>

<arg name="machine" default="localhost" />
<machine name="localhost" address="localhost" />

<arg name="save_openni" default="true" />
<arg name="save_openni2" default="false" />
Expand All @@ -11,7 +13,8 @@
<arg name="save_multisense" default="false" />
<arg name="camera_namespace" default="openni"/>

<arg name="save_dir" default="$(env HOME)/.ros"/>
<arg name="save_dir"/> <!-- destination directory of bagfile -->
<arg name="bagfile_prefix"/> <!-- prefix of bagfile name (filename is prefix_date.bag) -->
<param name="mk_save_dir" command="mkdir -p $(arg save_dir)" />
<!-- -->
<!-- Conditions -->
Expand Down Expand Up @@ -46,11 +49,12 @@

<!-- execute -->
<node name="default_rosbag_record" pkg="rosbag" type="record"
machine="$(arg machine)"
args="$(arg openni_topics)
$(arg openni2_topics)
$(arg robot_model_topics)
$(arg other_topics)
-o $(arg save_dir)
-o $(arg save_dir)/$(arg bagfile_prefix)
$(arg other_options)
-e
$(arg all_image_topics)
Expand Down
6 changes: 5 additions & 1 deletion jsk_data/launch/hrp2_record.launch
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<launch>
<!-- for HRP2 -->
<arg name="save_dir" default="/tmp/hrp2_rosbag"/>
<arg name="bagfile_prefix" default="data" />
<arg name="camera_namespace" default="camera" />
<arg name="save_openni" default="true" />
<arg name="save_robot_model" default="true" />
<arg name="save_all_image" default="false" />
<arg name="save_multisense" default="false" />
<arg name="other_topics" default=""/>
<arg name="machine" default="localhost" />

<include file="$(find jsk_data)/launch/common_record.launch">
<arg name="camera_namespace" value="$(arg camera_namespace)" />
Expand All @@ -27,6 +29,8 @@
/off_lhsensor
/off_rhsensor
/zmp" />
<arg name="save_dir" value="$(arg save_dir)" />
<arg name="save_dir" value="$(arg save_dir)" />
<arg name="bagfile_prefix" value="$(arg bagfile_prefix)" />
<arg name="machine" value="$(arg machine)" />
</include>
</launch>
9 changes: 8 additions & 1 deletion jsk_data/launch/pr2_record.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<arg name="other_topics" default=""/>
<arg name="other_options" default=""/>

<arg name="machine" default="c1" />
<include file="$(find pr2_machine)/pr2.machine" />

<!-- for PR2 -->
<arg name="save_openni" default="true" />
<arg name="save_tilt_scan" default="true" />
Expand All @@ -13,6 +16,7 @@
<arg name="save_prosilica" default="false" />
<arg name="camera_namespace" default="openni"/>
<arg name="save_dir" default="/removable/bagfile/"/>
<arg name="bagfile_prefix" default="data" />
<arg name="remove_c2" default="true" />
<!-- -->
<!-- Conditions -->
Expand Down Expand Up @@ -63,6 +67,7 @@
<arg name="save_all_image" value="$(arg save_all_image)" />
<arg name="camera_namespace" value="$(arg camera_namespace)" />
<arg name="save_dir" value="$(arg save_dir)" />
<arg name="bagfile_prefix" value="$(arg bagfile_prefix)" />
<arg name="other_options" value="$(arg other_options)" />
<arg name="other_topics" value="$(arg other_topics)
$(arg base_scan_topics)
Expand All @@ -71,8 +76,10 @@
$(arg pressure_topics)
$(arg gripper_command_topics)
$(arg prosilica_topics)" />
<arg name="machine" value="$(arg machine)" />
</include>
<node if ="$(arg save_prosilica)"
name="set_prosilica_mode" pkg="dynamic_reconfigure" type="dynparam"
args="set /prosilica_driver trigger_mode 'streaming'" />
args="set /prosilica_driver trigger_mode 'streaming'"
machine="$(arg machine)"/>
</launch>
4 changes: 3 additions & 1 deletion jsk_data/launch/template_pr2_record.launch
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<arg name="other_options" value=""/>

<!-- for PR2 -->
<arg name="machine" value="c1" />
<arg name="save_openni" value="true" />
<arg name="save_tilt_scan" value="true" />
<arg name="save_base_scan" value="true" />
Expand All @@ -14,6 +15,7 @@
<arg name="save_gripper_command" default="true" />
<arg name="camera_namespace" value="openni"/>
<arg name="save_dir" value="/removable/bagfile/"/>
<arg name="bagfile_prefix" value="data" />
</include>

</launch>
</launch>
4 changes: 4 additions & 0 deletions jsk_data/launch/urata_record.launch
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<arg name="other_topics" default=""/>
<arg name="other_options" default="--split --duration 2m"/>
<arg name="save_dir" default="$(env HOME)/.ros/urata_record"/>
<arg name="bagfile_prefix" default="data" />
<arg name="machine" default="localhost" />
<!-- URATA robot default topics -->
<arg name="urata_topics" default="/imu
/act_contact_states /ref_contact_states
Expand All @@ -26,9 +28,11 @@
<arg name="save_all_image" value="false" />
<arg name="save_multisense" value="false" />
<arg name="save_dir" value="$(arg save_dir)" />
<arg name="bagfile_prefix" value="$(arg bagfile_prefix)" />
<arg name="other_options" value="$(arg other_options)" />
<arg name="other_topics" value="$(arg other_topics)
$(arg urata_topics)
$(arg local_multisense_topics)" />
<arg name="machine" value="$(arg machine)" />
</include>
</launch>
8 changes: 8 additions & 0 deletions jsk_data/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@
<build_depend>dynamic_reconfigure</build_depend>
<build_depend>message_generation</build_depend>
<run_depend>depth_image_proc</run_depend>
<run_depend>dynamic_reconfigure</run_depend>
<run_depend>image_transport</run_depend>
<run_depend>jsk_topic_tools</run_depend>
<run_depend>message_runtime</run_depend>
<run_depend>nodelet</run_depend>
<run_depend>openni_launch</run_depend>
<run_depend>paramiko</run_depend>
<run_depend>pr2_machine</run_depend>
<run_depend>python-click</run_depend>
<run_depend>python-yaml</run_depend> <!-- apt -->
<run_depend>rosbag</run_depend>
<run_depend>rqt_bag</run_depend>
<run_depend>rviz</run_depend>
<test_depend>python-freezegun-pip</test_depend>
<test_depend>python-nose</test_depend>
<test_depend>roslaunch</test_depend>
<test_depend>roslint</test_depend>
<export>
</export>
Expand Down