dynamicCapsuleList3D
Description
The dynamicCapsuleList3D
object manages two lists of
capsule-based collision objects in 3-D space. Collision objects are separated into two lists,
ego bodies and obstacles. For ego bodies and obstacles in 2-D, see the dynamicCapsuleList
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-6 matrix, where each row is of form
[x y z qW qX qY qZ]
, 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. xyz-positions are in meters, and the orientation is a four-element quaternion vector. The default local origin is located at the center of the left hemisphere of the capsule.Geometry –– Size of the capsule-based object based on the specified length and radius. The radius applies to the spherical ends, and the length applies to the cylinder length. To shift the capsule geometry and local origin relative to the default origin point, specify a 4-by-4 transform relative to the local frame of the capsule. To keep the default transform, specify
eye(4)
.
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 the object paths, 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 = dynamicCapsuleList3D
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 3D capsule list |
addObstacle | Add obstacles to 3-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