Skip to content

Commit

Permalink
[ros_bridge] Add test to ensure if model is loaded. Remove install ru…
Browse files Browse the repository at this point in the history
…le that's no longer valid.
  • Loading branch information
130s committed Dec 17, 2015
1 parent 39676e5 commit d038e09
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nextage_ros_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ add_custom_target(${PROJECT_NAME}_model_files ALL DEPENDS ${PROJECT_SOURCE_DIR}/
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY script DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} USE_SOURCE_PERMISSIONS)
install(DIRECTORY conf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} PATTERN "*.in" EXCLUDE)
install(DIRECTORY models DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
#install(DIRECTORY test DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} USE_SOURCE_PERMISSIONS)

install(CODE "
Expand Down Expand Up @@ -118,3 +117,4 @@ install(DIRECTORY test
USE_SOURCE_PERMISSIONS)

add_rostest(test/nxo.test)
add_rostest(test/ros_model.test)
30 changes: 30 additions & 0 deletions nextage_ros_bridge/test/ros_model.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<launch>
<!-- This .test is to check joint status, which indirectly ensures if model is successfully loaded. -->

<arg name="COLLADA_FILE" default="$(find nextage_description)/models/main.dae" />
<arg name="corbaport" default="2809" />
<arg name="GUI" default='false' />
<arg name="VRML_FILE" default="$(find nextage_description)/models/main.wrl" />

<!-- Define name for testing model availability at runtime -->
<arg name="TESTNAME_ENSURE_MODEL" default="hz_joints" />

<!-- See https://github.com/start-jsk/rtmros_common/issues/416#issuecomment-46846623 -->
<node name="start_omninames" pkg="rtmbuild" type="start_omninames.sh"
args="$(arg corbaport)" />

<include file="$(find nextage_ros_bridge)/launch/nextage_ros_bridge_simulation.launch" >
<arg name="COLLADA_FILE" value="$(arg COLLADA_FILE)" />
<arg name="CORBAPORT" value="$(arg corbaport)" />
<arg name="GUI" value="$(arg GUI)" />
<arg name="MODEL_FILE" value="$(arg VRML_FILE)" />
</include>

<test pkg="rostest" type="hztest" name="$(arg TESTNAME_ENSURE_MODEL)" test-name="test_$(arg TESTNAME_ENSURE_MODEL)">
<param name="$(arg TESTNAME_ENSURE_MODEL)/hz" value="200.0" />
<param name="$(arg TESTNAME_ENSURE_MODEL)/hzerror" value="5.0" />
<param name="$(arg TESTNAME_ENSURE_MODEL)/test_duration" value="10.0" />
<param name="$(arg TESTNAME_ENSURE_MODEL)/topic" value="joint_states" />
<param name="$(arg TESTNAME_ENSURE_MODEL)/wait_time" value="30.0" />
</test>
</launch>

0 comments on commit d038e09

Please sign in to comment.