Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Commit 7e48656

Browse files
committed
Support field monitoring for LMS1xx and LMS5xx
1 parent 65391a4 commit 7e48656

37 files changed

+164065
-144
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ The use of the parameters can be looked up in the launch files. This is also rec
213213

214214
- Angle compensation: For highest angle accuracy the NAV-Lidar series supports an [angle compensation mechanism](./doc/angular_compensation.md).
215215

216-
- The **TiM7xx** and **TiM7xxS** families have [extended settings for field monitoring](./doc/tim7xxs_extensions.md).
216+
- **Field monitoring**: The **LMS1xx**, **LMS5xx**, **TiM7xx** and **TiM7xxS** families have [extended settings for field monitoring](./doc/field_monitoring_extensions.md).
217217

218218
## Sopas Mode
219219
This driver supports both COLA-B (binary) and COLA-A (ASCII) communication with the laser scanner. Binary mode is activated by default. Since this mode generates less network traffic.

doc/tim7xxs_extensions.md renamed to doc/field_monitoring_extensions.md

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# Extensions for TiM7xxS
1+
# Field monitoring for LMS1xx, LMS5xx, TiM7xx and TiM7xxS
22

3-
The TiM7xx and TiM7xxS families have the following extended settings for field monitoring:
3+
The LMS1xx, LMS5xx, TiM7xx and TiM7xxS families have the following extended settings for field monitoring:
44

55
## Field monitoring messages
66

7-
TiM7xx and TiM7xxS scanner support field monitoring. Fields can be configured by Sopas ET. Once they are configured, sick_scan publishes ros messages containing the monitoring information from the lidar.
7+
LMS1xx, LMS5xx, TiM7xx and TiM7xxS scanner support field monitoring. Fields can be configured by Sopas ET. Once they are configured, sick_scan publishes ros messages containing the monitoring information from the lidar.
88

9-
By default, field monitoring is enabled in the launch file [sick_tim_7xx.launch](../launch/sick_tim_7xx.launch) resp. [sick_tim_7xxS.launch](../launch/sick_tim_7xxS.launch) by following settings:
9+
By default, field monitoring is enabled in the launch files [sick_lms_1xx.launch](../launch/sick_lms_1xx.launch), [sick_lms_5xx.launch](../launch/sick_lms_5xx.launch),
10+
[sick_tim_7xx.launch](../launch/sick_tim_7xx.launch) resp. [sick_tim_7xxS.launch](../launch/sick_tim_7xxS.launch) by following settings:
1011
```
1112
<param name="activate_lferec" type="bool" value="True"/> <!-- activate field monitoring by lferec messages -->
1213
<param name="activate_lidoutputstate" type="bool" value="True"/> <!-- activate field monitoring by lidoutputstate messages -->
@@ -26,9 +27,23 @@ rosservice call /sick_tim_7xx/ColaMsg "{request: 'sEN LIDinputstate 0'}" # deac
2627
rosservice call /sick_tim_7xx/ColaMsg "{request: 'sRN LIDinputstate'}" # query activation status of LIDinputstate messages
2728
```
2829

29-
LFErec and LIDoutputstate messages are defined in [LFErecMsg.msg](../msg/LFErecMsg.msg) and [LFErecFieldMsg.msg](../msg/LFErecFieldMsg.msg) resp. [LIDoutputstateMsg.msg](../msg/LIDoutputstateMsg.msg) and published on topics `"/sick_tim_7xxS/lferec"` resp. `"/sick_tim_7xxS/lidoutputstate"`.
30+
LFErec and LIDoutputstate messages are defined in [LFErecMsg.msg](../msg/LFErecMsg.msg) and [LFErecFieldMsg.msg](../msg/LFErecFieldMsg.msg) resp. [LIDoutputstateMsg.msg](../msg/LIDoutputstateMsg.msg) and published on the following topics: `"/sick_tim_7xxS/lferec"` resp. `"/sick_tim_7xxS/lidoutputstate"`.
31+
32+
| ** Scanner ** | ** lferec topic ** | ** lidoutputstate topic ** |
33+
|---------------|--------------------|-----------------------------|
34+
| lms_1xx | /sick_lms_1xx/lferec | /sick_lms_1xx/lidoutputstate |
35+
| lms_5xx | /sick_lms_5xx/lferec | /sick_lms_5xx/lidoutputstate |
36+
| lms_7xx | /sick_tim_7xx/lferec | /sick_tim_7xx/lidoutputstate |
37+
| lms_7xxS | /sick_tim_7xxS/lferec | /sick_tim_7xxS/lidoutputstate |
38+
3039
To view the field monitoring messages, run
3140
```
41+
rostopic echo "/sick_lms_1xx/lferec"
42+
rostopic echo "/sick_lms_1xx/lidoutputstate"
43+
rostopic echo "/sick_lms_5xx/lferec"
44+
rostopic echo "/sick_lms_5xx/lidoutputstate"
45+
rostopic echo "/sick_tim_7xx/lferec"
46+
rostopic echo "/sick_tim_7xx/lidoutputstate"
3247
rostopic echo "/sick_tim_7xxS/lferec"
3348
rostopic echo "/sick_tim_7xxS/lidoutputstate"
3449
```
@@ -54,14 +69,18 @@ and run
5469
rosrun rviz rviz -d ./src/sick_scan/test/emulator/config/rviz_emulator_cfg.rviz
5570
```
5671

57-
Otherwise you can just add visualizations of type `/cloud/PointCloud2` and `/sick_tim_7xxS/marker`:
72+
Otherwise you can just add visualizations of type `/cloud/PointCloud2` and `/sick_tim_7xxS/marker` (resp. `/sick_tim_1xx/marker` for lms_1xx, `/sick_tim_5xx/marker` for lms_5xx and `/sick_tim_7xx/marker` for tim_7xx):
5873

5974
![tim7xxs_screenshot01.png](tim7xxs_screenshot01.png)
6075

61-
The following screenshot shows an example with 2 fields (the 3. field is not configured), the first field with status "Clear", the second with status "Infringed":
76+
The following screenshot shows a TiM781S example with 2 fields (the 3. field is not configured), the first field with status "Clear", the second with status "Infringed":
6277

6378
![tim7xxs_screenshot02.png](tim7xxs_screenshot02.png)
6479

80+
The following screenshot shows a LMS511 example with a segmented field, two rectangular fields and a dynamic fields:
81+
82+
![lms511_screenshot01.png](lms511_screenshot01.png)
83+
6584
Note: Some combinations of rviz, OpenGL 3, VMware and graphic card drivers may cause visualization issues. In case of missing markers, try rviz with Open GL 2 using the command
6685
```
6786
rosrun rviz rviz -d ./src/sick_scan/test/emulator/config/rviz_emulator_cfg.rviz --opengl 210
@@ -73,7 +92,7 @@ Cola commands can be sent for diagnosis and development using the ros service Co
7392
```
7493
<param name="start_services" type="bool" value="True"/>
7594
```
76-
in the launch file [sick_tim_7xxS.launch](../launch/sick_tim_7xxS.launch). The ros service sends the given cola command to the lidar and returns its response.
95+
in the launch file [sick_tim_7xxS.launch](../launch/sick_tim_7xxS.launch) (resp. [sick_lms_1xx.launch](../launch/sick_lms_1xx.launch), [sick_lms_5xx.launch](../launch/sick_lms_5xx.launch), [sick_tim_7xx.launch](../launch/sick_tim_7xx.launch) ). The ros service sends the given cola command to the lidar and returns its response.
7796

7897
Example for cola command `"sRN SCdevicestate"` and response `"sRA SCdevicestate \\x00"` with error status 0 (no error):
7998
```
@@ -89,11 +108,11 @@ Package sick_scan implements some tools to support unittests, development and em
89108

90109
- pcap_json_converter to convert pcapng-files to json.
91110

92-
### TiM781S emulation
111+
### LMS and TiM emulation
93112

94113
sick_scan_emulator implements a simple test server for cola commands. It rececives Cola-commands, returns Tim781S-like responses and sends Scandata from a json-file. Run
95114
```
96-
roslaunch sick_scan emulator.launch
115+
roslaunch sick_scan emulator_01_default.launch
97116
```
98117
to emulate a local Tim781S device. Then start and connect the sick_scan driver by
99118
```
@@ -102,20 +121,36 @@ roslaunch sick_scan sick_tim_7xxS.launch hostname:=127.0.0.1
102121

103122
Note that sick_scan_emulator just implements a simple server for offline tests. It does not emulate a lidar device completely and should only be used for development and testing.
104123

105-
Scandata messages are parsed from json-file(s). These json-files are configured in the launch file [emulator.launch](../test/emulator/launch/emulator.launch) and converted form wireshark-records (pcapng-files) using pcap_json_converter.py (see section Pcapng converter tool](#pcapng-converter-tool)).
124+
Scandata messages are parsed from json-file(s). These json-files are configured in the launch file [emulator.launch](../test/emulator/launch/emulator_01_default.launch) and converted form wireshark-records (pcapng-files) using pcap_json_converter.py (see section Pcapng converter tool](#pcapng-converter-tool)).
125+
126+
A LMS111 device can be emulated by running
127+
```
128+
roslaunch sick_scan emulator_lms1xx.launch &
129+
rosrun rviz rviz -d ./src/sick_scan/test/emulator/config/rviz_lms1xx.rviz &
130+
roslaunch sick_scan sick_lms_1xx.launch hostname:=127.0.0.1
131+
```
132+
133+
A LMS511 device can be emulated by running
134+
```
135+
roslaunch sick_scan emulator_lms5xx.launch &
136+
rosrun rviz rviz -d ./src/sick_scan/test/emulator/config/rviz_lms5xx.rviz &
137+
roslaunch sick_scan sick_lms_5xx.launch hostname:=127.0.0.1
138+
```
106139

107140
### Unittests
108141

109-
Folder `test/emulator/scandata` contains scandata examples for unittests. To run an offline unittest for TiM781S enter the following commands:
142+
Folder `test/emulator/scandata` contains scandata examples for unittests. To run an offline unittest for LMS111, LMS511, TiM781, TiM781S enter the following commands:
110143
```
111144
cd test/scripts
112-
./run_simu_tim781s.bash
145+
./run_simu_lms1xx.bash
146+
./run_simu_lms5xx.bash
147+
./run_simu_tim7xx_tim7xxS.bash
113148
```
114149
or start emulator, driver and rviz by running
115150
```
116151
source ./install/setup.bash
117152
# Start sick_scan emulator
118-
roslaunch sick_scan emulator.launch &
153+
roslaunch sick_scan emulator_01_default.launch &
119154
sleep 1
120155
# Start rviz
121156
rosrun rviz rviz -d ./src/sick_scan/test/emulator/config/rviz_emulator_cfg.rviz --opengl 210 &
@@ -133,4 +168,4 @@ The pcapng converter tool [pcap_json_converter.py](../test/pcap_json_converter/p
133168
3. Capture the network traffic for some time.
134169
4. Stop capturing and save the network traffic in a pcapng-file.
135170
5. Convert the pcapng-file to json by `python pcap_json_converter.py --pcap_filename=<filepath>.pcapng`. Result is a jsonfile `<filepath>.pcapng.json`
136-
6. Set the resulting json-file in the emulator configuration [emulator.launch](../test/emulator/launch/emulator.launch) by `<arg name="scandatafiles" default="<filepath>.pcapng.json"/>`
171+
6. Set the resulting json-file in the emulator configuration [emulator.launch](../test/emulator/launch/emulator_01_default.launch) by `<arg name="scandatafiles" default="<filepath>.pcapng.json"/>`

doc/lms511_screenshot01.png

820 KB
Loading

0 commit comments

Comments
 (0)