Skip to content

Commit

Permalink
Release v3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1309 authored and aiplemaSICKAG committed Feb 12, 2024
1 parent e5f7206 commit abd4560
Show file tree
Hide file tree
Showing 124 changed files with 31,051 additions and 727 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,5 @@ test/scripts/run_win64_picoscan_emulator.cmd
test/emulator/scandata/20230719_mrs1104_infringement/

doc/20230919_sick_scan_xd_timeout_settings.pptx

test/docker/archive/
19 changes: 16 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,23 @@ features that will be removed in future versions **Removed** for deprecated feat
**Fixed** for all bug fixes. **Security** to prompt users to update in case of closed vulnerabilities.


## Unreleased ##

## Released ##

### Release v3.2.0

- **add** IMU support for multiScan and picoScan
- **add** support bloom releases for ROS-2 humble
- **add** docker tests for ROS1 noetic incl. testcases for multiScan, picoScan, MRS1xxx
- **add** PR #255, support picoScan performance profiles
- **changed** configuration time flag LMDscandatacfg switched off for the TiM240
- **fix** #218 (API reinit)
- **fix** #220 (Fullframe Laserscan messages multi- and picoScan)
- **fix** #221 (No scandata while activated scan range filter)
- **fix** #222 (rviz visualization of polar pointclouds)
- **fix** #247 (Launchfile option for laserscan topic)
- **fix** #256 (Clean API-exit picoScan and multiScan)
- **fix** #260 (Provide API-functions to query lidar status, error codes and error messages)

### Release v3.1.0

- **add** IMU support for multiScan
Expand All @@ -28,7 +41,7 @@ For consistency, the ROS module name has been changed to "sick_scan_xd" to match
- **add** Service for requesting contamination detection information
- **changed** Improvements from customer tickets and documentation enhancements
- **fix** ROS module name consistency
### Release v2.10.3
- **fix** avoid problems with min/max definition in the STL and preprocessor definitions

Expand Down
442 changes: 442 additions & 0 deletions CHANGELOG.rst

Large diffs are not rendered by default.

127 changes: 77 additions & 50 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.5)
project(sick_scan_xd)

# Emulator build options
option(ENABLE_EMULATOR "Build emulator for offline and unittests (ON) or without emulator (OFF)" ON)
option(ENABLE_EMULATOR "Build emulator for offline and unittests (ON) or without emulator (OFF)" OFF)
if(CMAKE_ENABLE_EMULATOR EQUAL 1)
set(ENABLE_EMULATOR ON CACHE BOOL "Build emulator for offline and unittests (ON) or without emulator (OFF)" FORCE) # OFF (release) or ON (development)
message(STATUS "Option CMAKE_ENABLE_EMULATOR = ${CMAKE_ENABLE_EMULATOR}, building ${PROJECT_NAME} with emulator support, ENABLE_EMULATOR=${ENABLE_EMULATOR}")
Expand Down Expand Up @@ -95,9 +95,14 @@ elseif(DEFINED SICK_TARGET_ENDIANESS)
endif()

# ROS Version
message(STATUS "ROS_VERSION precheck: ENV{ROS_VERSION}=$ENV{ROS_VERSION} ROS_VERSION=${ROS_VERSION} CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}")
if(DEFINED CMAKE_PREFIX_PATH AND "${CMAKE_PREFIX_PATH}" STREQUAL "/opt/ros/humble")
set(ROS_VERSION 2)
endif()
if(NOT DEFINED ROS_VERSION AND DEFINED ENV{ROS_VERSION})
set(ROS_VERSION $ENV{ROS_VERSION})
endif()
message(STATUS "ROS_VERSION=${ROS_VERSION}")
add_compile_options(-D__ROS_VERSION=${ROS_VERSION})
if(ROS_VERSION EQUAL 0)
add_compile_options(-DROSSIMU)
Expand All @@ -111,9 +116,6 @@ endif()
if(WIN32)
add_compile_options(-D_WINSOCK_DEPRECATED_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0A00)
link_libraries(ws2_32)
else()
link_libraries(pthread) # std::thread requires pthread on linux
link_libraries(dl) # dynamic loading of libraries
endif()

if(RASPBERRY EQUAL 1)
Expand Down Expand Up @@ -353,16 +355,21 @@ if(RASPBERRY EQUAL 1)
message(STATUS "Building ${PROJECT_NAME} for raspberry without ldmrs support")
elseif(${BUILD_WITH_LDMRS_SUPPORT} OR BUILD_WITH_LDMRS_SUPPORT EQUAL ON)
message(STATUS "Building ${PROJECT_NAME} with LDMRS support")
add_compile_options(-DLDMRS_SUPPORT=1)
find_package(SickLDMRS REQUIRED)
set(LDMRS_INCLUDES ${SICK_LDMRS_INCLUDE_DIRS})
set(LDMRS_SOURCES driver/src/ldmrs/sick_ldmrs_config.cpp driver/src/ldmrs/sick_ldmrs_driver.cpp driver/src/ldmrs/sick_ldmrs_node.cpp)
set(LDMRS_TARGET_DEPENDENCIES SickLDMRS)
message(STATUS "LDMRS_INCLUDES: ${LDMRS_INCLUDES}")
message(STATUS "LDMRS_SOURCES: ${LDMRS_SOURCES}")
message(STATUS "LDMRS_TARGET_DEPENDENCIES: ${LDMRS_TARGET_DEPENDENCIES}")
message(STATUS "SICK_LDMRS_LIBRARIES: ${SICK_LDMRS_LIBRARIES}")
check_header_exists(${LDMRS_INCLUDES}/sick_ldmrs/manager.hpp sick_ldmrs/manager.hpp sick_ldmrs)
find_package(SickLDMRS QUIET)
if (${SickLDMRS_FOUND})
add_compile_options(-DLDMRS_SUPPORT=1)
set(LDMRS_INCLUDES ${SICK_LDMRS_INCLUDE_DIRS})
set(LDMRS_SOURCES driver/src/ldmrs/sick_ldmrs_config.cpp driver/src/ldmrs/sick_ldmrs_driver.cpp driver/src/ldmrs/sick_ldmrs_node.cpp)
set(LDMRS_TARGET_DEPENDENCIES SickLDMRS)
message(STATUS "LDMRS_INCLUDES: ${LDMRS_INCLUDES}")
message(STATUS "LDMRS_SOURCES: ${LDMRS_SOURCES}")
message(STATUS "LDMRS_TARGET_DEPENDENCIES: ${LDMRS_TARGET_DEPENDENCIES}")
message(STATUS "SICK_LDMRS_LIBRARIES: ${SICK_LDMRS_LIBRARIES}")
check_header_exists(${LDMRS_INCLUDES}/sick_ldmrs/manager.hpp sick_ldmrs/manager.hpp sick_ldmrs)
else()
message(STATUS "package SickLDMR not found, ldmrs support disabled")
add_compile_options(-DLDMRS_SUPPORT=0)
endif()
else()
message(STATUS "Building ${PROJECT_NAME} without ldmrs support")
endif()
Expand Down Expand Up @@ -550,12 +557,12 @@ if(ROS_VERSION EQUAL 1)
${catkin_EXPORTED_TARGETS}
${${PROJECT_NAME}_EXPORTED_TARGETS})

target_link_libraries(${PROJECT_NAME}_lib ${MSGPACK11_LIBRARIES} ${catkin_LIBRARIES})
target_link_libraries(${PROJECT_NAME}_shared_lib ${MSGPACK11_LIBRARIES} ${catkin_LIBRARIES})
target_link_libraries(${PROJECT_NAME}_lib ${catkin_LIBRARIES})
target_link_libraries(${PROJECT_NAME}_shared_lib ${catkin_LIBRARIES})

add_executable(sick_generic_caller driver/src/sick_generic_caller.cpp)

target_link_libraries(sick_generic_caller ${PROJECT_NAME}_lib ${SICK_LDMRS_LIBRARIES} ${MSGPACK11_LIBRARIES})
target_link_libraries(sick_generic_caller ${PROJECT_NAME}_lib ${SICK_LDMRS_LIBRARIES})

#
# radar_object_marker (receives radar msg. and publishes marker array for rviz or similar
Expand Down Expand Up @@ -646,10 +653,10 @@ else() # i.e. (ROS_VERSION EQUAL 0 OR ROS_VERSION EQUAL 2)
if(ROS_VERSION EQUAL 0)
# target_compile_options(${PROJECT_NAME}_shared_lib PUBLIC "-fPIC")
# target_link_options(${PROJECT_NAME}_shared_lib PUBLIC "-fPIC")
target_link_libraries(${PROJECT_NAME}_shared_lib ${SICK_LDMRS_LIBRARIES} ${MSGPACK11_LIBRARIES})
target_link_libraries(${PROJECT_NAME}_shared_lib ${SICK_LDMRS_LIBRARIES})
endif()
add_executable(sick_generic_caller driver/src/sick_generic_caller.cpp)
target_link_libraries(sick_generic_caller ${PROJECT_NAME}_lib ${SICK_LDMRS_LIBRARIES} ${MSGPACK11_LIBRARIES})
target_link_libraries(sick_generic_caller ${PROJECT_NAME}_lib ${SICK_LDMRS_LIBRARIES})

endif()

Expand Down Expand Up @@ -718,22 +725,39 @@ if(ROS_VERSION EQUAL 2)
endif()

# Build test and usage example for sick_scan_xd_api
add_executable(sick_scan_xd_api_test
driver/src/sick_scan_xd_api/sick_scan_api_converter.cpp
test/src/sick_scan_xd_api/sick_scan_xd_api_test.cpp
test/src/sick_scan_xd_api/sick_scan_xd_api_wrapper.c
test/src/sick_scan_xd_api/toojpeg/toojpeg.cpp
)
target_include_directories(sick_scan_xd_api_test PUBLIC test/src/sick_scan_xd_api/toojpeg)
if(ROS_VERSION EQUAL 1)
target_link_libraries(sick_scan_xd_api_test ${catkin_LIBRARIES})
add_dependencies(sick_scan_xd_api_test
${PROJECT_NAME}_gencfg
${catkin_EXPORTED_TARGETS}
${${PROJECT_NAME}_EXPORTED_TARGETS})
# For ROS-1 and ROS-2:
# - sick_scan_xd_api_test with is deactivated by default
# to avoid phtread dependencies for bloom releases
# - sick_scan_xd_api_test for development and test only
# Native Windows and Linux (ROS_VERSION==0):
# - build sick_scan_xd_api_test (development, test and usage example)
if(ROS_VERSION EQUAL 0) # build API test on native Windows or Linux
set(BUILD_SICK_SCAN_XD_API_TEST 1)
elseif(${ENABLE_EMULATOR} OR ENABLE_EMULATOR EQUAL ON) # i.e. development
set(BUILD_SICK_SCAN_XD_API_TEST 1)
else()
set(BUILD_SICK_SCAN_XD_API_TEST 0)
endif()
if(ROS_VERSION EQUAL 0 AND NOT WIN32)
target_link_options(sick_scan_xd_api_test PUBLIC "LINKER:--no-as-needed") # fixes exception "Enable multithreading to use std::thread: Operation not permitted"
if(BUILD_SICK_SCAN_XD_API_TEST EQUAL 1)
add_executable(sick_scan_xd_api_test
driver/src/sick_scan_xd_api/sick_scan_api_converter.cpp
test/src/sick_scan_xd_api/sick_scan_xd_api_test.cpp
test/src/sick_scan_xd_api/sick_scan_xd_api_wrapper.c
test/src/sick_scan_xd_api/toojpeg/toojpeg.cpp
)
target_include_directories(sick_scan_xd_api_test PUBLIC test/src/sick_scan_xd_api/toojpeg)
if(NOT WIN32)
target_link_libraries(sick_scan_xd_api_test "dl") # link with dl for dynamic library loading
if(ROS_VERSION EQUAL 0)
target_link_libraries(sick_scan_xd_api_test "pthread") # pthread required for std::thread
target_link_options(sick_scan_xd_api_test PUBLIC "LINKER:--no-as-needed") # fixes exception "Enable multithreading to use std::thread: Operation not permitted"
elseif(ROS_VERSION EQUAL 1)
target_link_libraries(sick_scan_xd_api_test ${catkin_LIBRARIES})
add_dependencies(sick_scan_xd_api_test ${PROJECT_NAME}_gencfg ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
elseif(ROS_VERSION EQUAL 2)
target_link_libraries(sick_scan_xd_api_test "pthread") # pthread required for std::thread
endif()
endif()
endif()

# install sick_scan_xd_shared_lib incl. API headerfiles
Expand Down Expand Up @@ -762,10 +786,10 @@ if(ROS_VERSION EQUAL 1)
install(TARGETS sick_generic_caller
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

install(TARGETS sick_scan_xd_api_test
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

# install(TARGETS ${PROJECT_NAME}_test RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
if(BUILD_SICK_SCAN_XD_API_TEST EQUAL 1)
install(TARGETS sick_scan_xd_api_test
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
endif()

install(FILES include/sick_scan/abstract_parser.h
include/sick_scan/sick_scan_common.h
Expand All @@ -787,14 +811,13 @@ if(ROS_VERSION EQUAL 1)
endif()

if(ROS_VERSION EQUAL 2)
install(TARGETS sick_generic_caller sick_scan_xd_api_test
DESTINATION lib/${PROJECT_NAME})

install(TARGETS ${PROJECT_NAME}_lib ${PROJECT_NAME}_shared_lib
DESTINATION lib)

install(DIRECTORY launch
DESTINATION share/${PROJECT_NAME})
if(BUILD_SICK_SCAN_XD_API_TEST EQUAL 1)
install(TARGETS sick_scan_xd_api_test DESTINATION lib/${PROJECT_NAME})
endif()
install(TARGETS sick_generic_caller DESTINATION lib/${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME}_lib ${PROJECT_NAME}_shared_lib DESTINATION lib)
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})

ament_package()
endif()
Expand Down Expand Up @@ -827,11 +850,13 @@ if((${ENABLE_EMULATOR} OR ENABLE_EMULATOR EQUAL ON) AND (NOT WIN32 OR ROS_VERSIO
target_link_libraries(sick_scan_emulator
${catkin_LIBRARIES}
${roslib_LIBRARIES}
${PROJECT_NAME}_lib
${MSGPACK11_LIBRARIES}
${PROJECT_NAME}_lib
${SICK_LDMRS_LIBRARIES}
${LIB_JSONCPP})
target_include_directories(sick_scan_emulator PUBLIC test test/emulator/include)

if(NOT WIN32 AND NOT ROS_VERSION EQUAL 1)
target_link_libraries(sick_scan_emulator "pthread") # pthread required for std::thread
endif()
if(ROS_VERSION EQUAL 1)
install(TARGETS sick_scan_emulator
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
Expand Down Expand Up @@ -863,8 +888,11 @@ if(${ENABLE_EMULATOR} OR ENABLE_EMULATOR EQUAL ON)
tools/test_server/src/test_server_cola_msg.cpp
tools/test_server/src/test_server_ldmrs_msg.cpp
tools/test_server/src/test_server_thread.cpp)
target_link_libraries(test_server ${PROJECT_NAME}_lib ${SICK_LDMRS_LIBRARIES} ${MSGPACK11_LIBRARIES} ${LIB_JSONCPP})
target_link_libraries(test_server ${PROJECT_NAME}_lib ${SICK_LDMRS_LIBRARIES} ${LIB_JSONCPP})
target_include_directories(test_server PUBLIC test test/emulator/include)
if(NOT WIN32 AND NOT ROS_VERSION EQUAL 1)
target_link_libraries(test_server "pthread") # pthread required for std::thread
endif()
if(ROS_VERSION EQUAL 2)
ament_target_dependencies(test_server "rclcpp" )
endif()
Expand All @@ -876,4 +904,3 @@ if(${ENABLE_EMULATOR} OR ENABLE_EMULATOR EQUAL ON)
tools/test_server/launch
DESTINATION share/${PROJECT_NAME})
endif()

21 changes: 10 additions & 11 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ Summary:
4. PC: Calculate back to system time of generation:
System time of generation = System time of receiving - (TICK_TRANSMIT - TICK_GEN)/TICK_FREQUENCY

## Laserscan messages with multiple frame ids

:question: sick_scan_xd publishes laserscan messages for multiScan and picoScan with multiple frame ids and possibly inconsistent data. Which frame id is correct?

:white_check_mark: By default, an echo filter is activated in the multiScan and picoScan launchfile. This echo filter suppresses multiple echos, e.g. echos from an object and a protective glass pane. The default configuration is "last echo only". In this case (i.e. one echo only), the fullframe laserscan messages on topic scan_fullframe all have identical frame ids for each layer, i.e. "world_\<layer\>". For the multiScan lidars with 16 layers, sick_scan_xd publishes laserscan messages with frame ids "world_1", "world_2" up to "world_16". For picoScan lidars with 1 layer, there is just one frame id "world_1".

In case of multiple echos (i.e. echo filter is deactivated), each echo is published by a laserscan message with different frame ids "world_\<layer\>_\<echo_idx\>". For picoScan lidars with 3 echos, there are 3 frame ids "world_1_0", "world_1_1", "world_1_2" published. For multiScan lidars with 16 layers and 3 echos, there are 48 different frame ids published "world_1_0", "world_1_1", "world_1_2", "world_2_0", "world_2_1", "world_2_2", ... , "world_16_0", "world_16_1", "world_16_2".

This behaviour is intended, since a laserscan message can not contain multiple ranges for a single scan point at one azimuth angle. Therefore, there have to be different laserscan messages for each layer and each echo. Layer and echo of a laserscan message are identified by the frame id.

## Compilation errors

:question: Compiler reports errors in file `/opt/ros/<distro>/include/sick_scan`
Expand Down Expand Up @@ -152,17 +162,6 @@ src/
After doing this please rerun the command
catkin_make_isolated --install --cmake-args -DROS_VERSION=1 -DLDMRS=0

:question: cmake cannot find header msgpack11.hpp

:white_check_mark: You probably forgot to checkout https://github.com/SICKAG/msgpack11.git. Please clone the following repositories:
```
git clone https://github.com/SICKAG/libsick_ldmrs.git
git clone https://github.com/SICKAG/msgpack11.git
git clone https://github.com/SICKAG/sick_scan_xd.git
```
and rebuild. See the build instructions [Build on Linux generic without ROS](INSTALL-GENERIC.md#build-on-linux-generic-without-ros), [Build on Linux ROS1](INSTALL-ROS1.md#build-on-linux-ros1), [Build on Linux ROS2](INSTALL-ROS2.md#build-on-linux-ros2), [Build on Windows](INSTALL-GENERIC.md#build-on-windows) or [Build on Windows ROS2](INSTALL-ROS2.md#build-on-windows-ros2) for further details.


## rviz shows a grey point cloud

:question: rviz shows a grey point cloud. The size of points can be adjusted.
Expand Down
34 changes: 5 additions & 29 deletions INSTALL-GENERIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Run the following steps to build sick_scan_xd on Linux (no ROS required):
2. Clone repositories https://github.com/SICKAG/libsick_ldmrs and https://github.com/SICKAG/sick_scan_xd:
```
git clone https://github.com/SICKAG/libsick_ldmrs.git
git clone https://github.com/SICKAG/msgpack11.git
git clone https://github.com/SICKAG/sick_scan_xd.git
```

Expand All @@ -26,17 +25,7 @@ Run the following steps to build sick_scan_xd on Linux (no ROS required):
popd
```

4. Build msgpack11 library (required only once for multiScan100/picoScan100):
```
mkdir -p ./build
pushd ./build
cmake -G "Unix Makefiles" -DMSGPACK11_BUILD_TESTS=0 -DCMAKE_POSITION_INDEPENDENT_CODE=ON ../msgpack11
make -j4
sudo make install
popd
```

5. Build sick_generic_caller and libsick_scan_xd_shared_lib.so:
4. Build sick_generic_caller and libsick_scan_xd_shared_lib.so:
```
mkdir -p ./build
pushd ./build
Expand All @@ -58,7 +47,7 @@ Note: libsick_ldmrs is only required to support LDMRS sensors. If you do not nee
cmake -DROS_VERSION=0 -DLDMRS=0 -G "Unix Makefiles" ../sick_scan_xd
```

Note: msgpack11 is only required to support multiScan100/picoScan100. If you do not need or want to support multiScan100/picoScan100, you can skip building msgpack. To build sick_generic_caller without multiScan100/picoScan100 support, switch off option `BUILD_WITH_SCANSEGMENT_XD_SUPPORT` in [CMakeLists.txt](./CMakeLists.txt) or call cmake with option `-DSCANSEGMENT_XD=0`:
Note: To build sick_generic_caller without multiScan100/picoScan100 support, switch off option `BUILD_WITH_SCANSEGMENT_XD_SUPPORT` in [CMakeLists.txt](./CMakeLists.txt) or call cmake with option `-DSCANSEGMENT_XD=0`:
```
cmake -DROS_VERSION=0 -DSCANSEGMENT_XD=0 -G "Unix Makefiles" ../sick_scan_xd
```
Expand Down Expand Up @@ -86,25 +75,12 @@ To install sick_scan_xd on Windows, follow the steps below:
cd sick_scan_ws
```

3. Clone repositories https://github.com/SICKAG/msgpack11.git and https://github.com/SICKAG/sick_scan_xd:
3. Clone repository https://github.com/SICKAG/sick_scan_xd:
```
git clone https://github.com/SICKAG/msgpack11.git
git clone https://github.com/SICKAG/sick_scan_xd.git
```

4. Build mspack with cmake and Visual Studio 2019:
```
mkdir sick_scan_xd\build\msgpack11
pushd sick_scan_xd\build\msgpack11
cmake -DMSGPACK11_BUILD_TESTS=0 -G "Visual Studio 16 2019" ../../../msgpack11
cmake --build . --clean-first --config Debug
cmake --build . --clean-first --config Release
REM open msgpack11.sln in Visual Studio 2019
popd
```
For development or debugging, open file `sick_scan_xd\build\msgpack11\msgpack11.sln` in Visual Studio.

5. Build sick_generic_caller and sick_scan_xd_shared_lib.dll with cmake and Visual Studio 2019:
4. Build sick_generic_caller and sick_scan_xd_shared_lib.dll with cmake and Visual Studio 2019:
```
cd sick_scan_xd
set _os=x64
Expand All @@ -125,7 +101,7 @@ After successful build, binary files `sick_generic_caller.exe` and `sick_scan_xd

Note: LDMRS sensors are currently not supported on Windows.

Note: msgpack11 is only required to support multiScan100/picoScan100. If you do not need or want to support multiScan100/picoScan100, you can skip building msgpack. To build sick_generic_caller without multiScan100/picoScan100 support, switch off option `BUILD_WITH_SCANSEGMENT_XD_SUPPORT` in [CMakeLists.txt](./CMakeLists.txt) or call cmake with option `-DSCANSEGMENT_XD=0`:
Note: To build sick_generic_caller without multiScan100/picoScan100 support, switch off option `BUILD_WITH_SCANSEGMENT_XD_SUPPORT` in [CMakeLists.txt](./CMakeLists.txt) or call cmake with option `-DSCANSEGMENT_XD=0`:
```
cmake -DROS_VERSION=0 -DSCANSEGMENT_XD=0 -G "%_cmake_string%" ..
```
Loading

0 comments on commit abd4560

Please sign in to comment.