ros中二维激光的消息类型 sensor_msgs/LaserScan 内容解读
最近涉及到二维激光数据内容的问题,再次记录一下。
sensor_msgs/LaserScan.msg 文件的路径 /opt/ros/kinetic/share/sensor_msgs/msg/LaserScan.msg
主要内容:
# Single scan from a planar laser range-finder
#
# If you have another ranging device with different behavior (e.g. a sonar
# array), please find or create a different message, since applications
# will make fairly laser-specific assumptions about this data
Header header # timestamp in the header is the acquisition time of
# the first ray in the scan.
#
# in frame frame_id, angles are measured around
# the positive Z axis (counterclockwise, if Z is up)
# with zero angle being forward along the x axis
float32 angle_min # start angle of the scan [rad]
float32 angle_max # end angle of the scan [rad]
float32 angle_increment # angular distance between measurements [rad]
float32 time_increment # time between measurements [seconds] - if your scanner
# is moving, this will be used in interpolating position
# of 3d points
float32 scan_time # time between scans [seconds]
float32 range_min # minimum range value [m]
float32 range_max # maximum range value [m]
float32[] ranges # range data [m] (Note: values < range_min or > range_max should be discarded)
float32[] intensities # intensity data [device-specific units]. If your
# device does not provide intensities, please leave
# the array empty.
内容解释:
Header :是一个结构体,包含seq、stamp、frame_id。seq扫描顺序增加的id序列,
stamp激光数据的时间戳,frame_id 是扫描数据的名字。
angle-min:激光开始扫描的角度
angle-max:激光结束扫描的角度
angle-increment:激光每次扫描增加的角度
time-increment: 激光测量的时间间隔
scan-time :激光扫描的时间间隔
range-min:激光测距的最小值
range-max:激光测距的最大值
ranges:距离数据,是一个数组,激光转一周的测量数据。
intensities:强度数据,是一个数组,与设备有关。
举例:
