Teleport
========


**Motion controller which changes instantly robot pose                    (position and orientation)**


This actuator teleports the robot to the absolute position and
orientation with respect to the origin of the Blender coordinate
reference. Angles are expected in radians.

.. note::
    Coordinates are given with respect to the origin of
    Blender's coordinate axis.


.. cssclass:: properties morse-section

Configuration parameters for teleport
-------------------------------------

*No configurable parameter.*

.. cssclass:: fields morse-section

Data fields
-----------


This actuator reads these datafields at each simulation step:

- ``x`` (float, initial value: ``initial robot X position``)
	X coordinate of the destination, in meter
- ``y`` (float, initial value: ``initial robot Y position``)
	Y coordinate of the destination, in meter
- ``z`` (float, initial value: ``initial robot Z position``)
	Z coordinate of the destination, in meter
- ``yaw`` (float, initial value: ``Initial robot yaw``)
	Rotation of the robot around Z axis, in radian
- ``pitch`` (float, initial value: ``Initial robot pitch``)
	Rotation of the robot around Y axis, in radian
- ``roll`` (float, initial value: ``Initial robot roll``)
	Rotation of the robot around X axis, in radian

*Interface support:*

- :tag:`ros`  as PoseReader (:py:mod:`morse.middleware.ros.read_pose.PoseReader`)
- :tag:`socket`  as straight JSON deserialization (:py:mod:`morse.middleware.socket_datastream.SocketReader`)
- :tag:`yarp`  as yarp::Bottle (:py:mod:`morse.middleware.yarp_datastream.YarpReader`)


.. cssclass:: services morse-section

Services for Teleport
---------------------

- ``rotate(roll, pitch, yaw)`` (blocking)
    Rotates the actuator owner by the given (roll,pitch,yaw).
    
    This is a **relative** rotation.
    
    
  - Parameters

    - ``roll``: roll rotation, in radians
    - ``pitch``: (default: 0.0) pitch rotation, in radians
    - ``yaw``: (default: 0.0) yaw rotation, in radians

- ``get_properties()`` (blocking)
    Returns the properties of a component.
    
    
  - Return value

    a dictionary of the current component's properties  

- ``get_configurations()`` (blocking)
    Returns the configurations of a component (parsed from the properties).
    
    
  - Return value

    a dictionary of the current component's configurations  

- ``translate(x, y, z)`` (blocking)
    Translate the actuator owner by the given (x,y,z) vector.
    
    This is a **relative** displacement.
    
    
  - Parameters

    - ``x``: X translation, in meter
    - ``y``: (default: 0.0) Y translation, in meter
    - ``z``: (default: 0.0) Z translation, in meter



.. 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 *
    
    robot = ATRV()
    
    # creates a new instance of the actuator
    teleport = Teleport()

    # place your component at the correct location
    teleport.translate(<x>, <y>, <z>)
    teleport.rotate(<rx>, <ry>, <rz>)
    
    robot.append(teleport)
    
    # define one or several communication interface, like 'socket'
    teleport.add_interface(<interface>)

    env = Environment('empty')
    

.. cssclass:: files morse-section

Other sources of examples
+++++++++++++++++++++++++

- `Source code <../../_modules/morse/actuators/teleport.html>`_
- `Unit-test <../../_modules/base/teleport_testing.html>`_




*(This page has been auto-generated from MORSE module morse.actuators.teleport.)*
