CYL = collisionCylinder(Radius,Length)
creates a cylinder collision geometry with a specified Radius and
Length. The
cylinder is axis-aligned with its own body-fixed frame. The side of the cylinder lies
along the z-axis. The origin of the body-fixed frame is at the center
of the cylinder.
Radius of cylinder, specified as a positive scalar. Units are in meters.
Data Types: double
Length — Length positive scalar
Length of cylinder, specified as a positive scalar. Units are in meters.
Data Types: double
Pose — Pose eye(4) (default) | real-valued matrix
Pose of the collision geometry relative to the world frame, specified as a 4-by-4 homogeneous
matrix. You can change the pose after you create the collision geometry.
Create a homogeneous transformation that corresponds to a clockwise rotation of radians about the y-axis. Set the cylinder pose to the new matrix. Show the cylinder.
ang = pi/4;
mat = axang2tform([0 1 0 ang]);
cyl.Pose = mat;
show(cyl)
Extended Capabilities
C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™.