Class LaserScanMsg
ROS sensor_msgs/LaserScan message.
Implements
Inherited Members
Namespace: Unity.SimulationPro.Foundation.SensorMessages
Assembly: Unity.SimulationPro.Foundation.dll
Syntax
[Serializable]
public class LaserScanMsg : IMessage
Constructors
LaserScanMsg()
intensity data [device-specific units]. If your device does not provide intensities, please leave the array empty.
Declaration
public LaserScanMsg()
LaserScanMsg(HeaderMsg, float, float, float, float, float, float, float, float[], float[])
Initializes a new instance with default values.
Declaration
public LaserScanMsg(HeaderMsg header, float angle_min, float angle_max, float angle_increment, float time_increment, float scan_time, float range_min, float range_max, float[] ranges, float[] intensities)
Parameters
| Type | Name | Description |
|---|---|---|
| HeaderMsg | header | ROS message header containing timestamp and coordinate frame identifier. |
| float | angle_min | Start angle of the scan in radians. |
| float | angle_max | End angle of the scan in radians. |
| float | angle_increment | Angular step between consecutive measurements in radians. |
| float | time_increment | Time between consecutive measurements in seconds. |
| float | scan_time | Time to complete one full scan in seconds. |
| float | range_min | Minimum detectable range in meters. |
| float | range_max | Maximum detectable range in meters. |
| float[] | ranges | Array of range measurements. |
| float[] | intensities | Array of intensity values corresponding to each measurement. |
Fields
angle_increment
Angular distance between measurements in radians.
Declaration
public float angle_increment
Field Value
| Type | Description |
|---|---|
| float |
angle_max
End angle of the scan in radians.
Declaration
public float angle_max
Field Value
| Type | Description |
|---|---|
| float |
angle_min
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
Declaration
public float angle_min
Field Value
| Type | Description |
|---|---|
| float |
header
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
Declaration
public HeaderMsg header
Field Value
| Type | Description |
|---|---|
| HeaderMsg |
intensities
Intensity data in device-specific units. Leave empty if the device does not provide intensities.
Declaration
public float[] intensities
Field Value
| Type | Description |
|---|---|
| float[] |
k_MessageTypeId
Identifier for this message type.
Declaration
public static readonly MessageTypeId k_MessageTypeId
Field Value
| Type | Description |
|---|---|
| MessageTypeId |
k_MessageTypeName
The ROS message type name string used for serialization and topic matching.
Declaration
public const string k_MessageTypeName = "sensor_msgs/LaserScan"
Field Value
| Type | Description |
|---|---|
| string |
range_max
Maximum valid range value in meters.
Declaration
public float range_max
Field Value
| Type | Description |
|---|---|
| float |
range_min
Minimum valid range value in meters.
Declaration
public float range_min
Field Value
| Type | Description |
|---|---|
| float |
ranges
Declaration
public float[] ranges
Field Value
| Type | Description |
|---|---|
| float[] |
scan_time
Time between scans in seconds.
Declaration
public float scan_time
Field Value
| Type | Description |
|---|---|
| float |
time_increment
Time between measurements in seconds. Used for interpolating 3D point positions when the scanner is moving.
Declaration
public float time_increment
Field Value
| Type | Description |
|---|---|
| float |
Properties
MessageTypeId
Gets the unique runtime identifier for this message type.
Declaration
public MessageTypeId MessageTypeId { get; }
Property Value
| Type | Description |
|---|---|
| MessageTypeId |
MessageTypeName
Gets the ROS message type name for this message.
Declaration
public string MessageTypeName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Deserialize(IMessageDeserializer)
Deserializes a LaserScanMsg from the given deserializer.
Declaration
public static LaserScanMsg Deserialize(IMessageDeserializer deserializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMessageDeserializer | deserializer | The deserializer. |
Returns
| Type | Description |
|---|---|
| LaserScanMsg | A new LaserScanMsg instance. |
Register()
Registers this message type with the MessageTypeRegistry.
Declaration
[InitializeOnLoadMethod]
public static void Register()
ToString()
Returns a human-readable string representation of this message.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string representation of this instance. |
Overrides
WriteTo(IMessageSerializer)
Serializes this message to the given serializer.
Declaration
public void WriteTo(IMessageSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMessageSerializer | serializer | The serializer. |