Skip to content

Commit d038e09

Browse files
committed
[ros_bridge] Add test to ensure if model is loaded. Remove install rule that's no longer valid.
1 parent 39676e5 commit d038e09

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

nextage_ros_bridge/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ add_custom_target(${PROJECT_NAME}_model_files ALL DEPENDS ${PROJECT_SOURCE_DIR}/
8787
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
8888
install(DIRECTORY script DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} USE_SOURCE_PERMISSIONS)
8989
install(DIRECTORY conf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} PATTERN "*.in" EXCLUDE)
90-
install(DIRECTORY models DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
9190
#install(DIRECTORY test DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} USE_SOURCE_PERMISSIONS)
9291

9392
install(CODE "
@@ -118,3 +117,4 @@ install(DIRECTORY test
118117
USE_SOURCE_PERMISSIONS)
119118

120119
add_rostest(test/nxo.test)
120+
add_rostest(test/ros_model.test)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<launch>
2+
<!-- This .test is to check joint status, which indirectly ensures if model is successfully loaded. -->
3+
4+
<arg name="COLLADA_FILE" default="$(find nextage_description)/models/main.dae" />
5+
<arg name="corbaport" default="2809" />
6+
<arg name="GUI" default='false' />
7+
<arg name="VRML_FILE" default="$(find nextage_description)/models/main.wrl" />
8+
9+
<!-- Define name for testing model availability at runtime -->
10+
<arg name="TESTNAME_ENSURE_MODEL" default="hz_joints" />
11+
12+
<!-- See https://github.com/start-jsk/rtmros_common/issues/416#issuecomment-46846623 -->
13+
<node name="start_omninames" pkg="rtmbuild" type="start_omninames.sh"
14+
args="$(arg corbaport)" />
15+
16+
<include file="$(find nextage_ros_bridge)/launch/nextage_ros_bridge_simulation.launch" >
17+
<arg name="COLLADA_FILE" value="$(arg COLLADA_FILE)" />
18+
<arg name="CORBAPORT" value="$(arg corbaport)" />
19+
<arg name="GUI" value="$(arg GUI)" />
20+
<arg name="MODEL_FILE" value="$(arg VRML_FILE)" />
21+
</include>
22+
23+
<test pkg="rostest" type="hztest" name="$(arg TESTNAME_ENSURE_MODEL)" test-name="test_$(arg TESTNAME_ENSURE_MODEL)">
24+
<param name="$(arg TESTNAME_ENSURE_MODEL)/hz" value="200.0" />
25+
<param name="$(arg TESTNAME_ENSURE_MODEL)/hzerror" value="5.0" />
26+
<param name="$(arg TESTNAME_ENSURE_MODEL)/test_duration" value="10.0" />
27+
<param name="$(arg TESTNAME_ENSURE_MODEL)/topic" value="joint_states" />
28+
<param name="$(arg TESTNAME_ENSURE_MODEL)/wait_time" value="30.0" />
29+
</test>
30+
</launch>

0 commit comments

Comments
 (0)