Keyboard Actuator ================= **A 'fake' actuator that allows to move a robot from the keyboard.** This actuator does not require a connection with external data. It simply responds to the keyboard arrows to generate movement instructions for the robot attached. When parented to a robot, the user can press the arrow keys to modify the linear and angular velocities (V, W) of the robot. :kbd:`Up` forward :kbd:`Down` backwards :kbd:`Left` turn/yaw left :kbd:`Right` turn/yaw right :kbd:`I` pitch forward :kbd:`K` pitch backward :kbd:`L` roll left :kbd:`M` roll right :kbd:`U` strafe left :kbd:`O` strafe right :kbd:`T` move up :kbd:`G` move down .. cssclass:: properties morse-section Configuration parameters for Keyboard Actuator ---------------------------------------------- You can set these properties in your scripts with ``.properties(=..., =...)``. - ``ControlType`` (string, default: ``"Position"``) Kind of control to move the parent robot, in ['Position', 'Velocity', 'Differential'] - ``Speed`` (float, default: ``1.0``) Movement speed of the parent robot, in m/s .. cssclass:: fields morse-section Data fields ----------- No data field documented (see above for possible notes). .. cssclass:: services morse-section Services for Keyboard Actuator ------------------------------ - ``get_properties()`` (blocking) Returns the properties of a component. - Return value a dictionary of the current component's properties - ``set_property(prop_name, prop_val)`` (blocking) Modify one property on a component - Parameters - ``prop_name``: the name of the property to modify (as shown the documentation) - ``prop_val``: the new value of the property. Note that there is no checking about the type of the value so be careful - Return value nothing - ``get_configurations()`` (blocking) Returns the configurations of a component (parsed from the properties). - Return value a dictionary of the current component's configurations .. cssclass:: examples morse-section Examples -------- The following examples show how to use this component in a *Builder* script: .. code-block:: python from morse.builder import * # adds a default robot (the MORSE mascott!) robot = Morsy() # creates a new instance of the actuator keyboard = Keyboard() robot.append(keyboard) env = Environment('empty') # Run this simulation: you can move the robot with the arrow keys. .. cssclass:: files morse-section Other sources of examples +++++++++++++++++++++++++ - `Source code <../../_modules/morse/actuators/keyboard.html>`_ - `Unit-test <../../_modules/base/keyboard_testing.html>`_ *(This page has been auto-generated from MORSE module morse.actuators.keyboard.)*