Select Mechanical Propagation#

Trace scalar mechanical contributions with an acoustic wavelength. Keep a single transmitter, receiver and ray while choosing the wave type and wavelength, so the resulting path can be interpreted before expanding the sensor layout.

Before you start. Create the base sensor and output in Set Up a Sensor; the USD Python tab assumes that base exists on stage.

Mechanical paths#

Select waveType = "mechanical" and author an acoustic wavelength. This example uses 6,700,000 nm (6.7 mm). Changing wave type alone would leave the default electromagnetic wavelength.

One co-located Free transmitter/receiver pair and one Free ray keep the geometry simple, producing one slot and a 22 m direct-return path from the front wall:

#usda 1.0
(
    defaultPrim = "World"
    metersPerUnit = 1
    upAxis = "Z"
    timeCodesPerSecond = 10
    subLayers = [@generic_wpm_base.usda@]
)

over "World"
{
    over "Sensor"
    {
        token omni:sensor:GenericWpm:waveType = "mechanical"
        # Operating wavelength: 6.7 mm.
        float omni:sensor:GenericWpm:wavelengthNm = 6700000
        token[] omni:sensor:GenericWpm:tx:patternTypes = ["free"]
        uint[] omni:sensor:GenericWpm:freePatterns:tx:numElementsPerPattern = [1]
        float3[] omni:sensor:GenericWpm:freePatterns:tx:positions = [(0, 0, 0)]
        float4[] omni:sensor:GenericWpm:freePatterns:tx:orientations = [(0, 0, 0, 1)]
        token[] omni:sensor:GenericWpm:rx:patternTypes = ["free"]
        uint[] omni:sensor:GenericWpm:freePatterns:rx:numElementsPerPattern = [1]
        float3[] omni:sensor:GenericWpm:freePatterns:rx:positions = [(0, 0, 0)]
        float4[] omni:sensor:GenericWpm:freePatterns:rx:orientations = [(0, 0, 0, 1)]
        token[] omni:sensor:GenericWpm:ray:patternTypes = ["free"]
        uint[] omni:sensor:GenericWpm:freePatterns:ray:numElementsPerPattern = [1]
        float3[] omni:sensor:GenericWpm:freePatterns:ray:positions = [(0, 0, 0)]
        float4[] omni:sensor:GenericWpm:freePatterns:ray:orientations = [(0, 0, 0, 1)]
        uint[] omni:sensor:GenericWpm:tx:rayPatternIndices = [0]
        token[] omni:sensor:GenericWpm:tx:mappingModes = ["1to1"]
    }
}
sensor = stage.GetPrimAtPath("/World/Sensor")
ns = "omni:sensor:GenericWpm:"
sensor.CreateAttribute(ns + "waveType", Sdf.ValueTypeNames.Token, custom=False).Set("mechanical")
# Operating wavelength: 6.7 mm.
sensor.CreateAttribute(ns + "wavelengthNm", Sdf.ValueTypeNames.Float, custom=False).Set(6700000)
for role in ("tx", "rx", "ray"):
    sensor.CreateAttribute(ns + role + ":patternTypes", Sdf.ValueTypeNames.TokenArray, custom=False).Set(["free"])
    free = ns + "freePatterns:" + role + ":"
    sensor.CreateAttribute(free + "numElementsPerPattern", Sdf.ValueTypeNames.UIntArray, custom=False).Set([1])
    sensor.CreateAttribute(free + "positions", Sdf.ValueTypeNames.Float3Array, custom=False).Set([(0, 0, 0)])
    sensor.CreateAttribute(free + "orientations", Sdf.ValueTypeNames.Float4Array, custom=False).Set([(0, 0, 0, 1)])
sensor.CreateAttribute(ns + "tx:rayPatternIndices", Sdf.ValueTypeNames.UIntArray, custom=False).Set([0])
sensor.CreateAttribute(ns + "tx:mappingModes", Sdf.ValueTypeNames.TokenArray, custom=False).Set(["1to1"])

Geometry and pose conventions are unchanged. The output contains scalar path contributions, not an ultrasound waveform. DeltaTimeNs remains a firing offset, not an arrival timestamp.

Attribute meanings are on USD Attributes; complete types and defaults are in Sensor API Schemas.

Verification#

  1. Read the accepted dimensions and a nonzero Valid slot from the example.

  2. Its direct path to the front wall and back is 22 m. DeltaTimeNs records firing offset; it must not be interpreted as acoustic arrival time.

  3. Refer to Outputs for its timestamp reference.

Potential issues#

Use the Generic wpm checks for confirming checks and recovery.

  • The wavelength does not match the intended wave type. Changing wave type does not convert wavelength; author both together. Refer to propagation controls.

  • Firing offsets do not equal acoustic arrival times. They represent emission timing rather than wave travel time. Refer to firing times.