Skip to content

Commit

Permalink
Merge pull request #23 from k-okada/master
Browse files Browse the repository at this point in the history
add test to check import waitInput works
  • Loading branch information
k-okada committed Mar 3, 2014
2 parents 075a389 + 525669c commit 9e9818f
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 1 deletion.
1 change: 1 addition & 0 deletions catkin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,5 @@ install(CODE
add_rostest(test/test-hrpsys.test)
add_rostest(test/test-colcheck.test)
add_rostest(test/test-pa10.test)
add_rostest(test/test-simulator.test)

1 change: 1 addition & 0 deletions test/test-hrpsys.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@

<test test-name="config_hostname" pkg="hrpsys" type="test-hostname.py" />
<test test-name="pkgconfig" pkg="hrpsys" type="test-pkgconfig.py" />
<test test-name="hrpsys_config" pkg="hrpsys" type="test-hrpsysconf.py" />
</launch>
20 changes: 20 additions & 0 deletions test/test-hrpsysconf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python

PKG = 'hrpsys'
NAME = 'test-waitinput'

import roslib; roslib.load_manifest('hrpsys')
from hrpsys import hrpsys_config

import unittest, sys

class TestHrpsysConfig(unittest.TestCase):

def test_import_waitinput(self):
# https://github.com/start-jsk/rtmros_hironx/blob/groovy-devel/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py
from waitInput import waitInputConfirm, waitInputSelect
self.assertTrue(True)

if __name__ == '__main__':
import rostest
rostest.run(PKG, NAME, TestHrpsysConfig, sys.argv)
2 changes: 1 addition & 1 deletion test/test-jointangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TestJointAngle(unittest.TestCase):
@classmethod
def setUpClass(self):
h = PA10()
h.init()
h.init(robotname="PA10Controller(Robot)0")

def test_get_joint_angles(self):
h = PA10()
Expand Down
13 changes: 13 additions & 0 deletions test/test-simulator.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<launch>
<!-- BEGIN:common setting -->
<env name="LANG" value="C" />
<env name="ORBgiopMaxMsgSize" value="2147483648" />
<!-- END:common setting -->

<node name="modelloader" pkg="openhrp3" type="openhrp-model-loader" output="screen"/>
<node name="hrpsys" pkg="hrpsys" type="hrpsys-simulator"
args='$(find hrpsys)/share/hrpsys/samples/PA10/PA10simulation.xml -o manager.is_master:YES -o naming.formats:%n.rtc -o exec_cxt.periodic.rate:1000000 -o manager.shutdown_onrtcs:NO -o manager.modules.load_path:$(find hrpsys)/lib -o manager.modules.preload:HGcontroller.so -o manager.components.precreate:HGcontroller -o exec_cxt.periodic.type:SynchExtTriggerEC -f $(find hrpsys)/share/hrpsys/samples/PA10/rtc.conf -o "example.RobotHardware.config_file:$(find hrpsys)/share/hrpsys/samples/PA10/RobotHardware.conf" -o "example.SequencePlayer.config_file:$(find hrpsys)/share/hrpsys/samples/PA10/PA10.conf" -o "example.StateHolder.config_file:$(find hrpsys)/share/hrpsys/samples/PA10/PA10.conf" -o "example.ForwardKinematics.config_file:$(find hrpsys)/share/hrpsys/samples/PA10/PA10.conf" -o "corba.nameservers:localhost:2809" -nodisplay -endless'
output="screen" cwd="node" />

<test test-name="test_jointangle" pkg="hrpsys" type="test-jointangle.py" />
</launch>

0 comments on commit 9e9818f

Please sign in to comment.