Stereo Camera Unit

The purpose of this component is to link together one or more cameras, and provide them with the possibility to move together as a single unit. It will also provide the connection interface to use the information of the cameras attached to it. In the case of two cameras, it will provide the stereo information generated from the two camera images.

Configuration parameters for Stereo Camera Unit

No configurable parameter.

Data fields

This sensor exports these datafields at each simulation step:

  • timestamp (float, initial value: 0.0)
    number of seconds in simulated time

Interface support:

Services for Stereo Camera Unit

  • capture(n) (non blocking)

    The service takes an integer an argument and dispatch the call to all its individual cameras. The service ends when each camera has terminated its work.

    • Parameters
      • n: the number of call to each individual camera
  • get_configurations() (blocking)

    Returns the configurations of a component (parsed from the properties).

    • Return value

      a dictionary of the current component’s configurations

  • get_local_data() (blocking)

    Returns the current data stored in the sensor.

    • Return value

      a dictionary of the current sensor’s data

  • 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



The following examples show how to use this component in a Builder script:

from morse.builder import *

# adds a default robot (the MORSE mascott!)
robot = Morsy()

# creates a new instance of the sensor
stereounit = StereoUnit()

# place your component at the correct location
stereounit.translate(<x>, <y>, <z>)
stereounit.rotate(<rx>, <ry>, <rz>)


# define one or several communication interface, like 'socket'

env = Environment('empty')

Other sources of examples

(This page has been auto-generated from MORSE module morse.sensors.stereo_unit.)