RoboSense E1R LiDAR User Guide
RoboSense E1R LiDAR user guide: flash 3D LiDAR with 30m range, 120°×90° FOV, 260k pts/s, gPTP time sync, MSOP/DIFOP protocols, and ROS driver setup.
1. Product Description
1.1 Product Structure
The shape and size diagram of E1R is shown in Figure 1 .
Figure 1 E1R shape and size diagram
1.2 Optical Envelope FOV Definition
The optical envelope of the E1R is shown in Figure 2. After all limits are
accumulated, the optical envelope of the LiDAR cannot be blocked by exterior parts of the vehicle, such as LiDAR cover, roof panel, engine hood, and front bumper, which may block the field of view (FOV) of some parts. Figure 3 shows the FOV diagram of E1R.
Figure 2 E1R FOV
Figure 3 E1R FOV diagram
1.3 Product Specifications
The E1R uses a flash scanning method to measure distances up to 30 meters. Each frame produces a high number of points, at a rate of 26,000 points. The horizontal range of the scan is 120° (-60.0° to +60.0°), while the vertical range is 90° (-45° to +45°). For more details, please refer to Table 1.
Table 1 E1R Product Specifications
E1R Product Specifications | |||
Ranging principle | Time of Flight | FOV(horizontal) | 120° (-60.0°~+60.0°) |
safety class | Class1 eye safe | FOV(vertical) | 90° (-45°~+45°) |
Ranging distance (^1) | 30m @10% NIS, 100klux direct sunlight | Angular resolution(horizontal) | average 0.625°² |
Blind area | 0.1 m | Angular resolution(vertical) | |
Count of the points | ~260,000 points/second | Ranging Precision(^3) | ±5cm@1 sigma |
Time Synchronization (^n) | gPTP (IEEE-802.1AS) PTP E2E L2 (IEEE-1588) | Ethernet transmission rate | 1000Base-T1 Gigabit Ethernet |
Frame rate | 10 Hz | Operating Voltage | 9V - 16V |
Power Consumption(^4) | <10 W | Weight | 330 g±20 g (only LiDAR) |
Operating Temperature (^5) | -40°C ~ +85°C | Storage Temperature: | -40°C ~ +105°C |
Protection Rating | IP67 / IP6K9K |
Size | Name | length (mm) | width (mm) | height (mm) |
size | Outer Contour | 95 | 42.6 | 69.5 |
Outer contour of main body with connector and installation position contour | 95 | 51.1 | 87 |
- The ranging capability of 30meters is measured with the 10% NIST diffuse reflector as the target, the test results may be affected by the environment conditions, including but not limited to factors such as ambient temperature and lights;
- The vertical & horizontal angular resolution is not uniform in the entire FOV. The angular resolution is 0.625° in the center of the FOV and 0.7° at the edges of the FOV;
- The ranging precision is tested in the range of 10m~30m with 50% NIST diffuse reflector as the target. The test results may be affected by the environment conditions, including but not limited to factors such as ambient temperature and target distance. The precision value is applicable to most channels, but difference may exist between some channels.
- The test results of product power consumption will be affected by external environment, including but not limited to environmental temperature, distance of target object, reflection intensity of target object and other factors;
- The operating temperature of the product may be affected by the external environment, including but not limited to the lighting environment, air flow changes and other factors;
1.4 Product Principle
1.4.1 Accurate Time Synchronization Protocol
The default firmware of E1R uses the gPTP (IEEE 802.1AS) time synchronization method.
1.4.1.1 Principle of gPTP synchronization
gPTP (general Precision Time Protocol) is a derived protocol from PTP (Precision Time Protocol) in Time-Sensitive Networking. The synchronization mechanism uses the same P2P end-delay mechanism as PTP, and it adopts communication at the Layer2 of Ethernet. Unlike PTP, gPTP requires hardware timestamping, which imposes strict requirements on switches and master clocks (IEEE 802.1AS protocol is required).
1.4.1.2 gPTP wiring Method
To use the gPTP synchronization method, you need to make the following preparations, and then connect according to the connection method shown in the Figure 4 。
Figure 4 gPTP Connecting Diagram
- Prepare a gPTP Master timing host (plug and play, no additional configuration required);
- Ethernet switch;
- Device supporting gPTP protocol.
Note
- The Master timing equipment is a third-party equipment that needs to be purchased by the user independently, which is not included in the RoboSense standard product shipping package.;
- RoboSense devices, as Slave devices, only obtain the time from the Master and do not judge the accuracy of the Master clock source. If there are sudden changes in the time resolution of the LiDAR point cloud, please check if the provided time by the Master is accurate.
- After the LiDAR is synchronized, the Master is disconnected, and the time in the point cloud data packet will be superimposed according to the LiDAR’s internal clock, and it will be reset after the LiDAR is powered off and restarted.
1.4.2 Use Linuxptp tool to verify time synchronization
Connect the E1R power cable and network cable to the Interface Box, and then connect the other end of the network cable to the upper computer. The operating system (OS) of the upper computer must be a Linux system, and here we take Ubuntu as an example.
- Use the command $ifconfig to check the network card name. As shown in the figure, the network card name is enp2s0.
- Use the command $ ethtool -T enp2s0 (the network card name obtained in the previous step), you can check if this card supports PTP hardware. For gPTP synchronization, hardware support is required, and the PTP Hardware Clock option requires a value other than none.
- Download and install the linuxptp tool.
- The use of the ptp4l command.
- Delay mechanism options
Figure 5 Illustration of Finding Network Card Name
Figure 6 Illustration of checking PTP hardware support
$sudo git clone git://git.code.sf.net/p/linuxptp/code linuxptp
$cd linuxptp
$sudo make
$sudo make install
$rebootHere are some options for using the ptp4l command:
-A Automatic mode, automatically selects the E2E delay mechanism when receiving a peer delay request and switches to P2P mode.
-E E2E mode, request-response delay mechanism (default)
-P P2P mode, end-to-end delay mechanism
b. Network transport options
-2 IEEE 802.3
-4 UDP IPV4 (default)
-6 UDP IPV6c)
c. Timestamp options
-H Hardware timestamp (default)
-S Software simulation timestamp
-L The old hardware timestamp", and LEGACY_HW requires cooperation with PHC devices.
d. Other options
-f [file] Read configuration from the specified file. By default, no configuration file is read.
-i [dev] Select the PTP interface device, such as eth0 (can be specified multiple times). The dev parameter must be used with this option or a port is specified in the configuration file.
-p [dev] This option is used to specify the PHC device to be used on older Linux kernels (such as /dev/ptp0 clock device), the default is auto, ignoring both software/ LEGACY_HW time stamps (not recommended to use this option)
-s SlaveOnly mode, overrides the clock mode from the configuration filet
-t Transparent clock mode
-l [num] Set the logging level to ‘num’, the default is 6
-m Print messages to stdout
-q Don’t print messages to syslog
-v Print software version and exit
-h Help command
Additionally, here are some simple commands for synchronizing E1R using the PTP
protocol:
- PTP E2E (L2 layer) command:
- The gPTP command:
$sudo ptp4l -E -S -2 -m -i enp2s0(the name of the network card)The device requires hardware support for PTP Hardware Clock, and it is not a “none” value. In this case, you can use “-H” instead of “-S”.
$sudo ptp4l -i enp4s0 -m -H -2 -f gptp-master.cfgThe device requires hardware support for PTP Hardware Clock, which is not a “none” value. In this case, gptp-master.cfg is the gPTP master clock configuration file.
Create a new gptp-master.cfg file on the host, and copy the following content into this file, then save the file:
Note: For devices without hardware support, you can use -S instead of -H for gPTP synchronization simulation. However, the synchronization accuracy cannot be guaranteed.
1.4.3 GPS Time Synchronization
If you need to synchronize the E1R with a GPS module, first you need to enable the GPS module to provide time synchronization to the gPTP Master. The specific interface and synchronization method needs to be clear with the gPTP master provider.Unless there are special requirements, RoboSense will not provide related technical support.
Figure 7 Topology Diagram of GPS Synchronization
2. Product Installation Recommendations
2.1 Interface Description
2.1.1 E1R Platform Connector
The TE 2397179-1 connector scheme is recommended for the E1R platform, and the specific connector scheme can be seen in Table 2.
Connector Scheme | Connection Type | Model | Function |
TE Bow-mount Type(Two-in-one plug,6+2pin) | LiDAR End Connector | TE 2397179-1 | Power + Gigabit Ethernet |
Connector Scheme | Connection Type | Model | Function |
TE Bow-mount Type(Two-in-one plug,6+2pin) | Wire harness
Connector | TE 2397144-1 | Power + Gigabit Ethernet |
Table 2 Connector Scheme
2.1.2 Connection Installation Requirements
- The wire harness end connectors and wires, after being assembled with the LiDAR end connectors, must meet the waterproof grades of IP67 and IP6K-9K. The specific selection is the responsibility of the customer;
- It is recommended that at least 70mm of hand space be reserved for plugging and unplugging at the end of the wire harness connector and the surrounding environment.
2.1.3 Entire machine Wire Harness End Installation Requirements
- The material of the Ethernet wire harness should use STP wires that meet 1000BASE-T1;
- It is recommended to use Dacra 686-3 (with a bending radius of 25 mm) or GG X9305 (with a bending radius of 12 mm), subject to the recommendation of the wiring harness supplier;
- The total length of the Ethernet wire harness is recommended to be less than 15m,and the number of connectors should not exceed 3 pairs (including wire pairs);
- Ethernet signal lines should be routed in the entire machine, and it is recommended to avoid moving sections and high-temperature areas;
- The power supply needs to take into account the wire length, wire diameter and impedance. The working voltage of the lidar on the power line should be maintained at 9V - 16V;
- It is recommended that the LiDAR wiring harnesses exposed to the outside be designed with waterproof rubber sleeves.
2.2 The Connection of Interface Box
2.2.1 Vehicle Ethernet Harness Interface and Definition
The E1R uses a car Ethernet and power 2-in-1 connector, and the wiring harness is shown in Figure 8.
Figure 8 Direct Connection between LiDAR Equipment and Host Computer
2.2.2 Interface Box Interface
The connection description of E1R interface box is shown in Table 3:
Connecting to the LiDAR side
Connecting to the power supply and host computer side
Table 3 Wiring Description
2.2.3 Power Interface
The E1R interface box uses standard DC 5.5-2.1 interfaces.
When the power supply is normal, the green indicator of the power supply box is steady on. When the green indicator is off, check whether the power input is normal. If the power input is normal, the interface box may be damaged. Contact RoboSense.
2.2.4 RJ45 network port
The E1R body supports only 1000BASE-T1 on-board Ethernet. When the interface box is used, the network interface uses the standard RJ45 interface. The interface box supports only Gigabit Ethernet.
2.3 LiDAR State Machine
Refer to Figure 9 for the description of the LiDAR state machine. When the wake-up pin inputs a high level of 9-16V, the LiDAR wakes up.
Figure 9 LiDAR State Machine Description
2.4 Installation and positioning methods recommendation
2.4.1 Installation tolerance requirements
Considering the cumulative errors of the entire machine, it is recommended that the installation tolerance requirements for the LiDAR be:
- The installation position accuracy in the X, Y and Z directions is ±3mm;
- The installation Angle accuracy in the Roll, Yaw and Pitch directions is ±1.5°.
2.4.2 Position of installation bracket
The back shell of LiDAR has four M4 screw holes or through holes, as well as two positioning pillars, as shown in Figure 10 . The positioning pillar of the back shell and the bracket positioning hole match, and the bracket sets four fixed holes, which are connected by the four threaded holes of the back shell. Finally, the bracket is further fixed to the body metal by other holes.
Figure 10 Position of bracket installation and fixation
2.4.3 Installation bracket positioning and fastening requirements
- It is recommended to use the positioning method of the positioning hole/positioning column at the rear shell of the LiDAR;
- It is recommended that the LiDAR bracket use a small protrusion near the four installation holes to cooperate with the LiDAR. The overall flatness of the protrusion should be within 0.5mm.
- The pitch of the M4 screw hole is 0.7mm;
- The strength grade of the screws is recommended to be above 8.8 level;
- The recommended torque is 2.7±10% N·m;
- It is recommended that the screw length be T + 3mm of the stent thickness and the effective number of engaged teeth be 4 or more.
2.5 Design and requirements for installation bracket
The fixed bracket needs to have good rigidity for installing and fixing the LiDAR, and to keep the LiDAR in a stable state under various working conditions. The design requirements are as follows:
- The LiDAR installation scenarios have different load environments such as vibration and shock. The LiDAR bracket should have a certain rigidity to ensure that the LiDAR can work stably in various load environments. It is recommended that the LiDAR bracket maintain a certain rigidity. The specific boundary requirements are evaluated and determined by the customer perception algorithm. This recommendation stems from the fact that perception algorithms usually hope that the relative position relationship between the LiDAR and the fixed part and other sensors is as fixed as possible under external vibration excitation, rather than considering the reliability of LiDAR use. Different perception algorithms have different requirements for the relative position relationship between sensors, which should be evaluated and confirmed by the customer.
- The LiDAR bracket will bear a relatively large load after experiencing random vibration, mechanical shock and other working conditions. The strength of the bracket should be verified in combination with the actual working conditions. Under mechanical shock conditions, the maximum stress of the fastener should be less than two-thirds of the tensile strength. Under random vibration conditions, the 1sigma RMS stress of the fixator should be less than 1/5 of the tensile strength.
2.6 Cooling requirements for installation brackets
- Cooling requirements: The E1R will generate heat during operation, and the peripheral components of the LiDAR installation will be affected by solar radiation, which may increase the temperature rise of the E1R. The heat dissipation requirements are as follows:
- The front and rear of the E1R are the main heat dissipation surfaces
- The E1R fasteners should be excellent heat transfer bodies.
- It is recommended that the support be made of materials such as aluminum alloy or galvanized steel plate with a thermal conductivity greater than 50 W/m·K, and E1R should avoid being enclosed and wrapped by the fixed structure;
- The gap between E1R and its periphery is greater than 5mm. If a hole can be made, it will be better to ensure that the air flows through the LiDAR;
- It is suggested that some heat dissipation fins be made on the fasteners to increase the heat dissipation area and make it consistent with the air flow direction;
- It is recommended to provide the installation digital model (including LiDAR and peripheral structural components) as well as the installation environment information to RoboSense for thermal simulation confirmation.
- Working temperature requirements.
- The gap between E1R and the surrounding components (greater than 5mm). It is best that the mounting parts do not completely cover the LiDAR. Make some holes to ensure better air flow;
- In principle, it is only necessary to ensure that the ambient temperature around E1R does not exceed 85℃ under any conditions.
3. LiDAR Usage
3.1 Coordinate System
The coordinate system definition of E1R is shown in Figure 11.
Figure 11 E1R Coordinate System Definition
3.2 RSView
In the detection of data from E1R, free tools such as Wireshark and tcp-dump can be used to obtain raw data. Meanwhile, RSView can assist users in visualizing raw data more conveniently.
3.2.1 Software Features
RSView provides real-time visualization of any RoboSense LiDAR data. RSView can also review pre-recorded data stored in “pcap” (Packet Capture) files, but RSView still does not support playing “.pcapng” files.
RSView displays distance measurements from a RoboSense LiDAR as point data. It supports custom-colored display of variables such as intensity-of-return, time, distance, azimuth, and laser ID. The data can be exported in ‘.csv format’. The RSView 3.3.11 or later version supports generating LAS format point cloud files.
Functionality and features of RSView include:
- Visualize live streaming sensor data over Ethernet
- Record live sensor data to pcap files
- Visualize sensor data from a recorded pcap file
- Different types of visualization modes, such as distance, time, azimuth, etc.
- Display point data in a spreadsheet
- Export point cloud data in CSV format
- Distance measurement tool
- Display multiple frames of data simultaneously (Trailing Frames)
- Crop views
3.2.2 Install RSView
RSView supports running on Windows 64-bit, Ubuntu 18.04 or higher operating systems. You can download the latest installer from RoboSense website (http://www.robosense.ai/resource). Launch the downloaded installer and follow the instructions to finish the installation. After installation is completed, a shortcut will be generated on the desktop. Make sure the installation path only contains English characters.
3.2.3 Use RSView
For details on using RSView for operation, please refer to the RS-LiDAR User Guide by pressing the F1 button, or clicking the Help option in menu bar.
3.3 Communication Protocol
The communication between E1R and the computer is through Ethernet, and uses UDP protocol. There are two types of output packets: MSOP packet and DIFOP packet.
All MSOP packets involved in this document are with fixed length of 1200 bytes, DIFOP packets are with fixed length of 256 bytes. E1R network parameters are configurable, and the factory default IP and fixed client port number are set as listed in the Table 4:
Table 4 Factory default network configuration
IP Address | MSOP Port Number | DIFOP Port Number | |
E1R | 192.168.1.200 | 6699 | 7788 |
Computer | 192.168.1.102 | 6699 | 7788 |
The default MAC address of the LiDAR is initially set at the factory, and the MAC address of each LiDAR is unique.
When using the LiDAR in unicast mode, you need to set the computer’s IP to the same network segment as the LiDAR, for example, 192.168.1.x (the range of x is 1~254), and the subnet mask as 255.255.0.0. If you don’t know the network configuration information of the LiDAR, please set the host computer subnet mask to 255.255.0.0 to connect to the LiDAR and use Wireshark to capture the LiDAR output packet for analysis.
The communication protocol between E1R and the computer is mainly divided into two categories. See the Table 5 for the protocol list.
The main data stream output protocol (MSOP), encapsulates the distance, angle, reflectivity and other information measured by the LiDAR into a package and outputs it to the computer.
LiDAR information output protocol (DIFOP), outputs various configuration information of the LiDAR currently in use to the computer.
Table 5 List of communication protocols
Protocol | Abbreviation | Function | Type | Packet size |
Main Data Stream Output Protocol | MSOP | Output measured data | UDP | 1200 Bytes |
Device Information Output Protocol | DIFOP | Output device information | UDP | 256 Bytes |
3.3.1 Main Data Stream Output Protocol (MSOP)
Main data Stream Output Protocol is abbreviated as MSOP.
I/O type: LiDAR output, computer analysis.
Default port number: 6699.
The MSOP packets output three-dimensional measurement related data, including laser ranging value, return reflectivity value, vertical angle, horizontal angle and time stamp.The payload length of the MSOP packet is 1200 bytes, which consists of a synchronization header of 32 bytes, a data packet of 1152 bytes (a total of 96 data blocks of 12 bytes), and a tail of 16 bytes.
The basic structure of the MSOP packet is as shown in the figure below:
3.3.1.1 Header
The header is 32-bytes long, and is used for identification of the starting position of data, packet counting, UDP communication reservation, and time stamp storage. The detailed definition is as follows:
Table 6 MSOP Header
Header(32Bytes) | ||||
Sync | PktCnt | Ver | ReturnMode | TimeMode |
4 Bytes | 2 Bytes | 2 Bytes | 1 Byte | 1 Byte |
Timestamp | FrameSync | Res0 | LidarType | LidarTmp |
10 Bytes | 1 Byte | 9 Bytes | 1 Byte | 1 Byte |
Sync: can be used as a packet inspection sequence, and the identification header is 0x55, 0xaa, 0x5a, 0xa5.
PktCnt: Packets Sequence Number, packet counting in a circular counting manner, the count value of the first data packet of each frame is 0, the count value of the last data packet of each frame is the maximum value.
Ver: version number of the UDP communication protocol.
ReturnMode: return mode flag, 4 means strongest return, which is fixed.
TimeMode: Time synchronization mode:
0x00: currently using the LiDAR internal timing.
0x02: currently using PTP E2E time synchronization mode.
0x03: currently using gPTP time synchronization mode.
Timestamp: store timestamps. The defined timestamp is used to record the system time. The high 6 bytes are the second bits, and the low 4 bytes are the microsecond bits.
FrameSync: frame synchronization state(0x00:no 0x01:yes)
Res0: reserved bit
LidarType: the type of LiDAR, default is 0x62.
LidarTmp: LiDAR’s temperature, Temp = LidarTmp – 80
3.3.1.2 Data Packet
The data packet in the MSOP packet stores the data measured by the LiDAR, it has a total of 1152 bytes consisting of 96 data blocks, each data block has 12 bytes
The detailed definition is as follows:
Table 7 Definition of data block in MSOP packet
Data block (12Bytes) | |||
content | offset | byte | instruction |
TimeOffset | 0 | 2 | The time offset of all points in the block relative to the timestamp of the packet, the time of this group of points equals to Timestamp + time_offset |
Radius | 2 | 2 | In the polar coordinate system, the radial distance value of the points, the distance resolution is 5mm |
DirVectorX | 4 | 2 | Unit direction vector X axis component of channel 1, the value ranges from -32768 to 32767, and divides by \(2^{15}\) to float. |
DirVectorY | 6 | 2 | Unit direction vector Y axis component of channel 1, the value ranges from -32768 to 32767, and divides by \(2^{15}\) to float. |
DirVectorZ | 8 | 2 | Unit direction vector Z axis component of channel 1, the value ranges from -32768 to 32767, and divides by \(2^{15}\) to float. |
Intensity | 10 | 1 | Reflection intensity value of the channel 1 points, the value range is 0~255 |
PointAttribute | 11 | 1 | Attribute of the channel 1 point, 1 indicates normal, 2 indicates noisy point, |
Related calculation specification:
Calculation of the radial distance: (Radius is 2-byte long, the unit is millimeter, and the resolution is 5mm.)
Get the hexadecimal number of the radius value of a charnel in the data packet: R1 is 0x03, R2 is 0xfc
0x03 is the high digit of the distance, converted to decimal is 3, 0xfc is the low digit of the distance, converted into decimal is 252.
Therefore: the radial distance of this channel=R1256+R2=3256+252=1020.
According to the resolution of the coordinates, it is converted to meters: 1020*0.005=5.10m.
Therefore, the radial distance of this channel in the corresponding elevation and azimuth direction is 5.1 m.
Calculation of XYZ coordinates:
XYZ coordinates can be calculated from the following equations:
3.3.1.3 Tail
The frame tail contains parameters used by LiDAR E2E Profile4, The detailed definition is as follows:
Table 8 Definition of tail in MSOP packet
content | offset | byte | instruction |
Res1 | 1184 | 4 | Reserved |
DataLength | 1188 | 2 | 04 B0 |
Counter | 1190 | 2 | 00 00~FF FF |
DataId | 1192 | 4 | 00 00 0E 5C |
Crc32 | 1196 | 4 |
3.3.2 LiDAR Information Output Protocol (DIFOP)
LiDAR Information Output Protocol is abbreviated as DIFOP
I/O type: LiDAR output, computer read.
Default port number: 7788.
DIFOP is an “output-only” protocol to periodically send the LiDAR serial number (S/N), firmware version information, host computer driver compatibility information, network configuration information, calibration information, operating status, and fault diagnosis information to users. By reading DIFOP, users can learn specific information of various parameters of the LiDAR currently in use.
The detailed definition is as follows:
Table 9 Definition of DIFOP packet
content | offset | byte | instruction |
DifopHeader | 0 | 8 | DIFOP recognition head |
Res0 | 8 | 8 | Reserved |
SW Version | 16 | 3 | LIDAR SW version information |
Res1 | 19 | 1 | Reserved |
SN | 20 | 6 | Serial number |
Res2 | 26 | 18 | Reserved |
LocalIP | 44 | 4 | LIDAR IP source address |
NetMask | 48 | 4 | Subnet mask |
MacAddress | 52 | 6 | LIDAR IP local Mac address |
MsopRemoteIp | 58 | 4 | Msop remote IP address |
MsopLocalPort | 62 | 2 | Msop local port number |
MsopRemotePort | 64 | 2 | Msop Remote port number |
DifopRemoteIp | 66 | 4 | Difop Remote IP address |
DifopLocalPort | 70 | 2 | Difop Local port number |
DifopRemotePort | 72 | 2 | Difop Remote port number |
Res3 | 74 | 25 | Reserved |
FrequencySetting | 99 | 1 | LIDAR frame rate setting |
ReturnMode | 100 | 1 | LIDAR echo information:
0x00: FarthestWave
0x04: StrongestWave (Default)
0x07: NearestWave
0x08: 2ndStrongestWave
0x09: StrongestFarthestWave
0x0A: NearestFarthestWave
0x0B: Strongest2ndStrongestWave |
TimesyncMode | 101 | 1 | Time Synchronization Mode:
0x0: Internal
0x2: E2E L2
0x3: GPTP |
TimesyncStatus | 102 | 1 | Time Sync Status:
0x00: failed
0x01: success
0x02: timeout |
TimeStatus | 103 | 10 | Timestamp:
0-5bytes: Second
6-9bytes: MicroSecond |
PHYMode | 113 | 1 | PHY Mode:
0x00: auto-negotiation
0x01: master
0x02: slave
other: same as 0x00 |
Res4 | 114 | 142 | Reserved |
Appendix A Driver & SDK
A.1 Compile and Install rs_ driver
RS Driver provides a cross-platform LiDAR driver kernel for RoboSense LiDAR products, which is convenient for users to re-develop and use. The driver kernel of v1.5.10 and later versions already support analysis and transformation of E1R point cloud. Users can download the rs_driver package from our official account on GitHub :
https://github.com/RoboSense-LiDAR/rs_driver
rs_driver currently supports the following systems and compilers:
- Windows:a. MSVC (VS2017 & VS2019 tested)b. Mingw-w64 (x86_64-8.1.0-posix-seh-rt_v6-rev0 tested)
- Ubuntu (16.04, 18.04, 20.04):gcc (4.8+)
A.1.1 Install Dependent Libraries
rs_driver depends on the following third-party libraries, which need to be installed before compilation:
- libpcap (not required, can be ignored if parse the PCAP file is not needed)
- eigen3 (not required, can be ignored if built-in coordinate transformation is not needed)
- PCL (not required, can be ignored if visualization tools are not needed)
- Boost (not required, can be ignored if built-in coordinate transformation is not needed)Install the above dependent libraries in Ubuntu:
$sudo apt-get install libboost-dev libpcap-dev libpcl-dev libeigen3-devInstall the above dependent libraries in Windows:
- BoostThe Boost library needs to be compiled from source code under Windows,please refer to the official guide:(https://www.boost.org/doc/libs/1_67_0/more/getting_started/windows.html)After compiling and installing, add the path of Boost to the system environment variable BOOST_ROOT, see Figure 13 below. If you use MSVC, you can also choose to directly download the pre-compiled installation package of the corresponding version.
- PcapFirst, install the Pcap runtime library:(https://www.winpcap.org/install/bin/WinPcap_4_1_3.exe).Download the developer package:(https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip) to any location,Then, add the path of WpdPack_4_1_2/WpdPack to the environment variable PATH, as shown in Figure 14 .
- PCL (not required, can be ignored if visualization tools are not needed)
Figure 13 Add environment variables
a. MSVCIf you are going to use the MSVC compiler, please install the official installation package provided by PCL.Select “Add PCL to the system PATH for xxx” during installation:
Figure 14 PCL Set up PCL
b. Mingw-w64
PCL does not provide the official mingw compilation library, users need to compile PCL from source code and install it according to the official tutorial.
A.1.2 Use of rs_Driver
A.1.2.1 rs_Driver Installation and Use
Take the Linux environment as an example for driver compilation (rs_driver currently does not support installation and use in windows system), execute the following codes to install the driver
$cd rs_driver
$mkdir build && cd build
$cmake .. && make -j4
$sudo make installA.1.2.2 Use as a Submodule
When rs_driver is used as a submodule, the following commands need to be added to the CMakeLists.txt file. (add rs_driver as a submodule to the project, use the find_package() instruction to find rs_driver, and then link the relevant library)
add_subdirectory(${PROJECT_SOURCE_DIR}/rs_driver)
find_package(rs_driver REQUIRED)
include_directories(${rs_driver_INCLUDE_DIRS})
target_link_libraries(project ${rs_driver_LIBRARIES})A.1.3 Demo Programs & Visualization Tools
A.1.3.1 Demo Programs
rs_driver provides two demo programs. Users can refer to the demo programs to write code, call interfaces and store them in rs_driver/demo:
- demo_online.cpp
- demo_pcap.cppTo compile the two demo programs, users can add the parameters when executing the CMake configuration.$cmake -DCOMPILE_DEMOS=ON …
A.1.3.2 Visualization Tools
rs_driver provides a point cloud visualization tool based on PCL, which is stored in rs_driver/tool:
- rs_driver_viewer.cppTo compile the two demo programs, users can add the parameters when executing the CMake configuration
$cmake -DCOMPILE_TOOLS=ON …A.1.4 Coordinate Transformation
rs_driver provides a built-in coordinate transformation feature, which can directly output the point cloud after coordinate transformation, which saves users the time consuming extra operations of coordinate transformation on the point cloud. If you want to enable this feature, add the parameters when executing CMake configuration:
$cmake -DENABLE_TRANSFORM=ON …A.2 Compile and Install rslidar_sdk
rslidar _sdk is the ROS-based driver SDK. You can download it from the RoboSense GitHub repository or contact RoboSense for access.
- rslidar_sdk depends on rs_driver, which is the basic RoboSense driver. Download rs_driver from the GitHub platform.
- If you are using ROS2, rslidar_sdk also depends on rslidar_msg, which defines the message format. Download the msg file from the GitHub platform.
- The SDK package contains comprehensive usage guidelines. Before using the driver SDK, please read the README file and documentation under the doc folder.
Note:
SDK Download Link: https://github.com/RoboSense-LiDAR/rslidar_sdk
rs_driver Download Link: https://github.com/RoboSense-LiDAR/rs_driver
msg Download Link: https://github.com/RoboSense-LiDAR/rslidar_msg
← Previous
RoboSense Airy LiDAR User GuideOn this page
- RoboSense E1R LiDAR User Guide
- 1. Product Description
- 1.1 Product Structure
- 1.2 Optical Envelope FOV Definition
- 1.3 Product Specifications
- 1.4 Product Principle
- 1.4.1 Accurate Time Synchronization Protocol
- 1.4.1.1 Principle of gPTP synchronization
- 1.4.1.2 gPTP wiring Method
- 1.4.2 Use Linuxptp tool to verify time synchronization
- 1.4.3 GPS Time Synchronization
- 2. Product Installation Recommendations
- 2.1 Interface Description
- 2.1.1 E1R Platform Connector
- 2.1.2 Connection Installation Requirements
- 2.1.3 Entire machine Wire Harness End Installation Requirements
- 2.2 The Connection of Interface Box
- 2.2.1 Vehicle Ethernet Harness Interface and Definition
- 2.2.2 Interface Box Interface
- 2.2.3 Power Interface
- 2.2.4 RJ45 network port
- 2.3 LiDAR State Machine
- 2.4 Installation and positioning methods recommendation
- 2.4.1 Installation tolerance requirements
- 2.4.2 Position of installation bracket
- 2.4.3 Installation bracket positioning and fastening requirements
- 2.5 Design and requirements for installation bracket
- 2.6 Cooling requirements for installation brackets
- 3. LiDAR Usage
- 3.1 Coordinate System
- 3.2 RSView
- 3.2.1 Software Features
- 3.2.2 Install RSView
- 3.2.3 Use RSView
- 3.3 Communication Protocol
- 3.3.1 Main Data Stream Output Protocol (MSOP)
- 3.3.1.1 Header
- 3.3.1.2 Data Packet
- 3.3.1.3 Tail
- 3.3.2 LiDAR Information Output Protocol (DIFOP)
- Appendix A Driver & SDK
- A.1 Compile and Install rs_ driver
- A.1.1 Install Dependent Libraries
- A.1.2 Use of rs_Driver
- A.1.2.1 rs_Driver Installation and Use
- A.1.2.2 Use as a Submodule
- A.1.3 Demo Programs & Visualization Tools
- A.1.3.1 Demo Programs
- A.1.3.2 Visualization Tools
- A.1.4 Coordinate Transformation
- A.2 Compile and Install rslidar_sdk