Main Content

obstaclePose

Poses of obstacles

Description

[obstacleIDs,poseStruct] = obstaclePose(capsuleListObj) returns the obstacle ID and states for each obstacle in the specified capsule list.

[obstacleIDs,poseStruct] = obstaclePose(capsuleListObj,selectObstacleIDs) specifies which obstacles to return the ID and states for.

[obstacleIDs,poseStruct,status] = obstaclePose(capsuleListObj,selectObstacleIDs) returns an indicator of whether each ID in selectObstacleIDs exists.

Input Arguments

collapse all

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

Obstacle IDs, specified as a vector of positive integers. The function returns the obstacle IDs and states for only the obstacles specified in this vector.

Output Arguments

collapse all

IDs of obstacles, specified as a vector of positive integers.

States for obstacles, returned as a structure or structure array. Each structure contains a matrix of states for each obstacle. The state matrix size depends on whether you are using a dynamicCapsuleList or dynamicCapsuleList3D object.

Data Types: struct

Indication of obstacle existence, returned as a N-element column vector of ones, zeros, and negative ones. Each value indicates whether the associated obstacle exists (1), updated (0), or a duplicate (-1). If you specify the same obstacle ID more than once in the selectObstacleIDs argument, then the function marks all instances of that ID after the first as duplicates and ignores them.

Extended Capabilities

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

Introduced in R2020b