SICKAG / sick_scan_xd

Based on the sick_scan drivers for ROS1, sick_scan_xd merges sick_scan, sick_scan2 and sick_scan_base repositories. The driver supports both Linux (native, ROS1, ROS2) and Windows (native and ROS2).
Apache License 2.0
101 stars 84 forks source link

what is the picoScan100 reflector define type? #337

Closed sjeffreydong closed 2 months ago

sjeffreydong commented 4 months ago

Dear

Customer is asking us what the picoScan100 reflector define type? int? float? int64?

rostest commented 4 months ago

Thanks for your feedback. I assume the customer means the reflector bit, which indicates the detection of a reflector. It is a flag (value 0 or 1) of type sensor_msgs::PointField::INT8 (1 byte). The types are listed in the field description of a PointCloud2 message and can be viewed e.g. with rostopic echo -n 1 /cloud_all_fields_fullframe:

fields: 
  - 
    name: "x"
    offset: 0
    datatype: 7
    count: 1
  - 
    name: "y"
    offset: 4
    datatype: 7
    count: 1
  - 
    name: "z"
    offset: 8
    datatype: 7
    count: 1
  - 
    name: "i"
    offset: 12
    datatype: 7
    count: 1
  - 
...
  - 
    name: "reflector"
    offset: 30
    datatype: 1
    count: 1

Datatype 1 is an INT8, datatype 7 is a FLOAT32. See https://docs.ros.org/en/jade/api/sensor_msgs/html/msg/PointField.html for a complete list of all datatypes of a PointCloud2 message.