Destination
===========


**Instruct the robot to move towards a given target**


This actuator reads the coordinates of a destination point, and moves the robot
in a straight line towards the given point, without turning.  It provides a
very simplistic movement, and can be used for testing or for robots with
holonomic movement.  The speeds provided are internally adjusted to the Blender
time measure.


.. cssclass:: properties morse-section

Configuration parameters for destination
----------------------------------------


You can set these properties in your scripts with ``<component>.properties(<property1>=..., <property2>=...)``.

- ``Tolerance`` (default: ``0.5``)
	(no documentation available yet)
- ``Speed`` (default: ``5.0``)
	(no documentation available yet)
- ``ControlType`` (string, default: ``"Velocity"``)
	Kind of control, can be one of ['Velocity', 'Position']


.. cssclass:: fields morse-section

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


This actuator reads these datafields at each simulation step:

- ``x`` (float, initial value: ``current X pos``)
	X coordinate of the destination
- ``y`` (float, initial value: ``current Y pos``)
	Y coordinate of the destination
- ``z`` (float, initial value: ``current Z pos``)
	Z coordinate of the destination

*Interface support:*

- :tag:`ros`  as PointReader (:py:mod:`morse.middleware.ros.destination.PointReader`)
- :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 Destination
------------------------

- ``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  



.. 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
    destination = Destination()

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

    env = Environment('empty')
    

.. cssclass:: files morse-section

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

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




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