dynamicCapsuleList
Description
The dynamicCapsuleList
object manages two lists of capsule-based
collision objects in 2-D space. Collision objects are separated into two lists, ego bodies and
obstacles. For ego bodies and obstacles in 3-D, see the dynamicCapsuleList3D
object.
Each collision object in the two lists has three key elements:
ID –– Integer that identifies each object, stored in the
EgoIDs
property for ego bodies and theObstacleIDs
property for obstacles.States –– Location and orientation of the object as an M-by-3 matrix, where each row is of form
[x y theta]
and M is the number of states along the path of the object in the world frame. The list of states assumes each state is separated by a fixed time interval. xy-positions are in meters, andtheta
is in radians. The default local origin is located at the center of the left semicircle of the capsule.Geometry –– Size of the capsule-based object based on a specified length and radius. The radius applies to the semicircle end caps, and the length applies to the central rectangle length. To shift the capsule geometry and local origin relative to the default origin point, specify a fixed transform relative to the local frame of the capsule.
Use the object functions to dynamically add, remove, and update the geometries and states
of the various objects in your environment. To add an ego body, see the addEgo
object
function. To add an obstacle, see the addObstacle
object
function.
After specifying all of the object states, validate the ego-body paths and check for
collisions with obstacles at every step using the checkCollision
object function. The function only checks if an ego body collides with an obstacle, ignoring
collisions between only obstacles or only ego bodies.
Creation
Description
obstacleList = dynamicCapsuleList
creates a dynamic
capsule-based obstacle list with no ego bodies or obstacles. To begin building an
obstacle list, use the addEgo
or
addObstacle
object functions.
Properties
Object Functions
addEgo | Add ego bodies to capsule list |
addObstacle | Add obstacles to 2-D capsule list |
checkCollision | Check for collisions between ego bodies and obstacles |
egoGeometry | Geometric properties of ego bodies |
egoPose | Poses of ego bodies |
obstacleGeometry | Geometric properties of obstacles |
obstaclePose | Poses of obstacles |
removeEgo | Remove ego bodies from capsule list |
removeObstacle | Remove obstacles from capsule list |
show | Display ego bodies and obstacles in environment |
updateEgoGeometry | Update geometric properties of ego bodies |
updateEgoPose | Update states of ego bodies |
updateObstacleGeometry | Update geometric properties of obstacles |
updateObstaclePose | Update states of obstacles |
Examples
Extended Capabilities
Version History
Introduced in R2020b