morse.modifiers package

Submodules

morse.modifiers.abstract_modifier module

class AbstractModifier(component_instance, kwargs)[source]

Bases: object

The class is inherited by all modifiers. Concrete classes need to implement modify().

component_name

get the component name

data

get the component local data

finalize()[source]

finalize the specific modifier

Can be overridden if needed

initialize()[source]

initialize the specific modifier

Can be overridden if needed

key_error(detail)[source]

logs a standard warning if some data has not been found in the component

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

parameter(arg, prop=None, default=None)[source]

get a modifier parameter

The parameter is (by priority order): 1. get from modifier kwargs 2. get from the scene properties 3. set to None

morse.modifiers.ecef module

class CoordinatesFromECEF(component_instance, kwargs)[source]

Bases: morse.modifiers.ecef.ECEFmodifier

Converts from UTM coordinates to Blender coordinates.

initialize()[source]

initialize the specific modifier

Can be overridden if needed

method(xt)[source]
class CoordinatesToECEF(component_instance, kwargs)[source]

Bases: morse.modifiers.ecef.ECEFmodifier

Converts from Blender coordinates to ECEF coordinates.

initialize()[source]

initialize the specific modifier

Can be overridden if needed

method(xt)[source]
class ECEFmodifier(component_instance, kwargs)[source]

Bases: morse.modifiers.abstract_modifier.AbstractModifier

This modifier converts the coordinates from MORSE simulator (in LTP) into ECEF-r coordinates.

To work properly, you need to configure the following variables at the environment level:

  • longitude in degrees (double) of Blender origin
  • latitude in degrees (double) of Blender origin
  • altitude in m of the Blender origin

The ECEF modifier provides as modifiers:

initialize()[source]

initialize the specific modifier

Can be overridden if needed

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

morse.modifiers.feet module

class FeetModifier(component_instance, kwargs)[source]

Bases: morse.modifiers.abstract_modifier.AbstractModifier

This modifier converts datas from imperial units to metrics units and vice-versa.

The Feet modifier provides as modifiers:

initialize()[source]

initialize the specific modifier

Can be overridden if needed

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class FeetToMeter(component_instance, kwargs)[source]

Bases: morse.modifiers.feet.FeetModifier

Converts Feet to Meter

initialize()[source]

initialize the specific modifier

Can be overridden if needed

class MeterToFeet(component_instance, kwargs)[source]

Bases: morse.modifiers.feet.FeetModifier

Converts Meter (Morse) to Feet

initialize()[source]

initialize the specific modifier

Can be overridden if needed

morse.modifiers.geocentric module

class CoordinatesFromGeocentric(component_instance, kwargs)[source]

Bases: morse.modifiers.geocentric.Geocentricmodifier

Converts from Geocentric coordinates to Blender coordinates.

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class CoordinatesToGeocentric(component_instance, kwargs)[source]

Bases: morse.modifiers.geocentric.Geocentricmodifier

Converts from Blender coordinates to Geocentric coordinates.

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class Geocentricmodifier(component_instance, kwargs)[source]

Bases: morse.modifiers.abstract_modifier.AbstractModifier

This modifier converts the coordinates from MORSE simulator (in LTP) into Geocentric coordinates.

To work properly, you need to configure the following variables at the environment level:

  • longitude in degrees (double) of Blender origin
  • latitude in degrees (double) of Blender origin
  • altitude in m of the Blender origin

The Geocentric modifier provides as modifiers:

  • morse.modifiers.ecef.CoordinatesToGeocentric
  • morse.modifiers.ecef.CoordinatesFromGeocentric
initialize()[source]

initialize the specific modifier

Can be overridden if needed

morse.modifiers.geodetic module

class CoordinatesFromGeodetic(component_instance, kwargs)[source]

Bases: morse.modifiers.geodetic.Geodeticmodifier

Converts from Geodetic coordinates to Blender coordinates.

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class CoordinatesToGeodetic(component_instance, kwargs)[source]

Bases: morse.modifiers.geodetic.Geodeticmodifier

Converts from Blender coordinates to Geodetic coordinates.

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class Geodeticmodifier(component_instance, kwargs)[source]

Bases: morse.modifiers.abstract_modifier.AbstractModifier

This modifier converts the coordinates from MORSE simulator (in LTP) into Geodetic coordinates.

To work properly, you need to configure the following variables at the environment level:

  • longitude in degrees (double) of Blender origin
  • latitude in degrees (double) of Blender origin
  • altitude in m of the Blender origin

The Geodetic modifier provides as modifiers:

  • morse.modifiers.ecef.CoordinatesToGeodetic
  • morse.modifiers.ecef.CoordinatesFromGeodetic
initialize()[source]

initialize the specific modifier

Can be overridden if needed

morse.modifiers.imu_noise module

class IMUNoiseModifier(component_instance, kwargs)[source]

Bases: morse.modifiers.abstract_modifier.AbstractModifier

This modifier allows to simulate Gaussian noise for accelerometer and gyroscope sensors of an IMU. No bias is modeled so far.

initialize()[source]

initialize the specific modifier

Can be overridden if needed

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

morse.modifiers.ned module

class AnglesFromNED(component_instance, kwargs)[source]

Bases: morse.modifiers.ned.NEDModifier

Convert the angles from NED to ENU.

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class AnglesToNED(component_instance, kwargs)[source]

Bases: morse.modifiers.ned.NEDModifier

Convert the angles from ENU to NED.

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class CoordinatesFromNED(component_instance, kwargs)[source]

Bases: morse.modifiers.ned.NEDModifier

Convert the coordinates from NED to ENU.

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class CoordinatesToNED(component_instance, kwargs)[source]

Bases: morse.modifiers.ned.NEDModifier

Convert the coordinates from ENU to NED.

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class NEDModifier(component_instance, kwargs)[source]

Bases: morse.modifiers.abstract_modifier.AbstractModifier

This modifier converts the coordinates generated by the MORSE simulator to change to the North, East, Down (NED) coordinate system, instead of the East, North, Up (ENU) system normally used by Blender.

This is achieved by switching the direction of the X and Y axis, as well as inverting the sense of the Z axis.

This modifier attempts to alter data x, y and z for position, and yaw, pitch and roll for orientation.

The NED modifier provides as modifiers:

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

morse.modifiers.odometry_noise module

class OdometryNoiseModifier(component_instance, kwargs)[source]

Bases: morse.modifiers.abstract_modifier.AbstractModifier

This modifier allows to simulate two common issues when calculating odometry :

  • an error in the scale factor used to compute the distance from the value returned by the odometer (parameter factor)
  • the gyroscope natural drift (parameter gyro_drift (rad by tick))

The modifier only accumulate errors for a 2D odometry sensor. It modifies so the following variables :

  • dS by the scale factor
  • dx considering the scale factor and gyroscope drift
  • dy considering the scale factor and gyroscope drift
  • dyaw considering the gyroscope drift
  • x considering the scale factor and gyroscope drift
  • y considering the scale factor and gyroscope drift
  • yaw considering the gyroscope drift
  • vx considering the new dx
  • vy considering the new dy
  • wz considering the new dyaw
  • noisify: Simulate drift of gyroscope and possible error in the scale factor
initialize()[source]

initialize the specific modifier

Can be overridden if needed

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

reset_noise()[source]

Service allowing to simulate loop-closure

morse.modifiers.pose_noise module

class NoiseModifier(component_instance, kwargs)[source]

Bases: morse.modifiers.abstract_modifier.AbstractModifier

This modifier allows to simulate Gaussian noise for pose measurements. If the variable orientation exists, it is taken to be a unit quaternion and noise added to it. Otherwise rotational noise will be added to the roll, pitch and yaw variables.

This modifier attempts to alter data x, y and z for position, and either orientation or yaw, pitch and roll for orientation.

The PoseNoise modifier provides as modifiers:

initialize()[source]

initialize the specific modifier

Can be overridden if needed

class OrientationNoiseModifier(component_instance, kwargs)[source]

Bases: morse.modifiers.pose_noise.NoiseModifier

Add a gaussian noise to an orientation

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class PoseNoiseModifier(component_instance, kwargs)[source]

Bases: morse.modifiers.pose_noise.PositionNoiseModifier, morse.modifiers.pose_noise.OrientationNoiseModifier

Add a gaussian noise to both position and orientation

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class PositionNoiseModifier(component_instance, kwargs)[source]

Bases: morse.modifiers.pose_noise.NoiseModifier

Add a gaussian noise to a position

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

morse.modifiers.utm module

class CoordinatesFromUTM(component_instance, kwargs)[source]

Bases: morse.modifiers.utm.UTMModifier

Converts from UTM coordinates to Blender coordinates.

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class CoordinatesToUTM(component_instance, kwargs)[source]

Bases: morse.modifiers.utm.UTMModifier

Converts from Blender coordinates to UTM coordinates.

modify()[source]

default method called by MORSE logic

All modifiers have to override this method.

class UTMModifier(component_instance, kwargs)[source]

Bases: morse.modifiers.abstract_modifier.AbstractModifier

This modifier converts the coordinates generated by the MORSE simulator to use UTM global coordinates. This is achieved by setting the offset of the Blender origin with respect to the UTM reference. The offset can be either given in the modifier parameters, or globally defined as three properties of the Scene_Script_Holder object of the scene: UTMXOffset, UTMYOffset and UTMZOffset.

Note

Due to limitation in Blender, to pass offset outside of range [-10000.0, 10000.0] as global scene properties, you need to pass the offset value as a string.

This modifier attempts to alter data x, y and z of modified components.

The UTM modifier provides as modifiers:

initialize()[source]

Initialize the UTM coordinates reference.

Module contents