ArUco Marker
============


**A virtual representation of an ArUco Marker**


The ArUco marker is an AR-Marker that allows to compute the camera
pose from images in the 'real world'. 

See: http://www.uco.es/investiga/grupos/ava/node/26

The purpose of this actuator is to  provide a virtual instance of
such a marker in MORSE. By adding an ArUco marker to a MORSE
simulation you can subsequently stream/export a (virtual) camera
image and eventually use an AR Marker without a physical camera
setup or, i.e, test algorithms or simulate visual servoring.

 


.. cssclass:: properties morse-section

Configuration parameters for ArUco Marker
-----------------------------------------


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

- ``xoffset`` (float, default: ``0.0``)
	X axis translation offset in metres
- ``yoffset`` (float, default: ``0.0``)
	Y axis translation offset in metres
- ``zoffset`` (float, default: ``0.0``)
	Z axis translation offset in metres


.. cssclass:: fields morse-section

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


This actuator reads these datafields at each simulation step:

- ``x`` (float, initial value: ``0.0``)
	X axis translation metres
- ``y`` (float, initial value: ``0.0``)
	Y axis translation metres
- ``z`` (float, initial value: ``0.0``)
	Z axis translation metres
- ``roll`` (float, initial value: ``0.0``)
	X axis rotation in rad
- ``pitch`` (float, initial value: ``0.0``)
	Y axis rotation in rad
- ``yaw`` (float, initial value: ``0.0``)
	Z axis rotation in rad

*Interface support:*

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


.. cssclass:: services morse-section

Services for ArUco Marker
-------------------------

- ``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_local_position()`` (blocking)
    (no documentation yet)
- ``get_local_orientation()`` (blocking)
    (no documentation yet)
- ``get_world_orientation()`` (blocking)
    (no documentation yet)
- ``get_world_position()`` (blocking)
    (no documentation yet)
- ``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 *

    ### Add a virtual ArUco marker to the scene
    robot = Morsy()

    aruco = Arucomarker()
    aruco.add_stream('ros', topic="/aruco_pose")
    aruco.properties(zoffset=0.3, xoffset=-0.09, yoffset=.0)

    robot.append(aruco)

    env = Environment('empty')



.. cssclass:: files morse-section

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

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




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