Main Content


Update geometric properties of ego bodies


updateEgoGeometry(capsuleListObj,egoIDs,geomStruct) updates geometry parameters for the specified ego bodies in the capsule list. If a specified ego ID does not already exist, the function adds a new ego body with that ID to the list.

status = updateEgoGeometry(capsuleListObj,egoIDs,geomStruct) additionally returns an indicator of whether an ego body is added, updated, or a duplicate.

Input Arguments

collapse all

Dynamic capsule list, specified as a dynamicCapsuleList or dynamicCapsuleList3D object.

IDs of ego bodies to update, specified as a vector of positive integers.

Geometry parameters for ego bodies, specified as a structure or structure array, where each structure contains the fields of the structure in the Geometry field of the ego body to be updated. The fields of this structure depend on whether you are using a dynamicCapsuleList or dynamicCapsuleList3D object.

Data Types: struct

Output Arguments

collapse all

Result of updating ego bodies, specified as N-element column vector of ones, zeros, and negative ones. N is the number of ego bodies specified in the egoIDs argument. Each value indicates whether the body is removed (1), not found (0), or a duplicate (-1). If you specify the same ego ID multiple times in the egoIDs input argument, then all entries besides the last are marked as a duplicate.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2020b