From 36f787087ce328e6b5abcc7065984f70aa70ed0f Mon Sep 17 00:00:00 2001 From: Pavel Lutskov Date: Mon, 4 Feb 2019 16:23:48 +0100 Subject: [PATCH] renamed controller to masterloop --- CMakeLists.txt | 4 +- launch/fulltest.launch | 2 +- script/calibrator.py | 4 +- script/cartesian_controller.py | 57 +++++++++++-------- script/fall_detector.py | 12 ++-- script/imitator.py | 8 +-- script/{controller.py => masterloop.py} | 22 +++---- script/walker.py | 12 ++-- ...ormController.srv => InformMasterloop.srv} | 0 9 files changed, 64 insertions(+), 57 deletions(-) rename script/{controller.py => masterloop.py} (88%) rename srv/{InformController.srv => InformMasterloop.srv} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index e31f40c..6f6d813 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ find_package(catkin REQUIRED COMPONENTS add_service_files( DIRECTORY srv FILES - InformController.srv + InformMasterloop.srv Hands.srv ) @@ -41,7 +41,7 @@ include_directories( catkin_install_python(PROGRAMS ./script/calibrator.py - ./script/controller.py + ./script/masterloop.py ./script/walker.py ./script/fall_detector.py ./script/imitator.py diff --git a/launch/fulltest.launch b/launch/fulltest.launch index 86d2931..e65b32d 100644 --- a/launch/fulltest.launch +++ b/launch/fulltest.launch @@ -8,7 +8,7 @@ output="screen"/> - {}'.format(_state_old, state)) - return InformControllerResponse(permission) + return InformMasterloopResponse(permission) if __name__ == '__main__': - rospy.init_node('controller') + rospy.init_node('masterloop') ap = ArgumentParser() ap.add_argument('-i', '--autoimitate', help='Switch between moving and imitating automatically', @@ -144,7 +144,7 @@ if __name__ == '__main__': AI = args.autoimitate init_voc_state_speech() - ic = rospy.Service('inform_controller', InformController, handle_request) + ic = rospy.Service('inform_masterloop', InformMasterloop, handle_request) speech = actionlib.SimpleActionClient('speech_server', RequestSpeechAction) diff --git a/script/walker.py b/script/walker.py index be85308..9c54735 100755 --- a/script/walker.py +++ b/script/walker.py @@ -7,7 +7,7 @@ import rospy import tf from naoqi import ALProxy -from controller import inform_controller_factory +from masterloop import inform_masterloop_factory FW = None @@ -40,7 +40,7 @@ def global_init(): RR = n_way(cz, x['rr'], 2), x['rr'] -_inform_controller = inform_controller_factory('walker') +_inform_masterloop = inform_masterloop_factory('walker') def _speed(pos, interval): @@ -58,7 +58,7 @@ def _speed(pos, interval): if __name__ == '__main__': rospy.init_node('walker') global_init() - rospy.wait_for_service('inform_controller') + rospy.wait_for_service('inform_masterloop') ll = tf.TransformListener() mp = ALProxy('ALMotion', os.environ['NAO_IP'], 9559) mp.wakeUp() @@ -75,7 +75,7 @@ if __name__ == '__main__': except Exception as e: mp.stopMove() - _inform_controller('stop') + _inform_masterloop('stop') continue movement = [0, 0, 0] @@ -95,12 +95,12 @@ if __name__ == '__main__': if not any(movement): rospy.logdebug('WALKER: STOP') - _inform_controller('stop') + _inform_masterloop('stop') # mp.move(0, 0, 0) mp.stopMove() continue - permission = _inform_controller('move') + permission = _inform_masterloop('move') if not permission: mp.stopMove() diff --git a/srv/InformController.srv b/srv/InformMasterloop.srv similarity index 100% rename from srv/InformController.srv rename to srv/InformMasterloop.srv