Skip to content

Commit

Permalink
Merge pull request #2821 from pazeshun/fix_test_2817
Browse files Browse the repository at this point in the history
[jsk_pcl_ros] Fix errors on test_octomap_server_contact_pr2.test
  • Loading branch information
k-okada committed Apr 5, 2024
2 parents 6f2b856 + 952c35e commit 9087486
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
1 change: 1 addition & 0 deletions jsk_pcl_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ if (CATKIN_ENABLE_TESTING)
if(tf2_eigen_FOUND)
add_rostest(test/test_container_occupancy_detector.test)
endif()
add_rostest(test/test_octomap_server_contact_pr2.test)
endif()
roslaunch_add_file_check(launch/openni_local.launch)
roslaunch_add_file_check(launch/openni2_local.launch)
Expand Down
5 changes: 5 additions & 0 deletions jsk_pcl_ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<exec_depend>image_transport</exec_depend>
<exec_depend>image_view2</exec_depend>
<exec_depend>interactive_markers</exec_depend>
<exec_depend>joint_state_publisher</exec_depend>
<exec_depend>jsk_data</exec_depend>
<exec_depend>jsk_footstep_msgs</exec_depend>
<exec_depend>jsk_interactive_marker</exec_depend>
Expand All @@ -73,12 +74,15 @@
<exec_depend>pcl_conversions</exec_depend>
<exec_depend>pcl_msgs</exec_depend>
<exec_depend>pcl_ros</exec_depend>
<exec_depend>pr2_description</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 2">python-sklearn</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 3">python3-sklearn</exec_depend>
<exec_depend>resized_image_transport</exec_depend>
<exec_depend>robot_self_filter</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>rosboost_cfg</exec_depend>
<exec_depend>roscpp_tutorials</exec_depend>
<exec_depend>roseus</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>std_srvs</exec_depend>
Expand All @@ -89,6 +93,7 @@
<exec_depend>tf_conversions</exec_depend>
<exec_depend>topic_tools</exec_depend>
<exec_depend>visualization_msgs</exec_depend>
<exec_depend>xacro</exec_depend>
<exec_depend>yaml-cpp</exec_depend>

<test_depend>compressed_depth_image_transport</test_depend>
Expand Down
2 changes: 1 addition & 1 deletion jsk_pcl_ros/sample/include/play_rosbag_pr2_sink.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<arg name="LOAD_URDF" default="false"/>

<param name="/use_sim_time" value="true"/>
<param name="robot_description" command="$(find xacro)/xacro.py '$(find pr2_description)/robots/pr2.urdf.xacro'"
<param name="robot_description" command="$(find xacro)/xacro '$(find pr2_description)/robots/pr2.urdf.xacro'"
if="$(arg LOAD_URDF)"/>

<node name="rosbag_play" pkg="rosbag" type="play"
Expand Down
8 changes: 5 additions & 3 deletions jsk_pcl_ros/sample/sample_octomap_server_contact_pr2.launch
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<launch>
<param name="robot_description" command="$(find xacro)/xacro.py '$(find pr2_description)/robots/pr2.urdf.xacro'"/>
<arg name="use_gui" default="true" doc="argument to launch rviz" />

<param name="robot_description" command="$(find xacro)/xacro '$(find pr2_description)/robots/pr2.urdf.xacro'"/>

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="use_gui" value="true"/>
<param name="use_gui" value="$(arg use_gui)"/>
</node>

<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
Expand Down Expand Up @@ -62,6 +64,6 @@
<node pkg="jsk_pcl_ros" type="test_contact_sensor.py" name="test_contact_sensor"
output="screen" />

<node pkg="rviz" type="rviz" name="rviz"
<node pkg="rviz" type="rviz" name="rviz" if="$(arg use_gui)"
args="-d $(find jsk_pcl_ros)/config/octomap_server_contact_pr2.rviz" />
</launch>
23 changes: 23 additions & 0 deletions jsk_pcl_ros/test/test_octomap_server_contact_pr2.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<launch>
<include file="$(find jsk_pcl_ros)/sample/sample_octomap_server_contact_pr2.launch" >
<arg name="use_gui" value="false" />
</include>

<test test-name="test_octomap_server_contact_pr2"
name="test_octomap_server_contact_pr2"
pkg="jsk_tools" type="test_topic_published.py"
retry="3">
<rosparam>
topic_0: /occupied_cells_vis_array
timeout_0: 30
topic_1: /free_cells_vis_array
timeout_1: 30
topic_2: /unknown_cells_vis_array
timeout_2: 30
topic_3: /octomap_full
timeout_3: 30
topic_4: /octomap_binary
timeout_4: 30
</rosparam>
</test>
</launch>

0 comments on commit 9087486

Please sign in to comment.