-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hironx_ros_bridge] Add test to disable/enable RTCs from conf
- Loading branch information
Showing
4 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
model: file://@PROJECT_SOURCE_DIR@/models/@ROBOT_NAME@.dae | ||
dt: 0.005 | ||
collision_pair: RARM_JOINT2:LARM_JOINT2 RARM_JOINT3:LARM_JOINT3 RARM_JOINT4:LARM_JOINT4 RARM_JOINT5:LARM_JOINT5 | ||
end_effectors: rarm,RARM_JOINT5,CHEST_JOINT0,0.0,0.0,0.0,-0.57735027,-0.57735027,-0.57735027,-2.0943951023931953,larm,LARM_JOINT5,CHEST_JOINT0,0.0,0.0,0.0,-0.57735027,-0.57735027,-0.57735027,-2.0943951023931953, | ||
|
||
# RTC disable/enable settings which will be loaded via RobotHardware | ||
CollisionDetector.enable: YES | ||
ServoController.enable: NO | ||
DataLogger.enable: NOO # Test case when typo exists | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<launch> | ||
<arg name="corbaport" default="2809" /> | ||
<arg name="GUI" default="false" /> | ||
|
||
<!-- 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 hironx_ros_bridge)/launch/hironx_startup.launch" > | ||
<arg name="GUI" value="$(arg GUI)" /> | ||
<arg name="LAUNCH_HRPSYSPY" value="false" /> | ||
<arg name="REALTIME" value="false" /> | ||
<arg name="CONF_FILE" value="$(find hironx_ros_bridge)/conf/kawada-hironx_rtc_on_off_test.conf" /> | ||
<arg name="corbaport" value="$(arg corbaport)" /> | ||
</include> | ||
|
||
<test type="test_hironx_rtc_on_off.py" pkg="hironx_ros_bridge" test-name="test_hironx_rtc_on_off" time-limit="200" retry="4" | ||
args="-ORBInitRef NameService=corbaloc:iiop:localhost:2809/NameService" /> | ||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from distutils.version import StrictVersion | ||
|
||
from test_hironx import * | ||
|
||
class TestHironxRtcOnOff(TestHiro): | ||
|
||
def test_rtc_on_off(self): | ||
self.assertTrue(['co', "CollisionDetector"] in self.robot.getRTCList()) | ||
self.assertFalse(['sc', "ServoController"] in self.robot.getRTCList()) | ||
self.assertTrue(['log', "DataLogger"] in self.robot.getRTCList()) | ||
|
||
|
||
if __name__ == '__main__': | ||
import rostest | ||
rostest.rosrun(PKG, 'test_hironx_rtc_on_off', TestHironxRtcOnOff) |