$ rosrun    hrpsys samplerobot-data-logger.py

"""
import imp, sys, os

# set path to hrpsys to use HrpsysConfigurator
try:
    imp.find_module('hrpsys') # catkin installed
    sys.path.append(imp.find_module('hrpsys')[1])
except: # rosbuild installed
    import roslib
    roslib.load_manifest('hrpsys')

sys.path.append(os.path.dirname(os.path.abspath(__file__))+'/../share/hrpsys/samples/SampleRobot/') # set path to SampleRobot

import samplerobot_data_logger

if __name__ == '__main__':
    samplerobot_data_logger.demo()

## IGNORE ME: this code used for rostest
if [s for s in sys.argv if "--gtest_output=xml:" in s] :
    import unittest, rostest
    rostest.run('hrpsys', 'samplerobot_data_logger', unittest.TestCase, sys.argv)






#!/usr/bin/env python

import imp, sys, os, time

# set path to hrpsys to use HrpsysConfigurator
from subprocess import check_output
sys.path.append(
    os.path.join(
        check_output(['pkg-config', 'hrpsys-base',
                      '--variable=prefix']).rstrip(),
        'share/hrpsys/samples/SampleRobot/'))  # set path to SampleRobot

import samplerobot_data_logger

if __name__ == '__main__':
    samplerobot_data_logger.demo()

## IGNORE ME: this code used for rostest
if [s for s in sys.argv if "--gtest_output=xml:" in s]:
    import unittest, rostest
    rostest.run('hrpsys', 'samplerobot_data_logger', unittest.TestCase,
                sys.argv)
Esempio n. 3
0
 def test_demo(self):
     samplerobot_data_logger.demo()
 def test_demo (self):
     samplerobot_data_logger.demo()