Main Content

rosReadScanAngles

Return scan angles for laser scan range readings

Description

angles = rosReadScanAngles(scan) calculates the scan angles, angles, corresponding to the range readings in the laser scan message, scan. Angles are measured counterclockwise around the positive z-axis, with the zero angle along the x-axis. The angles is returned in radians and wrapped to the [ –pi, pi] interval.

Input Arguments

collapse all

Laser scan message of type 'sensor_msgs/LaserScan', specified as a LaserScan message structure.

Output Arguments

collapse all

Scan angles for laser scan data, returned as an n-by-1 matrix in radians. Angles are measured counter-clockwise around the positive z-axis, with the zero angle along the x-axis. The angles is returned in radians and wrapped to the [ –pi, pi] interval.

Extended Capabilities

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

Introduced in R2021a