Fake virtual robot
==================


This is a special case of component in MORSE. Since all sensors or actuators
must be attached to one robot, it would not normally be possible to use
"stand-alone" sensors in the environment.

If you need to use a sensor in this way, (*i.e.* for motion capture sensors,
or independent cameras) you should add an **virtual (fake)
robot** to the scene, and make it the parent of your stand-alone
sensors.

This robot has no visual representation, and consists of a single Blender
Empty. Its only purpose is to provide the base to attach sensors. A single
fake robot can be the parent of as many
sensors/actuators as needed.


.. cssclass:: properties morse-section

Configuration parameters for fake virtual robot
-----------------------------------------------


You can :

- set the mass of the robot using the builder method :py:meth:`morse.builder.morsebuilder.Robot.set_mass()`
- set the friction coefficient of the robot using the builder method :py:meth:`morse.builder.morsebuilder.Robot.set_friction()`


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

- ``NoGravity`` (bool, default: ``False``)
	Indicate if we want to consider the gravity for this                 robot If true, the behaviour is less realistic as the                 simulator will automatically compensate it. This setting                 is useful for non-realistic model flying or submarine                 robot 
- ``GroundRobot`` (bool, default: ``False``)
	Indicate if the robot is a ground robot, i.e.                   basically if it has no way to control its position on the                   Z axis


.. cssclass:: services morse-section

Services for Fake virtual robot
-------------------------------

- ``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 *
    
    # creates a new instance of the robot
    fakerobot = FakeRobot()

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

    env = Environment('empty')
    

.. cssclass:: files morse-section

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

- `Source code <../../_modules/morse/robots/fakerobot.html>`_
- `Unit-test <../../_modules/base/fakerobot_testing.html>`_




*(This page has been auto-generated from MORSE module morse.robots.fakerobot.)*
