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().

property component_name

get the component name

property 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

abstract 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

morse.modifiers.feet module

class FeetModifier(component_instance, kwargs)[source]

Bases: 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: FeetModifier

Converts Feet to Meter

initialize()[source]

initialize the specific modifier

Can be overridden if needed

class MeterToFeet(component_instance, kwargs)[source]

Bases: FeetModifier

Converts Meter (Morse) to Feet

initialize()[source]

initialize the specific modifier

Can be overridden if needed

morse.modifiers.geocentric module

morse.modifiers.geodetic module

morse.modifiers.imu_noise module

class IMUNoiseModifier(component_instance, kwargs)[source]

Bases: 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: 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: 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: 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: 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: 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: 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))

Modified data

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

Available methods

  • 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: 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: 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: PositionNoiseModifier, 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: 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: 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: 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: 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