Skip to content

Commit 9451304

Browse files
Release 6.0.0: (#26)
- Split into msg and driver package (#20) - Removal of broken tests - Refactoring of class names regarding network communication - Stabilization of timestamp sync
1 parent d8ce149 commit 9451304

File tree

152 files changed

+2107
-5017
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+2107
-5017
lines changed

.gitignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,4 @@ doc/20210721_rest_api_test.pptx
5151
doc/20210726_rest_api_test.pptx
5252
doc/*_lidar_localization2.pptx
5353

54-
test/scripts/wireshark.cmd
55-
test/rest_server/python/scripts_LLS1-OdometryUDPSender.py
56-
test/rest_server/python/scripts_LLS2-OdometryUDPSender.py
57-
58-
test/data/wireshark/20210727_*.*
59-
test/data/wireshark/20210921-*.*
60-
test/data/wireshark/20210923-*.*
61-
6254

README.md

Lines changed: 51 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
1-
# sick_lidar_localization
1+
# sick_lidar_localization pkg
22

33
ROS driver, native C++ library and REST API for SICK LiDAR localization.
44

55
## Introduction
66

7-
This repository contains drivers and libraries for the API of LiDAR-LOC.
8-
* Command API (REST)
9-
* Streaming API (UDP)
7+
This repository contains a driver for the REST-API control for the LiDAR-LOC software (LLS) version 2.
8+
9+
The repository is structured in two packages. The `sick_lidar_localization_msgs` contains all relevant messages and services for the driver an can be used individually. The `sick_lidar_localization_driver` package depends on the `sick_lidar_localization_msgs` package and contains the driver supporting the following ROS versions in the same source:
1010

1111
The drivers support the following environments:
1212

1313
* native **without ROS** for Linux/Windows (REST and C++)
1414
* ROS1 for Linux
1515
* ROS2 for Linux/Windows
1616

17-
## Specification
18-
19-
The customer requirements and the REST API specification for the implementation of the project:
20-
[specification](doc/specifications/README.md)
21-
2217
## Installation
2318
### Build on native Linux (C++ and REST API)
2419

@@ -36,7 +31,7 @@ To build and install sick_lidar_localization on Linux without ROS, follow the st
3631
3732
3. Build project sick_lidar_localization with cmake:
3833
```
39-
cd sick_lidar_localization
34+
cd sick_lidar_localization/sick_lidar_localization_driver
4035
if [ -d ./build ] ; then rm -rf ./build ; fi
4136
mkdir -p ./build
4237
pushd ./build
@@ -62,11 +57,19 @@ To build and install sick_lidar_localization on Linux using ROS 1, follow the st
6257
popd
6358
```
6459
65-
3. Build project sick_lidar_localization:
60+
3. Build project sick_lidar_localization_msgs:
61+
```
62+
cp -f ./src/sick_lidar_localization/sick_lidar_localization_msgs/package_ros1.xml ./src/sick_lidar_localization/sick_lidar_localization_msgs/package.xml
63+
catkin_make --only-pkg-with-deps sick_lidar_localization_msgs install --cmake-args -DROS_VERSION=1
64+
source ./install/setup.bash
65+
```
66+
For ROS versions other than noetic, please replace source `/opt/ros/noetic/setup.bash` with your ros distribution.
67+
68+
4. Build project sick_lidar_localization_driver:
6669
```
6770
source /opt/ros/noetic/setup.bash
68-
cp -f ./src/sick_lidar_localization/package_ros1.xml ./src/sick_lidar_localization/package.xml
69-
catkin_make install --cmake-args -DROS_VERSION=1
71+
cp -f ./src/sick_lidar_localization/sick_lidar_localization_driver/package_ros1.xml ./src/sick_lidar_localization/sick_lidar_localization_driver/package.xml
72+
catkin_make --only-pkg-with-deps sick_lidar_localization_driver install --cmake-args -DROS_VERSION=1
7073
source ./install/setup.bash
7174
```
7275
For ROS versions other than noetic, please replace source `/opt/ros/noetic/setup.bash` with your ros distribution.
@@ -88,14 +91,23 @@ To build and install sick_lidar_localization on Linux using ROS 2, follow the st
8891
popd
8992
```
9093
91-
3. Build project sick_lidar_localization:
94+
3. Build project sick_lidar_localization_msgs:
9295
```
93-
source /opt/ros/eloquent/setup.bash
94-
cp -f ./src/sick_lidar_localization/package_ros2.xml ./src/sick_lidar_localization/package.xml
95-
colcon build --cmake-args " -DROS_VERSION=2" --event-handlers console_direct+
96+
source /opt/ros/jazzy/setup.bash
97+
cp -f ./src/sick_lidar_localization/sick_lidar_localization_msgs/package_ros2.xml ./src/sick_lidar_localization/sick_lidar_localization_msgs/package.xml
98+
colcon build --packages-select sick_lidar_localization_msgs --cmake-args " -DROS_VERSION=2" --event-handlers console_direct+
9699
source ./install/setup.bash
97100
```
98-
For ROS versions other than eloquent, please replace `source /opt/ros/eloquent/setup.bash` with your ros distribution.
101+
For ROS versions other than jazzy, please replace `source /opt/ros/jazzy/setup.bash` with your ros distribution.
102+
103+
4. Build project sick_lidar_localization_driver:
104+
```
105+
source /opt/ros/jazzy/setup.bash
106+
cp -f ./src/sick_lidar_localization/sick_lidar_localization_driver/package_ros2.xml ./src/sick_lidar_localization/sick_lidar_localization_driver/package.xml
107+
colcon build --packages-select sick_lidar_localization_driver --cmake-args " -DROS_VERSION=2" --event-handlers console_direct+
108+
source ./install/setup.bash
109+
```
110+
For ROS versions other than jazzy, please replace `source /opt/ros/jazzy/setup.bash` with your ros distribution.
99111
100112
### Build on native Windows (C++ and REST API)
101113
@@ -160,10 +172,16 @@ To build and install sick_lidar_localization on Windows with ROS-2, follow the s
160172
git clone https://github.com/SICKAG/sick_lidar_localization.git
161173
```
162174
163-
4. Build project sick_lidar_localization:
175+
3. Build project sick_lidar_localization_msgs:
176+
```
177+
copy /b/y ./src/sick_lidar_localization/sick_lidar_localization_msgs/package_ros2.xml ./src/sick_lidar_localization/sick_lidar_localization_msgs/package.xml
178+
colcon build --packages-select sick_lidar_localization_msgs --cmake-args " -DROS_VERSION=2" --event-handlers console_direct+
179+
call .\install\setup.bat
180+
```
181+
4. Build project sick_lidar_localization_driver:
164182
```
165-
copy /b/y .\src\sick_lidar_localization\package_ros2.xml .\src\sick_lidar_localization\package.xml
166-
colcon build --cmake-args " -DROS_VERSION=2" --event-handlers console_direct+
183+
copy /b/y ./src/sick_lidar_localization/sick_lidar_localization_driver/package_ros2.xml ./src/sick_lidar_localization/sick_lidar_localization_driver/package.xml
184+
colcon build --packages-select sick_lidar_localization_driver --cmake-args " -DROS_VERSION=2" --event-handlers console_direct+
167185
call .\install\setup.bat
168186
```
169187
@@ -176,31 +194,31 @@ The commands to start sick_lidar_localization depends on the target:
176194
For native Linux:
177195
```
178196
cd ./build
179-
./sick_lidar_localization ../launch/sick_lidar_localization.launch [options]
197+
./sick_lidar_localization_driver ../launch/sick_lidar_localization.launch [options]
180198
```
181199
182200
For Linux using ROS 1:
183201
```
184202
source ./install/setup.bash
185-
roslaunch sick_lidar_localization sick_lidar_localization.launch [options]
203+
roslaunch sick_lidar_localization_driver sick_lidar_localization.launch [options]
186204
```
187205
188206
For Linux using ROS 2:
189207
```
190208
source ./install/setup.bash
191-
ros2 run sick_lidar_localization sick_lidar_localization ./src/sick_lidar_localization/launch/sick_lidar_localization.launch --ros-args [options]
209+
ros2 run sick_lidar_localization_driver sick_lidar_localization_driver ./src/sick_lidar_localization/sick_lidar_localization_driver/launch/sick_lidar_localization.launch --ros-args [options]
192210
```
193211
194212
For native Windows:
195213
```
196214
cd .\build
197-
.\Debug\sick_lidar_localization ../launch/sick_lidar_localization.launch [options]
215+
.\Debug\sick_lidar_localization_driver ../launch/sick_lidar_localization.launch [options]
198216
```
199217
200218
For Windows using ROS 2:
201219
```
202220
call .\install\setup.bat
203-
ros2 run sick_lidar_localization sick_lidar_localization ./src/sick_lidar_localization/launch/sick_lidar_localization.launch [options]
221+
ros2 run sick_lidar_localization_driver sick_lidar_localization_driver ./src/sick_lidar_localization/sick_lidar_localization_driver/launch/sick_lidar_localization.launch [options]
204222
```
205223
206224
### Options and configuration
@@ -211,22 +229,21 @@ Common parameters are:
211229
212230
| **parameter name** | **default value** | **parameter type** | **example** | **description** |
213231
|--------------------|-------------------|--------------------|-------------|-----------------|
214-
| hostname | 192.168.0.1 | string | hostname:=192.168.0.1 | IP address of the SIM localization controller |
232+
| lls_device_ip | 192.168.0.1 | string | lls_device_ip:=192.168.0.1 | IP address of the SIM LLS device |
215233
| verbose | 0 | int | verbose:=1 | Print informational messages (verbose>0, otherwise error messages only) |
216-
| udp_ip_lls_output | "" | string | udp_ip_lls_output:=192.168.0.100 | IP address of your local machine (i.e. the receiver of UDP stream messages) |
217-
| udp_ip_lls_input | 192.168.0.1 | string | udp_ip_lls_input:=192.168.0.1 | IP address of host to send input UDP messages to, should be identical to hostname (except for unittests) |
234+
| ros_machine_ip | "" | string | ros_machine_ip:=192.168.0.100 | IP address of your local machine (i.e. the receiver of stream messages) |
218235
219236
## REST API services
220237
221238
LiDAR-LOC can be configured using a JSON REST API. This API is available using ROS services (on ROS 1 and ROS 2) or commandline tool `gen_service_call` (on all target systems). See [REST API services](doc/sick_localization_services.md) for details.
222239
223240
## <a name="cpp_api"></a> C++ API
224241
225-
On native Linux or Windows without ROS, tool `gen_service_call` can be used for the [REST API services](doc/sick_localization_services.md). UDP stream messages can be processed using the [C++ API](doc/cpp_api.md).
242+
On native Linux or Windows without ROS, tool `gen_service_call` can be used for the [REST API services](doc/sick_localization_services.md). Stream messages can be processed using the [C++ API](doc/cpp_api.md).
226243
227-
## UDP stream messages
244+
## UDP Stream messages
228245
229-
LiDAR-LOC receives messages from and sends messages to the localization controller using UDP. UDP output messages are UDP messages sent from the localization device to the local IPC. UDP input messages are UDP messages sent from the local IPC to the localization device. On ROS 1 and ROS 2, these UDP messages are converted from respective to ROS messages. On native Linux and Windows systems, these UDP messages can be processed using the [C++ API](doc/cpp_api.md).
246+
LiDAR-LOC receives and sends messages from resp. to the LLS device using UDP. UDP output messages are UDP messages sent from the LLS device to the local PC. UDP input messages are UDP messages sent from the local PC to the LLS device. On ROS-1 and ROS-2, these UDP-messages are converted from resp. to ROS messages. On native Linux and Windows systems, these UDP-messages can be processed using the [C++ API](doc/cpp_api.md).
230247
231248
UDP stream output messages are:
232249
* [Odometry messages type 1 version 4](msg/OdometryMessage0104.msg)
@@ -249,7 +266,7 @@ See [UDP stream messages](doc/lls_messages.md) for details and examples.
249266
250267
## Timestamps and time synchronization
251268
252-
The localization timestamps in UDP output messages are converted to system time using a Software-PLL. See [Time synchronization](doc/timing.md) and [Software-PLL](doc/software_pll.md) for details.
269+
The localization timestamps in output messages are converted to system time using a Software-PLL. See [Time synchronization](doc/timing.md) and [Software-PLL](doc/software_pll.md) for details.
253270
254271
## System setup and source Ids
255272
@@ -299,39 +316,6 @@ Other frame ids can be e.g. "robot", "vehicle" or "lidar". Choose parameter tf_p
299316
300317
See https://roboticsknowledgebase.com/wiki/state-estimation/ros-navigation/ for further examples.
301318
302-
### Unittests
303-
304-
Folder `sick_lidar_localization/test/scripts` provide scripts for development and unittests on ROS-1, ROS-2 and native Linux or Windows. Run the following scripts for a short unittest in case of problems or use them as examples to run lidar localization:
305-
306-
ROS-1 Linux:
307-
```
308-
cd ./src/sick_lidar_localization/test/scripts
309-
./makeall_ros1.bash
310-
./run_linux_ros1_simu.bash
311-
```
312-
313-
ROS-2 Linux:
314-
```
315-
cd ./src/sick_lidar_localization/test/scripts
316-
./makeall_ros2.bash
317-
./run_linux_ros2_simu.bash
318-
```
319-
320-
Native Linux:
321-
```
322-
cd ./src/sick_lidar_localization/test/scripts
323-
./makeall_linux.bash
324-
./run_linux_simu.bash
325-
```
326-
327-
Native Windows:
328-
```
329-
cd .\src\sick_lidar_localization\test\scripts
330-
.\make_win64.cmd
331-
Open sick_lidar_localization.sln in build folder and rebuild (debug version)
332-
.\run_win64_simu.cmd
333-
```
334-
335319
## FAQ, troubleshooting
336320
337321
### Setup
@@ -356,7 +340,7 @@ Find detailed information in the operation manuals published on https://supportp
356340
357341
:question: How can I record and save localization data for offline tests and diagnosis?
358342
359-
:white_check_mark: Use wireshark to save udp-data from the localization server as described in [udp data recording](doc/sick_localization_recording.md)
343+
:white_check_mark: Use wireshark to save udp-data from the localization device as described in [udp data recording](doc/sick_localization_recording.md)
360344
361345
### Error messages
362346

doc/Setup-LiDAR-LOC-SOPASair.png

-113 KB
Binary file not shown.

0 commit comments

Comments
 (0)