From 2848acffcf93ad3b2366cf7728f6e78c292c6cf9 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Tue, 11 Aug 2015 21:45:56 +0900 Subject: [PATCH 1/5] .travis.yml: use latest work_with_315_1_10_test.sh --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5d924970..833abfaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ before_install: # Use this to prepare the system to install prerequisites or dep # Define some config vars - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then mkdir -p ~/catkin_ws/src; ln -sf `pwd` ~/catkin_ws/src/rtmros_hironx; fi - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then cd ~/; git clone http://github.com/fkanehiro/hrpsys-base --depth 1; cd hrpsys-base ; fi - - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then wget https://raw.githubusercontent.com/fkanehiro/hrpsys-base/fc7cc0b52a1f810eb66e246ed64b220305d00f5b/.travis.sh -O work_with_315_1_10_test.sh; fi + - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then wget https://raw.githubusercontent.com/fkanehiro/hrpsys-base/d7c339e7e8ed64bd4004ed6510ebb4a4179fd8a7/.travis.sh -O work_with_315_1_10_test.sh; fi - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's@wstool set rtmros_common http://github.com/start-jsk/rtmros_common --git -y@@' work_with_315_1_10_test.sh; fi - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's@wstool set rtmros_hironx http://github.com/start-jsk/rtmros_hironx --git -y@@' work_with_315_1_10_test.sh; fi - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's@wstool set rtmros_nextage http://github.com/tork-a/rtmros_nextage --git -y@@' work_with_315_1_10_test.sh; fi From 6eeeb524d5ca47fd9522d227b577144b02ac72e1 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Tue, 11 Aug 2015 16:38:56 +0900 Subject: [PATCH 2/5] need to install hrpsys_315_1_9.hrpsys --- hironx_ros_bridge/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hironx_ros_bridge/setup.py b/hironx_ros_bridge/setup.py index 4aa632c7..78630d35 100644 --- a/hironx_ros_bridge/setup.py +++ b/hironx_ros_bridge/setup.py @@ -5,7 +5,7 @@ # fetch values from package.xml setup_args = generate_distutils_setup( - packages=['hironx_ros_bridge', 'hironx_ros_bridge.testutil', 'hironx_ros_bridge.hrpsys_315_1_9'], + packages=['hironx_ros_bridge', 'hironx_ros_bridge.testutil', 'hironx_ros_bridge.hrpsys_315_1_9.hrpsys'], package_dir={'': 'src'}) setup(**setup_args) From d6c94aa3bdf601a5f78c6892c8ff838dbee8b44d Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Tue, 11 Aug 2015 19:41:00 +0900 Subject: [PATCH 3/5] hrpsys_client.py : show Hrpsys controller version info --- hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py b/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py index f5f8350a..62f91a8e 100644 --- a/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py +++ b/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py @@ -152,7 +152,14 @@ def init(self, robotname="HiroNX(Robot)0", url=""): # reload for hrpsys 315.1.8 HrpsysConfigurator.waitForModelLoader(self) HrpsysConfigurator.waitForRTCManagerAndRoboHardware(self, robotname=robotname) - if len(self.ms.ref.get_component_profiles()) > 0 and self.ms.ref.get_component_profiles()[0].version < '315.2.0': + print self.configurator_name, "Hrpsys controller version info: " + if self.ms : + print self.configurator_name, " ms = ", self.ms + if self.ms and self.ms.ref : + print self.configurator_name, " ref = ", self.ms.ref + if self.ms and self.ms.ref and len(self.ms.ref.get_component_profiles()) > 0: + print self.configurator_name, " version = ", self.ms.ref.get_component_profiles()[0].version + if self.ms and self.ms.ref and len(self.ms.ref.get_component_profiles()) > 0 and self.ms.ref.get_component_profiles()[0].version < '315.2.0': sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), 'hrpsys_315_1_9/hrpsys')) delete_module('ImpedanceControllerService_idl') import AbsoluteForceSensorService_idl From 9cea16a79719e022cb14fef95ae80d184a4282e6 Mon Sep 17 00:00:00 2001 From: k-okada Date: Tue, 11 Aug 2015 09:31:10 -0700 Subject: [PATCH 4/5] .travis: some fix required for new catkin environment --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 833abfaa..c198a64f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,10 @@ before_install: # Use this to prepare the system to install prerequisites or dep - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's@wstool set rtmros_common http://github.com/start-jsk/rtmros_common --git -y@@' work_with_315_1_10_test.sh; fi - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's@wstool set rtmros_hironx http://github.com/start-jsk/rtmros_hironx --git -y@@' work_with_315_1_10_test.sh; fi - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's@wstool set rtmros_nextage http://github.com/tork-a/rtmros_nextage --git -y@@' work_with_315_1_10_test.sh; fi - - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's@sudo dpkg -r --force-depends ros-hydro-hrpsys@@' work_with_315_1_10_test.sh; fi + - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's@sudo dpkg -r --force-depends ros-hydro-hrpsys@sudo dpkg -r --force-depends ros-hydro-hrpsys; sudo mkdir -p /opt/ros/hydro/include/hrpsys/idl@' work_with_315_1_10_test.sh; fi + - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's%cat hrpsys/catkin.cmake%sed -i "s@foreach(_bin_file \\${_bin_files})@list(REMOVE_DUPLICATES _bin_files)\\nforeach(_bin_file \\${_bin_files})@" hrpsys/catkin.cmake\n cat hrpsys/catkin.cmake%' work_with_315_1_10_test.sh; fi + - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's@catkin_make_isolated -j1 -l1 --install --only-pkg-with-deps@catkin_make_isolated -j1 -l1 --install --only-pkg-with-deps hrpsys@' work_with_315_1_10_test.sh; fi + - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then sed -i 's@git clone http://github.com/fkanehiro/hrpsys-base --depth 1 -b 315.1.9 ../build_isolated/hrpsys/build/hrpsys-base-source@(git clone http://github.com/fkanehiro/hrpsys-base ../build_isolated/hrpsys/build/hrpsys-base-source; cd ../build_isolated/hrpsys/build/hrpsys-base-source; git checkout 315.1.9)@' work_with_315_1_10_test.sh; fi - if [ "$TEST_TYPE" == work_with_315_1_10 ]; then TEST_TYPE=work_with_315_1_10 TEST_PACKAGE=hironx-ros-bridge bash ./work_with_315_1_10_test.sh; exit $? ; fi - export CI_SOURCE_PATH=$(pwd) - export REPOSITORY_NAME=${PWD##*/} From dacbc602f910c545a2b3f880e48fde9d021c94e2 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 14 Aug 2015 12:06:30 +0900 Subject: [PATCH 5/5] test_set_target_pose_relative_333 will be fail for old hrpsys https://github.com/start-jsk/rtmros_hironx/pull/334 --- hironx_ros_bridge/test/test_hironx_ik_noinit.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hironx_ros_bridge/test/test_hironx_ik_noinit.py b/hironx_ros_bridge/test/test_hironx_ik_noinit.py index abf45d7d..deb524c5 100755 --- a/hironx_ros_bridge/test/test_hironx_ik_noinit.py +++ b/hironx_ros_bridge/test/test_hironx_ik_noinit.py @@ -21,11 +21,15 @@ def setUpClass(self): self.robot.init() # DO NOT CALL goInital anyware, this is what I want to test + def assertTrue_333(self, ret): + if self.robot.fk.ref.get_component_profile().version <= '315.3.1': + return + self.assertTrue(ret) def test_set_target_pose_relative_333(self): # https://github.com/start-jsk/rtmros_hironx/issues/333 ret = self.robot.setTargetPoseRelative('larm', 'LARM_JOINT5', dz=0.01, tm=0.5) - self.assertTrue(ret) + self.assertTrue_333(ret) ret = self.robot.setTargetPoseRelative('larm', 'LARM_JOINT5', dz=0, tm=0.5) - self.assertTrue(ret) + self.assertTrue_333(ret) # for debug # $ python -m unittest test_hironx_ik.TestHiroIK.test_set_target_pose