1import logging; logger = logging.getLogger("morse." + __name__) 2import morse.core.robot 3 4 5class FakeRobot(morse.core.robot.Robot): 6 """ 7 This is a special case of component in MORSE. Since all sensors or actuators 8 must be attached to one robot, it would not normally be possible to use 9 "stand-alone" sensors in the environment. 10 11 If you need to use a sensor in this way, (*i.e.* for motion capture sensors, 12 or independent cameras) you should add an **virtual (fake) 13 robot** to the scene, and make it the parent of your stand-alone 14 sensors. 15 16 This robot has no visual representation, and consists of a single Blender 17 Empty. Its only purpose is to provide the base to attach sensors. A single 18 fake robot can be the parent of as many 19 sensors/actuators as needed. 20 """ 21 22 _name = 'Fake virtual robot' 23 24 def __init__(self, obj, parent=None): 25 # Call the constructor of the parent class 26 logger.info('%s initialization' % obj.name) 27 morse.core.robot.Robot.__init__(self, obj, parent) 28 29 logger.info('Component initialized') 30 31 def default_action(self): 32 """ Main function of this component. """ 33 pass 34