Coder Social home page Coder Social logo

sickag / sick_scan_xd Goto Github PK

View Code? Open in Web Editor NEW
83.0 13.0 78.0 53.82 MB

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).

License: Apache License 2.0

CMake 0.23% Python 25.40% Shell 1.43% C++ 71.32% C 1.22% Batchfile 0.39%
tim mrs lms rms lrs ldmrs

sick_scan_xd's Introduction

sick_scan_xd

This project provides a driver for the SICK LiDARs and Radar sensors mentioned here. The driver supports both Linux (native, ROS1, ROS2) and Windows (native and ROS2). See the CHANGELOG.md for the latest updates.

Table of Contents

Executive Summary

  • sick_scan_xd supports
    • ROS1 (Linux)
    • ROS2 (Linux and Windows)
    • a Driver for generic use (Linux and Windows native)
    • a API for C/C++ or python applications
    • x64 and ARM-64 architecture
  • sick_scan_xd provides a driver for the SICK LiDARs and Radar sensors mentioned here.
  • sick_scan_xd is designed to easily integrate new devices, features and improvements on all targets.
  • sick_scan_xd has no dependencies to 3rd party libraries like boost or pthread.
  • sick_scan_xd offers all features on all targets if the devices support the features.

Repository organization

The repository supports two main branches.

The "master" branch is the branch that contains official releases that are tagged and versioned and also included in the ROS distribution.

If you want to work with this official branch, you must explicitly specify this branch in the 'git clone' command by adding "-b master".

The "develop" branch is the default branch and contains the latest development status.

Example:

Checking out the latest revision (usually older than the develop version, but officially released):

git clone -b master https://github.com/SICKAG/sick_scan_xd.git

Checking out the latest development status:

git clone https://github.com/SICKAG/sick_scan_xd.git

Build targets

sick_scan_xd can be build on 64-bit Linux and Windows, with and without ROS, with and without LDMRS. The following table shows the allowed combinations and how to build.

target cmake settings build script
Linux, native, LDMRS BUILD_WITH_LDMRS_SUPPORT ON cd test/scripts && chmod a+x ./*.bash && ./makeall_linux.bash
Linux, native, no LDMRS BUILD_WITH_LDMRS_SUPPORT OFF cd test/scripts && chmod a+x ./*.bash && ./makeall_linux_no_ldmrs.bash
Linux, ROS-1, LDMRS BUILD_WITH_LDMRS_SUPPORT ON cd test/scripts && chmod a+x ./*.bash && ./makeall_ros1.bash
Linux, ROS-1, no LDMRS BUILD_WITH_LDMRS_SUPPORT OFF cd test/scripts && chmod a+x ./*.bash && ./makeall_ros1_no_ldmrs.bash
Linux, ROS-2, LDMRS BUILD_WITH_LDMRS_SUPPORT ON cd test/scripts && chmod a+x ./*.bash && ./makeall_ros2.bash
Linux, ROS-2, no LDMRS BUILD_WITH_LDMRS_SUPPORT OFF cd test/scripts && chmod a+x ./*.bash && ./makeall_ros2_no_ldmrs.bash
Windows, native, no LDMRS BUILD_WITH_LDMRS_SUPPORT OFF cd test\scripts && make_win64.cmd
Windows, ROS-2, no LDMRS BUILD_WITH_LDMRS_SUPPORT OFF cd test\scripts && make_ros2.cmd

If you're using ROS, set your ROS-environment before running one of these scripts, f.e.

  • source /opt/ros/noetic/setup.bash for ROS-1 noetic, or
  • source /opt/ros/foxy/setup.bash for ROS-2 foxy, or
  • source /opt/ros/humble/setup.bash for ROS-2 humble.

See the build descriptions for more details:

sick_scan_xd supports 64 bit Linux and Windows, 32 bit systems are not supported.

Driver API

sick_scan_xd provides a C API, which can be used by any programming language with C-bindings, e.g. in C/C++ or python applications. See sick_scan_api.md for further details.

IMU Support

Devices of the MRS6xxx and MRS1xxx series are available with an optionally built-in IMU. Further information on the implementation and use of the experimental Imu support can be found on the Imu page.

Radar support

See radar documentation for RMSxxxx support.

multiScan100 support

See sick_scan_segment_xd for multiScan100 support.

Software PLL

A software pll is used to convert LiDAR timestamps in ticks to the ros system time. See software_pll for further details.

Field Evaluation Information

The LMS1xx, LMS5xx, TiM7xx and TiM7xxS families support extensions for field monitoring. See field_monitoring_extensions for further details.

Run sick_scan_xd driver

See USAGE how to run and configure the sick_scan_xd driver.

Software Overview

An overview over the software and its modules can be found in software_overview.

FAQ

Keywords

MRS1000 MRS1104 LMS1000 LMS1104 MRS6000 MRS6124 RMS1xxx RMS1000 RMSxxxx ROS LiDAR SICK LiDAR SICK Laser SICK Laserscanner SICK Radar LMS1xx MRS1xxx LMS1xxx MRS6xxx TiM5xx TiM551 TiM561 TiM571 TiM781 TiM781S LMS5xx LMS511 NAV210 NAV245 NAV310 LDMRS LRS4000 LD-LRS3600 LD-LRS3601 LD-LRS3611 LD-OEM1500 LD-OEM1501 multiScan100 multiScan picoScan100 picoScan

sick_scan_xd's People

Contributors

aiplemasickag avatar fmessmer avatar gschwsisickag avatar jwhitleywork avatar michael1309 avatar pjreed avatar rostest avatar scheunemann avatar tomaszkapron avatar weinmalsickag avatar youliangtan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sick_scan_xd's Issues

USB support

Hi!

I am working on the migration to ros2 of a robot which has the scanner connected by USB.
For ros1 is used sick_tim_common_usb.cpp but here and in sick_scan2 package I haven't found any references to USB support.
Am I missing something?

Permission denied when build on Linux ROS1-Kinetic

Error:"catkin_generated/env_cached.sh: 16: exec: ~/catkin_ws/src/sick_scan_xd/cfg/xxx.cfg: Permission denied" is shown up when build with ROS Kinetic
Solution: chmod a+x ~/catkin_ws/src/sick_scan_xd/cfg/*.cfg

Unable to Connect to TIM781

I am attempting to connect to two different TIM781 lidars. If the lidars are configured for ASCII, I get errors about unexpected ASCII datagrams. However, if I configure the lidars to use binary and change the launch file config to binary, I get the following timeout on both sensors (excerpt from the end of the log because it produces a bunch of other data as well):

[INFO] [1643225657.236905141] [sick_scan]: Safety field 41, type 2 : (0,0), (-7.85398e-05,-1), (1.2491,-0.999872), (1.24957,0.999283), (0.000392588,1)
[INFO] [1643225657.236938302] [sick_scan]: Safety field 42, type 2 : (0,0), (-0.00011781,-1.5), (2.25021,-1.49939), (2.25092,1.49833), (0.000588882,1.5)
[INFO] [1643225657.236970942] [sick_scan]: Safety field 43, type 2 : (0,0), (-9.81748e-05,-1.25), (1.8749,-1.24931), (1.87549,1.24842), (0.000490735,1.25)
[INFO] [1643225657.237004782] [sick_scan]: Safety field 44, type 2 : (0,0), (-7.85398e-05,-1), (1.49959,-0.999223), (1.50006,0.998516), (0.000392588,1)
[INFO] [1643225657.237038062] [sick_scan]: Safety field 45, type 2 : (0,0), (-0.00011781,-1.5), (2.62647,-1.49673), (2.62717,1.49549), (0.000588882,1.5)
[INFO] [1643225657.237071502] [sick_scan]: Safety field 46, type 2 : (0,0), (-9.81748e-05,-1.25), (2.18858,-1.24719), (2.18917,1.24616), (0.000490735,1.25)
[INFO] [1643225657.237104542] [sick_scan]: Safety field 47, type 2 : (0,0), (-7.85398e-05,-1), (1.75069,-0.997653), (1.75116,0.996828), (0.000392588,1)
[INFO] [1643225657.237161662] [sick_scan]: Sending  : <STX><STX><STX><STX><Len=0032>sWN LMDscandatacfg 0x01 0x00 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x01 CRC:<0x43>
[INFO] [1643225657.238867029] [sick_scan]: Receiving: <STX>sWA LMDscandatacfg <ETX>
[INFO] [1643225657.238920949] [sick_scan]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMDscandatacfg CRC:<0x67>
[INFO] [1643225657.240016553] [sick_scan]: Receiving: <STX>sRA LMDscandatacfg \x01\x00\x01\x01\x00\x00\x00\x00\x00\x00...
[INFO] [1643225657.240238474] [sick_scan]: Sending  : <STX><STX><STX><STX><Len=0018>sWN FREchoFilter 0x00 CRC:<0x7f>
[WARN] [1643225777.242375258] [sick_scan]: Timeout during waiting for new datagram
[WARN] [1643225777.242564218] [sick_scan]: sendSOPASCommand: no full reply available for read after 120000 ms
[INFO] [1643225777.242652619] [sick_scan]: Receiving: <STX><ETX>
[INFO] [1643225777.242696339] [sick_scan]: SOPAS Communication -Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0018>sWN FREchoFilter 0x00 CRC:<0x7f>

[INFO] [1643225777.242757379] [sick_scan]: Failed to init scanner Error Code: 1
Waiting for timeout...
If the communication mode set in the scanner memory is different from that used by the driver, the scanner's communication mode is changed.
This requires a restart of the TCP-IP connection, which can extend the start time by up to 30 seconds. There are two ways to prevent this:
1. [Recommended] Set the communication mode with the SOPAS ET software to binary and save this setting in the scanner's EEPROM.
2. Use the parameter "use_binary_protocol" to overwrite the default settings of the driver.
[ERROR] [1643225777.242853259] [sick_scan]: ## ERROR in mainGenericLaser: init failed, retrying...
[INFO] [1643225777.242890539] [sick_scan]: Start initialising scanner [Ip: 192.168.0.109] [Port:2112]
[WARN] [1643225777.242924820] [sick_scan]: Disconnecting TCP-Connection.
[ERROR] [1643225777.243033860] [sick_scan]: Tcp::readInputData: Read 0 bytes, connection is lost!
[INFO] [1643225777.243194301] [sick_scan]: SickThread TcpRecvThread finished (flags: threadShouldRun=0, endThread=0).
sick_scan driver closed.
[ERROR] [1643225777.253615459] [sick_scan]: ## ERROR in mainGenericLaser: exception parameter 'diagnostic_updater.period' has already been declared

Lidar LMS511 connection problem

System:
ros2 foxy
ubuntu 20.04 (kernal 5.11.0-46-generic)
sick_scan_xd
LMS511-20100

Problem: When executing "ros2 run sick_scan sick_generic_caller ./src/sick_scan_xd/launch/sick_lms_5xx.launch" i get the following error:

ERROR SickScanMessages::parseLIDoutputstateMsg(): received 95 byte with invalid format (/home/henry/testbench_ws/src/sick_scan_xd/driver/src/sick_scan_messages.cpp:142): \x02\x02\x02\x02\x00\x00\x00VsSN LIDoutputstate 0 0 0 16 0 16 0 16 0 16 0 16 0 16 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 0w

Note: I changed the IP-address in the launch file according to the one shown in SOPAS. Also i set sw_pll_only_publish to false according to an error i got before.

I really appreciate any help you can provide.

Full terminal code:
error.txt

RMS support

Requests for RMS support:

  • Deactivate emulator support by default
  • Remove obsolete radar settings
  • Documentation (message format and screenshots radar pointcloud)

Stop the Scanner Rotation

I was wondering how to stop the scanner in command-line after executing, for example, the following ROS launch command?
roslaunch sick_scan sick_nav_3xx.launch hostname:=<ip-address>
Thanks.

Building Warning Messages

What's the issue with the following repeated warning messages that occur during the building of the driver on Linux (Ubuntu 18.04)-ROS1 running GCC 7.5?
Thank you for your continuous support.

In file included from /usr/include/c++/7/vector:69:0,
                 from /home/ubuntu/nav310_ws/src/sick_scan_xd/include/sick_scan/tcp/BasicDatatypes.hpp:63,
                 from /home/ubuntu/nav310_ws/src/sick_scan_xd/include/sick_scan/sick_scan_common_nw.h:8,
                 from /home/ubuntu/nav310_ws/src/sick_scan_xd/driver/src/sick_scan_marker.cpp:59:
/usr/include/c++/7/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const visualization_msgs::Marker_<std::allocator<void> >&}; _Tp = visualization_msgs::Marker_<std::allocator<void> >; _Alloc = std::allocator<visualization_msgs::Marker_<std::allocator<void> > >]’:
/usr/include/c++/7/bits/vector.tcc:394:7: note: parameter passing for argument of type ‘std::vector<visualization_msgs::Marker_<std::allocator<void> > >::iterator {aka __gnu_cxx::__normal_iterator<visualization_msgs::Marker_<std::allocator<void> >*, std::vector<visualization_msgs::Marker_<std::allocator<void> > > >}’ changed in GCC 7.1
       vector<_Tp, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~

Timestamp investigation for TiM5xx

The time stamp assignment for the TiM5xx is to be investigated. If necessary, the time stamp should be selected to match the generation time of the scan.

IMU header timestamp issue

Hi!

I am using Sick MRS1000 (with IMU). I noticed that the imu header timestamp will randomly jump to an incorrect time, and it will auto recovered after some random period of time. I created a plot of imu data header timestamp and the clock when this occurred.

clock_Imu

In order to further analyse the issue, I enable DEBUG_DUMP_TO_CONSOLE_ENABLED to dump the datagram to console. From the datagram, I noticed that there is a time jump in imuValue.TimeStamp().

datagram_timeskip

This incorrect imuValue.TimeStamp() will further be used by "software PLL" for synchronization correction before inserting to the ROS IMU message header.

I tested this with sick_scan_xd version 2.6.2 and it also happens in the sick_scan package.

How does one use this without ROS?

The code compiles without ROS, but I see no way to use it in library mode – the wrappers define publishers, but don't expose functionality for "subscribing". How can I retrieve the data from a scanner when I use this project as a library?

disconnect state support

The function I want to achieve is to report the disconnection (network cable disconnection) status. The idea is to try to ping the laser to determine if the network is disconnected when the data acquisition fails.

We recommend to use sick_scan_xd for further development.
Regarding the issue, there are two different timelimits:

  • the const timeout of 30 seconds is required, since a lidar response may take up to 30 seconds, and
  • the timelimit configured in the launchfile is used as max. timeout during startup (max. timeout for a sopas response).

Originally posted by @rostest in SICKAG/sick_scan#160 (comment)

startGenericLaser is blocking

I'm trying to use sick_scan_xd without ROS. As far as I understand startGenericLaser should return immediately, but it never does for some reason. Running it from another thread and calling stopScannerAndExit does not help either. Am I overlooking something? I'm testing in linux with an LMS511.

No data received from Lidar

This issue is similar to SICKAG/sick_scan2#41 and SICKAG/sick_scan2#32 from another repo.

I was able to connect and get cloud data (on ROS2 Foxy) from the sensor (MRS1104C) a few days ago using driver from 'sick_scan2' repo on a Ubuntu machine, and on SOPAS software on a windows machine.

However, after a few days (and a power cycle), now I am not able to receive any data using the ros2 drivers (both sick_scan and sick_scan_xd) and SOPAS software.

The Lidar is reacting to commands fine, meaning that the status indicator lights on Lidar turn Red when shutting down the driver, and back to Green when starting the driver. However, no data is being published.

When executed with the following command: ros2 run sick_scan sick_generic_caller ./src/sick_scan_xd/launch/sick_mrs_1xxx.launch the driver times out after 150 sec.

See the logs attached.
log_sick_scan_xd.txt

Please suggest a resolution.

Unable to connect to NAV350

Hello!

I'm trying to connect to my NAV350 using ros2("sick_nav_3xx.launch"). but, I'm stuck in this error.

Screenshot from 2022-02-14 09-48-36

I tried this things :
Used latest "sick_scan_xd" driver and clean installed,
Changed Cola - ascii to binary (Using SOPAS ET.),
Changed the address ip (direct connection and router connection)

Any help would be appreciated!!

NAV310 - scan-message vs. pointcloud2

Historically, the zero degree location of the NAV310 is directly on the back side of the lidar. The Pointcloud2 message rotates these values 180 degrees about the Z axis so that they are mapped correctly in the ROS coordinate system. The scan message should behave identically (i.e. from -180 degrees to +180 degrees). This must be checked and adjusted.

@HannesBachter

LRS4xxx configuration

LRS4xxx configuration of scan rate, angular resolution, min and max angle and frame id is partially missing in the launch file.

Support of "scale"-Entry

For the LRS4xxx there is a new customer command LMDscandatascalefactor to set the distance scaling.
Customer quote:
On pages 87 - 89 you will find the new command LMDscandatascalefactor with which the resolution and thus the maximum output distance range can be set.

LD-LRS36x1 min/max angle support

It appears like the driver doesn't support setting min/max angle scanning range for LD-LRS3601 scanner. sick_lrs_36x1.launch doesn't have this option yet as opposed to other older drivers. Are you planning on adding that in the nearest future?

NAV310 - Optimized support for parameter settings in launch file

The NAV310 is a lidar optimized for navigation. In order to ensure functional reliability for the application, not all parameterization that a ranging lidar offers is therefore supported. In order to increase the transparency for usability here, the following is proposed:

  • Specify restrictions in the launch file
  • Remove parameters from the launch file that cannot be set in a meaningful way (e.g. start angle, end angle).

@HannesBachter

free(): invalid pointer

Hi,

I'm trying to get some data from LMS 511-12100S06 sensor.
But unfortunately I have a crash :(
I tried on windows (10) and also on ubuntu (21.10-64 bit), it has the same result.

I'm looking at the backtrace and I think the problem is it has the same invalid free up.

My backtrace (for all threads):

(gdb) thread apply all bt                                                                                
                                                    
Thread 3 (Thread 0x7ffff7114640 (LWP 786276) "sick_generic_ca"):        
#0  0x00007ffff7b72d3f in __GI___poll (fds=0x7ffff7111b38, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29                                                                                           
#1  0x0000555555635d1c in poll (__timeout=<optimized out>, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/poll2.h:48                                                         
#2  Tcp::readInputData (this=0x7ffff711b5f8) at /home/bbalazs/dev/projects/kozut/sick_scan_xd/driver/src/tcp/tcp.cpp:316                                                                                           
#3  0x0000555555638bd6 in Tcp::readThreadFunction (waitTimeMs=<optimized out>, endThread=<optimized out>, this=<optimized out>) at /home/bbalazs/dev/projects/kozut/sick_scan_xd/driver/src/tcp/tcp.cpp:262        
#4  SickThread<Tcp, &Tcp::readThreadFunction>::thread_entry (this=0x7ffff0004770) at /home/bbalazs/dev/projects/kozut/sick_scan_xd/include/sick_scan/tcp/SickThread.hpp:103                                        
#5  0x000055555564883d in wrapper_prerun (state=<optimized out>) at /home/bbalazs/dev/projects/kozut/sick_scan_xd/driver/src/tcp/SickThread.cpp:9                                                                  
#6  0x00007ffff7e5b694 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6                                
#7  0x00007ffff7aef947 in start_thread (arg=<optimized out>) at pthread_create.c:435
#8  0x00007ffff7b7fa44 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100                      
                                                                                                         
Thread 2 (Thread 0x7ffff7a07640 (LWP 786274) "sick_generic_ca"):                                         
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737347876416) at pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140737347876416) at pthread_kill.c:80                     
#2  __GI___pthread_kill (threadid=140737347876416, signo=signo@entry=6) at pthread_kill.c:91
#3  0x00007ffff7a9d476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26                    
#4  0x00007ffff7a837b7 in __GI_abort () at abort.c:79                        
#5  0x00007ffff7ae4606 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7c3613d "%s\n") at ../sysdeps/posix/libc_fatal.c:155                                                                  
#6  0x00007ffff7afbafc in malloc_printerr (str=str@entry=0x7ffff7c33d86 "free(): invalid pointer") at malloc.c:5543                                                                                                
#7  0x00007ffff7afd434 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:4326
#8  0x00007ffff7affd05 in __GI___libc_free (mem=<optimized out>) at malloc.c:3278                                                                                                                                  
#9  0x00005555555da2de in __gnu_cxx::new_allocator<float>::deallocate (__t=<optimized out>, __p=<optimized out>, this=<optimized out>) at /usr/include/c++/11/ext/new_allocator.h:145
#10 std::allocator_traits<std::allocator<float> >::deallocate (__n=<optimized out>, __p=<optimized out>, __a=...) at /usr/include/c++/11/bits/alloc_traits.h:492                                                   
#11 std::_Vector_base<float, std::allocator<float> >::_M_deallocate (__n=<optimized out>, __p=<optimized out>, this=<optimized out>) at /usr/include/c++/11/bits/stl_vector.h:354                                  
#12 std::_Vector_base<float, std::allocator<float> >::~_Vector_base (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/11/bits/stl_vector.h:335                                                 
#13 std::vector<float, std::allocator<float> >::~vector (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/11/bits/stl_vector.h:683                                                             
#14 sick_scan::SickScanCommon::loopOnce (this=0x7ffff7115010, nh=<optimized out>) at /home/bbalazs/dev/projects/kozut/sick_scan_xd/driver/src/sick_scan_common.cpp:4901                                            
#15 0x000055555559e9b2 in mainGenericLaserInternal (argc=<optimized out>, argv=<optimized out>, nodeName=..., nhPriv=<optimized out>, do_ros_spin=<optimized out>, exit_code=<optimized out>) at /home/bbalazs/dev/projects/kozut/sick_scan_xd/driver/src/sick_generic_laser.cpp:594          
#16 0x00005555555a0893 in GenericLaserCallable::mainGenericLaserCb (this=0x5555556d3bd0) at /home/bbalazs/dev/projects/kozut/sick_scan_xd/driver/src/sick_generic_laser.cpp:120                                    
#17 0x00007ffff7e5b694 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6          
#18 0x00007ffff7aef947 in start_thread (arg=<optimized out>) at pthread_create.c:435
#19 0x00007ffff7b7fa44 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
                                                    
Thread 1 (Thread 0x7ffff7a5a340 (LWP 786251) "sick_generic_ca"):            
#0  0x00007ffff7b3fa68 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7fffffffc620, rem=rem@entry=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78              
#1  0x00007ffff7b44977 in __GI___nanosleep (req=req@entry=0x7fffffffc620, rem=rem@entry=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:25                                                                          
#2  0x00007ffff7b75fe9 in usleep (useconds=<optimized out>) at ../sysdeps/posix/usleep.c:32              
#3  0x00005555555b579a in ros::spinOnce () at /home/bbalazs/dev/projects/kozut/sick_scan_xd/roswrap/src/rossimu/kinetic/src/rossimu.cpp:257                                                                        
#4  ros::spin () at /home/bbalazs/dev/projects/kozut/sick_scan_xd/roswrap/src/rossimu/kinetic/src/rossimu.cpp:264                                                                                                  
#5  0x000055555559736f in rosSpin (nh=<optimized out>) at /home/bbalazs/dev/projects/kozut/sick_scan_xd/include/sick_scan/sick_ros_wrapper.h:180                                                                   
#6  main (argc=0, argv=<optimized out>) at /home/bbalazs/dev/projects/kozut/sick_scan_xd/driver/src/sick_generic_caller.cpp:185  

and that's my output:

(gdb) r                                                                                                                                                                                                            
Starting program: /home/bbalazs/dev/projects/kozut/sick_scan_xd/build_linux/sick_generic_caller ../launch/sick_lms_5xx.launch                                                                                      
[Thread debugging using libthread_db enabled]                                                                                                                                                                      
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".                                                                                                                                         
[Info]: sick_generic_caller V. 2.6.3                                                                                                                                                                               
                                                                                                                                                                                                                   
[Info]: Program argument 1: /home/bbalazs/dev/projects/kozut/sick_scan_xd/build_linux/sick_generic_caller                                                                                                                                                                                                                   
[Info]: Program argument 2: ../launch/sick_lms_5xx.launch                                                                                                                                                          
                                                                                                         
[New Thread 0x7ffff7a07640 (LWP 786274)]                                                                 
[Info]: Try loading launchfile : ../launch/sick_lms_5xx.launch                                           
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): default_args["hostname"]="192.168.20.1"  
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): default_args["sw_pll_only_publish"]="true"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): default_args["nodename"]="sick_lms_5xx"                                                                                                            
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="frame_id", type="str", value="cloud"                                                                                                         
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="scanner_type", type="string", value="sick_lms_5xx"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="min_ang", type="double", value="-1.658062789"                                                                                                
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="max_ang", type="double", value="1.658062789"                                                                                                 
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="range_max", type="double", value="100.0"                                                                                                     
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="intensity", type="bool", value="true"                                                                                                        
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="intensity_resolution_16bit", type="bool", value="false"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="hostname", type="string", value="$(arg hostname)" overwritten by default value "192.168.20.1"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="hostname", type="string", value="192.168.20.1"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="port", type="string", value="2112"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="timelimit", type="int", value="5"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="use_binary_protocol", type="bool", value="true"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="sw_pll_only_publish", type="bool", value="$(arg sw_pll_only_publish)" overwritten by default value "true"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="sw_pll_only_publish", type="bool", value="true"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="min_intensity", type="double", value="0.0"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="start_services", type="bool", value="True"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="activate_lferec", type="bool", value="True"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="activate_lidoutputstate", type="bool", value="True"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="activate_lidinputstate", type="bool", value="True"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="message_monitoring_enabled", type="bool", value="True"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="read_timeout_millisec_default", type="int", value="5000"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="read_timeout_millisec_startup", type="int", value="120000"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="read_timeout_millisec_kill_node", type="int", value="150000"
[Info]: LaunchParser::parseFile(../launch/sick_lms_5xx.launch): name="client_authorization_pw", type="string", value="F4724744"
frame_id                       str        cloud                
scanner_type                   string     sick_lms_5xx        
min_ang                        double     -1.658062789        
max_ang                        double     1.658062789         
range_max                      double     100.0                
intensity                      bool       true                 
intensity_resolution_16bit     bool       false                
hostname                       string     192.168.20.1        
port                           string     2112                 
timelimit                      int        5                    
use_binary_protocol            bool       true                 
sw_pll_only_publish            bool       true                 
min_intensity                  double     0.0                  
start_services                 bool       True                 
activate_lferec                bool       True                 
activate_lidoutputstate        bool       True                 
activate_lidinputstate         bool       True                 
message_monitoring_enabled     bool       True                 
read_timeout_millisec_default  int        5000                 
read_timeout_millisec_startup  int        120000               
read_timeout_millisec_kill_node int        150000               
client_authorization_pw        string     F4724744                                                                                                                                                                 
ROS_INFO: Found sopas_protocol_type param overwriting default protocol:                                                                                                                                            
ROS_INFO: Binary protocol activated
[Info]: Start initialising scanner [Ip: 192.168.20.1] [Port:2112]
[Info]: Publishing on topic "/lferec"
[Info]: Publishing on topic "/lidoutputstate"
[Info]: Publishing on topic "/marker"
[Info]: Publishing laserscan-pointcloud2 to 
[Info]: Publishing on topic "/"
[Info]: Publishing on topic "/imu"
[Info]: Publishing on topic "/encoder"
[Info]: Publishing on topic "/scan"
[Info]: sick_scan_xd: Tcp::open: connecting to 192.168.20.1:2112 ...
[New Thread 0x7ffff7114640 (LWP 786276)]
[Info]: sick_scan_xd Tcp::open: connected to 192.168.20.1:2112
[Info]: Parameter setting for <active_echo: 0d>

[Info]: SickThread TcpRecvThread started.
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x01<ETX>
[Info]: checkColaDialect: lidar response in configured Cola-dialect Cola-B
[Info]: Sending  : <STX><STX><STX><STX><Len=0023>sMN SetAccessMode 0x03 0xf4 0x72 0x47 0x44 CRC:<0xb3>
[Info]: Receiving: <STX>sAN SetAccessMode \x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0015>sWN EIHstCola 0x01 CRC:<0x09>
[Info]: Receiving: <STX>sWA EIHstCola <ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0019>sRN FirmwareVersion CRC:<0x24>
[Info]: Receiving: <STX>sRA FirmwareVersion \x00\x09\x56\x32\x2e\x30\x30\x20\x20\x2...
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[Info]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
ROS_DEBUG: Laser is busy
[Info]: Sending  : <STX><STX><STX><STX><Len=0010>sRN ODoprh CRC:<0x41>
[Info]: Receiving: <STX>sRA ODoprh \x00\x00\x00\xa3<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0010>sRN ODpwrc CRC:<0x52>
[Info]: Receiving: <STX>sRA ODpwrc \x00\x00\x00\x1e<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0016>sRN LocationName CRC:<0x55>
[Info]: Receiving: <STX>sRA LocationName \x00\x0b\x53\x4e\x20\x32\x31\x33\x35\x31\x...
[Info]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMPoutputRange CRC:<0x5e>
[Info]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x13\x88\xff\xff\x3c\xb0...
[Info]: Angle resolution of scanner is 0.5 [deg]  (in 1/10000th deg: 5000)
[Info]: [From:To] -5 [deg] to 185f [deg] (in 1/10000th deg: from -50000 to 1850000)
[Info]: MIN_ANG: -1.65806 [rad] -95 [deg]
[Info]: MAX_ANG: 1.65806 [rad] 95 [deg]
[Info]: Sending  : <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 0x00 0x13 0x88 0xff 0xff 0x3c 0xb0 0x00 0x1c 0x3a 0x90 CRC:<0xdb>
[Info]: Receiving: <STX>sWA LMPoutputRange <ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMPoutputRange CRC:<0x5e>
[Info]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x13\x88\xff\xff\x3c\xb0...
[Info]: Angle resolution of scanner is 0.5 [deg]  (in 1/10000th deg: 5000)
[Info]: MIN_ANG (after command verification): -1.65806 [rad] -95 [deg]
[Info]: MAX_ANG (after command verification): 1.65806 [rad] 95 [deg]
ROS_INFO: LMS 5xx detected overwriting output channel flag ID
ROS_INFO: LMS 5xx detected overwriting resolution flag (only 8 bit supported)
ROS_INFO: Reading safety fields
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field000 CRC:<0x1d>
[Info]: Receiving: <STX>sRA field000 @\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x88\...
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field001 CRC:<0x1c>
[Info]: Receiving: <STX>sRA field001 @\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x88\...
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field002 CRC:<0x1f>
[Info]: Receiving: <STX>sRA field002 @\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x88\...
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field003 CRC:<0x1e>
[Info]: Receiving: <STX>sRA field003 @\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x88\...
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field004 CRC:<0x19>
[Info]: Receiving: <STX>sRA field004 @\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x88\...
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field005 CRC:<0x18>
[Info]: Receiving: <STX>sRA field005 @\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x88\...
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field006 CRC:<0x1b>
[Info]: Receiving: <STX>sRA field006 @\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x88\...
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field007 CRC:<0x1a>
[Info]: Receiving: <STX>sRA field007 @\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x88\...
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field008 CRC:<0x15>
[Info]: Receiving: <STX>sRA field008 @\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x88\...
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field009 CRC:<0x14>
[Info]: Receiving: <STX>sRA field009 @\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x88\...
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field010 CRC:<0x1c>
[Info]: Receiving: <STX>sRA field010 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field011 CRC:<0x1d>
[Info]: Receiving: <STX>sRA field011 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field012 CRC:<0x1e>
[Info]: Receiving: <STX>sRA field012 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field013 CRC:<0x1f>
[Info]: Receiving: <STX>sRA field013 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field014 CRC:<0x18>
[Info]: Receiving: <STX>sRA field014 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field015 CRC:<0x19>
[Info]: Receiving: <STX>sRA field015 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field016 CRC:<0x1a>
[Info]: Receiving: <STX>sRA field016 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field017 CRC:<0x1b>
[Info]: Receiving: <STX>sRA field017 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field018 CRC:<0x14>
[Info]: Receiving: <STX>sRA field018 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field019 CRC:<0x15>
[Info]: Receiving: <STX>sRA field019 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field020 CRC:<0x1f>
[Info]: Receiving: <STX>sRA field020 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field021 CRC:<0x1e>
[Info]: Receiving: <STX>sRA field021 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field022 CRC:<0x1d>
[Info]: Receiving: <STX>sRA field022 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field023 CRC:<0x1c>
[Info]: Receiving: <STX>sRA field023 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field024 CRC:<0x1b>
[Info]: Receiving: <STX>sRA field024 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field025 CRC:<0x1a>
[Info]: Receiving: <STX>sRA field025 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field026 CRC:<0x19>
[Info]: Receiving: <STX>sRA field026 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field027 CRC:<0x18>
[Info]: Receiving: <STX>sRA field027 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field028 CRC:<0x17>
[Info]: Receiving: <STX>sRA field028 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sRN field029 CRC:<0x16>
[Info]: Receiving: <STX>sRA field029 \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sRN LIDinputstate CRC:<0x0f>
[Info]: Receiving: <STX>sRA LIDinputstate \x00\x00\x00\x6b\x57\x32\x00\x00\x00\x00\...
[Info]: Safety fieldset response to "sRN LIDinputstate": \x02\x02\x02\x02\x00\x00\x00\x29sRA LIDinputstate \x00\x00\x00kW2\x00\x00\x00\x00\x00\x01\x07\xb2\x01\x01\x00\x00\x03\x00\x0c\xb5\xe8\xc8, active fieldset
 = 0
[Info]: Safety fieldset 0, pointcounter = [  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[Info]: Sending  : <STX><STX><STX><STX><Len=0032>sWN LMDscandatacfg 0x01 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x01 CRC:<0x42>
[Info]: Receiving: <STX>sWA LMDscandatacfg <ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMDscandatacfg CRC:<0x67>
[Info]: Receiving: <STX>sRA LMDscandatacfg \x01\x00\x01\x00\x00\x00\x00\x00\x00\x00...
[Info]: sick_lms_5xx: activating field monitoring by lferec messages
[Info]: sick_lms_5xx: activating field monitoring by lidoutputstate messages
[Info]: sick_lms_5xx: activating field monitoring by lidinputstate messages
[Info]: Sending  : <STX><STX><STX><STX><Len=0012>sEN LFErec 0x01 CRC:<0x42>
[Info]: Receiving: <STX>sEA LFErec \x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0020>sEN LIDoutputstate 0x01 CRC:<0x50>
[Info]: Receiving: <STX>sEA LIDoutputstate \x01<ETX> 
[Info]: Sending  : <STX><STX><STX><STX><Len=0019>sEN LIDinputstate 0x01 CRC:<0x39>
[Info]: Receiving: <STX>sEA LIDinputstate \x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0016>sMN LMCstartmeas CRC:<0x68>
[Info]: Receiving: <STX>sAN LMCstartmeas \x00<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0007>sMN Run CRC:<0x19>
[Info]: Receiving: <STX>sAN Run \x01<ETX>
[Info]: Sending  : <STX><STX><STX><STX><Len=0017>sEN LMDscandata 0x01 CRC:<0x33>
[Info]: Receiving: <STX>sEA LMDscandata \x01<ETX>
ROS_DEBUG: Starting scan data ....

ROS_INFO: SickScanServices: ros services initialized 
ROS_INFO: Setup completed, sick_scan_xd is up and running.
ROS_INFO: Software PLL locking started, mapping ticks to system time.
[Info]: 1 / 6 packets dropped. Software PLL not yet locked.
[Info]: 2 / 6 packets dropped. Software PLL not yet locked.
[Info]: 3 / 6 packets dropped. Software PLL not yet locked.
[Info]: 4 / 6 packets dropped. Software PLL not yet locked.
[Info]: 5 / 6 packets dropped. Software PLL not yet locked.
ROS_INFO: Software PLL is ready and locked now!
free(): invalid pointer

Thread 2 "sick_generic_ca" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff7a07640 (LWP 786274)]
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737347876416) at pthread_kill.c:44
44      pthread_kill.c: No such file or directory.

and this is launch file:

<?xml version="1.0"?>

<launch>
    <arg name="hostname" default="192.168.20.1"/>
    <arg name="sw_pll_only_publish" default="true"/>
    <arg name="nodename" default="sick_lms_5xx"/>

    <node name="$(arg nodename)" pkg="sick_scan" type="sick_generic_caller" respawn="false" output="screen" required="true">

        <param name="frame_id" type="str" value="cloud"/>
        <param name="scanner_type" type="string" value="sick_lms_5xx"/>

        <param name="min_ang" type="double" value="-1.658062789"/>

        <param name="max_ang" type="double" value="1.658062789"/>
        <param name="range_max" type="double" value="100.0"/>
        <param name="intensity" type="bool" value="true"/>
        <param name="intensity_resolution_16bit" type="bool" value="false"/>
        <param name="hostname" type="string" value="$(arg hostname)"/>
        <param name="port" type="string" value="2112"/>
        <param name="timelimit" type="int" value="5"/>
        <param name="use_binary_protocol" type="bool" value="true"/>
        <param name="sw_pll_only_publish" type="bool" value="$(arg sw_pll_only_publish)"/>
        <param name="min_intensity" type="double" value="0.0"/> 
        <param name="start_services" type="bool" value="True"/> 
        <param name="activate_lferec" type="bool" value="True"/> 
        <param name="activate_lidoutputstate" type="bool" value="True"/> 
        <param name="activate_lidinputstate" type="bool" value="True"/> 

        <param name="message_monitoring_enabled" type="bool" value="True" />      
        <param name="read_timeout_millisec_default" type="int" value="5000"/>     
        <param name="read_timeout_millisec_startup" type="int" value="120000"/>   
        <param name="read_timeout_millisec_kill_node" type="int" value="150000"/> 
        <param name="client_authorization_pw" type="string" value="F4724744"/>    

    </node>
</launch>

Do you have any idea what the problem might be?

thank you in advance,
Best regards
Balázs

Change min_ang and max_ang failed (sick lms1xx)

Hi,
I have two LMS100 and I want to change the min_ang and max_ang using the provided launch file

However, I got this output

[ INFO] [1649388783.031327939]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMPoutputRange CRC:<0x5e>
[ INFO] [1649388783.032709519]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x13\x88\xff\xf9\x22\x30...
[ INFO] [1649388783.032934463]: Angle resolution of scanner is 0.5 [deg]  (in 1/10000th deg: 5000)
[ INFO] [1649388783.033030455]: [From:To] -45 [deg] to 225f [deg] (in 1/10000th deg: from -450000 to 2250000)
[ INFO] [1649388783.033108844]: MIN_ANG: -2.35619 [rad] -135 [deg]
[ INFO] [1649388783.033201720]: MAX_ANG: 2.35619 [rad] 135 [deg]
[ INFO] [1649388783.033326676]: Sending  : <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 0x00 0x13 0x88 0xff 0xf9 0x22 0x33 0x00 0x22 0x55 0x0d CRC:<0x8c>
[ INFO] [1649388783.034770660]: Receiving: <STX>sFA\x00\x0a<ETX>
[ WARN] [1649388783.034928104]: Error Sopas answer mismatch: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 ..., received answer: "sFA\x00\x0a", expected patterns: "sWA LMPoutputRange","sAN LMPoutputRange"
[ WARN] [1649388788.035193019]: Timeout during waiting for new datagram
[ WARN] [1649388788.035376670]: Error Sopas answer mismatch: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 ..., received answer: "", expected patterns: "sWA LMPoutputRange","sAN LMPoutputRange"
[ERROR] [1649388788.035469570]: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 ..., giving up after 1 unexpected answers.
[ INFO] [1649388788.035572149]: Failed to init scanner Error Code: 1
Waiting for timeout...

After that, it times out.
AFAIK, sFA\x00\x0a means Sopas_Error_VARIABLE_WRITE_ACCESSDENIED, and the document says that It is not allowed to write values to this variable. Probably the variable is defined as read-only. That is pretty weird.

I have read similar issue here, but it seems that the password is correct. Here is the full log

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.12
 * /sick_lms_1xx/activate_lferec: True
 * /sick_lms_1xx/activate_lidinputstate: True
 * /sick_lms_1xx/activate_lidoutputstate: True
 * /sick_lms_1xx/ang_res: 0.5
 * /sick_lms_1xx/client_authorization_pw: F4724744
 * /sick_lms_1xx/frame_id: cloud
 * /sick_lms_1xx/hostname: 192.168.51.3
 * /sick_lms_1xx/intensity: False
 * /sick_lms_1xx/intensity_resolution_16bit: False
 * /sick_lms_1xx/max_ang: 2.35619
 * /sick_lms_1xx/message_monitoring_enabled: True
 * /sick_lms_1xx/min_ang: -2.35619
 * /sick_lms_1xx/min_intensity: 0.0
 * /sick_lms_1xx/port: 2112
 * /sick_lms_1xx/range_max: 25.0
 * /sick_lms_1xx/read_timeout_millisec_default: 5000
 * /sick_lms_1xx/read_timeout_millisec_kill_node: 150000
 * /sick_lms_1xx/read_timeout_millisec_startup: 120000
 * /sick_lms_1xx/scan_freq: 50.0
 * /sick_lms_1xx/scanner_type: sick_lms_1xx
 * /sick_lms_1xx/start_services: True
 * /sick_lms_1xx/sw_pll_only_publish: True
 * /sick_lms_1xx/timelimit: 5
 * /sick_lms_1xx/use_binary_protocol: True

NODES
  /
    sick_lms_1xx (sick_scan/sick_generic_caller)

ROS_MASTER_URI=http://localhost:11311

process[sick_lms_1xx-1]: started with pid [571531]
[ INFO] [1649388781.560193350]: sick_generic_caller V. 2.6.1

[ INFO] [1649388781.561245937]: Program argument 1: /home/aiRobots/aiRobots/aiRobots_AMMR/Software/devel/lib/sick_scan/sick_generic_caller

[ INFO] [1649388781.561287128]: Program argument 2: __log:=/home/aiRobots/.ros/log/3a2f8816-b66c-11ec-987a-ace2d35a34c7/sick_lms_1xx-1.log

[ INFO] [1649388781.561305534]: Program argument 3: __name:=sick_lms_1xx

[ INFO] [1649388781.566080178]: Found sopas_protocol_type param overwriting default protocol:
[ INFO] [1649388781.566111343]: Binary protocol activated
[ INFO] [1649388781.567513377]: Start initialising scanner [Ip: 192.168.51.3] [Port:2112]
[ INFO] [1649388781.600177339]: Publishing on topic "/sick_lms_1xx/lferec"
[ INFO] [1649388781.600759335]: Publishing on topic "/sick_lms_1xx/lidoutputstate"
[ INFO] [1649388781.601425618]: Publishing on topic "/sick_lms_1xx/marker"
[ INFO] [1649388781.602114828]: Publishing laserscan-pointcloud2 to cloud
[ INFO] [1649388781.602151793]: Publishing on topic "/cloud"
[ INFO] [1649388781.602803559]: Publishing on topic "/sick_lms_1xx/imu"
[ INFO] [1649388781.603352968]: Publishing on topic "/sick_lms_1xx/encoder"
[ INFO] [1649388781.603859166]: Publishing on topic "/sick_lms_1xx/scan"
[ INFO] [1649388781.604372355]: sick_scan_xd: Tcp::open: connecting to 192.168.51.3:2112 ...
[ INFO] [1649388781.604807098]: sick_scan_xd Tcp::open: connected to 192.168.51.3:2112
[ INFO] [1649388781.604834865]: SickThread TcpRecvThread started.
[ INFO] [1649388781.606690336]: Parameter setting for <active_echo: 0d>

[ INFO] [1649388781.608072951]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[ INFO] [1649388781.609306742]: Receiving: <STX>sRA SCdevicestate \x01<ETX>
[ INFO] [1649388781.609369918]: checkColaDialect: lidar response in configured Cola-dialect Cola-B
[ INFO] [1649388781.809623884]: Sending  : <STX><STX><STX><STX><Len=0023>sMN SetAccessMode 0x03 0xf4 0x72 0x47 0x44 CRC:<0xb3>
[ INFO] [1649388781.812514732]: Receiving: <STX>sAN SetAccessMode \x01<ETX>
[ INFO] [1649388782.012835447]: Sending  : <STX><STX><STX><STX><Len=0015>sWN EIHstCola 0x01 CRC:<0x09>
[ INFO] [1649388782.014211502]: Receiving: <STX>sWA EIHstCola <ETX>
[ INFO] [1649388782.214606212]: Sending  : <STX><STX><STX><STX><Len=0019>sRN FirmwareVersion CRC:<0x24>
[ INFO] [1649388782.218069927]: Receiving: <STX>sRA FirmwareVersion \x00\x0a\x56\x31\x2e\x32\x33\x20\x20\x2...
[ INFO] [1649388782.418492188]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[ INFO] [1649388782.420099315]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[ INFO] [1649388782.620491186]: Sending  : <STX><STX><STX><STX><Len=0010>sRN ODoprh CRC:<0x41>
[ INFO] [1649388782.621733611]: Receiving: <STX>sRA ODoprh \x00\x00\x37\xaa<ETX>
[ INFO] [1649388782.824357338]: Sending  : <STX><STX><STX><STX><Len=0010>sRN ODpwrc CRC:<0x52>
[ INFO] [1649388782.825671105]: Receiving: <STX>sRA ODpwrc \x00\x00\x06\x08<ETX>
[ INFO] [1649388783.027782363]: Sending  : <STX><STX><STX><STX><Len=0016>sRN LocationName CRC:<0x55>
[ INFO] [1649388783.029221587]: Receiving: <STX>sRA LocationName \x00\x05\x66\x72\x6f\x6e\x74<ETX>
[ INFO] [1649388783.031327939]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMPoutputRange CRC:<0x5e>
[ INFO] [1649388783.032709519]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x13\x88\xff\xf9\x22\x30...
[ INFO] [1649388783.032934463]: Angle resolution of scanner is 0.5 [deg]  (in 1/10000th deg: 5000)
[ INFO] [1649388783.033030455]: [From:To] -45 [deg] to 225f [deg] (in 1/10000th deg: from -450000 to 2250000)
[ INFO] [1649388783.033108844]: MIN_ANG: -2.35619 [rad] -135 [deg]
[ INFO] [1649388783.033201720]: MAX_ANG: 2.35619 [rad] 135 [deg]
[ INFO] [1649388783.033326676]: Sending  : <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 0x00 0x13 0x88 0xff 0xf9 0x22 0x33 0x00 0x22 0x55 0x0d CRC:<0x8c>
[ INFO] [1649388783.034770660]: Receiving: <STX>sFA\x00\x0a<ETX>
[ WARN] [1649388783.034928104]: Error Sopas answer mismatch: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 ..., received answer: "sFA\x00\x0a", expected patterns: "sWA LMPoutputRange","sAN LMPoutputRange"
[ WARN] [1649388788.035193019]: Timeout during waiting for new datagram
[ WARN] [1649388788.035376670]: Error Sopas answer mismatch: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 ..., received answer: "", expected patterns: "sWA LMPoutputRange","sAN LMPoutputRange"
[ERROR] [1649388788.035469570]: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 ..., giving up after 1 unexpected answers.
[ INFO] [1649388788.035572149]: Failed to init scanner Error Code: 1
Waiting for timeout...
If the communication mode set in the scanner memory is different from that used by the driver, the scanner's communication mode is changed.
This requires a restart of the TCP-IP connection, which can extend the start time by up to 30 seconds. There are two ways to prevent this:
1. [Recommended] Set the communication mode with the SOPAS ET software to binary and save this setting in the scanner's EEPROM.
2. Use the parameter "use_binary_protocol" to overwrite the default settings of the driver.
[ERROR] [1649388788.035701075]: ## ERROR in mainGenericLaser: init failed, retrying...
[ INFO] [1649388788.035799690]: Start initialising scanner [Ip: 192.168.51.3] [Port:2112]
[ WARN] [1649388788.035877767]: Disconnecting TCP-Connection.
[ERROR] [1649388788.036057350]: Tcp::readInputData: Read 0 bytes, connection is lost!
[ INFO] [1649388788.036166489]: SickThread TcpRecvThread finished (flags: threadShouldRun=0, endThread=0).
sick_scan driver closed.
[ INFO] [1649388788.108270027]: Publishing on topic "/sick_lms_1xx/lferec"
[ INFO] [1649388788.108832895]: Publishing on topic "/sick_lms_1xx/lidoutputstate"
[ INFO] [1649388788.109471992]: Publishing on topic "/sick_lms_1xx/marker"
[ INFO] [1649388788.110049152]: Publishing laserscan-pointcloud2 to cloud
[ INFO] [1649388788.110085841]: Publishing on topic "/cloud"
[ INFO] [1649388788.111173284]: Publishing on topic "/sick_lms_1xx/imu"
[ INFO] [1649388788.112252923]: Publishing on topic "/sick_lms_1xx/encoder"
[ INFO] [1649388788.113079779]: Publishing on topic "/sick_lms_1xx/scan"
[ INFO] [1649388788.114045491]: sick_scan_xd: Tcp::open: connecting to 192.168.51.3:2112 ...
[ INFO] [1649388788.114472429]: SickThread TcpRecvThread started.
[ INFO] [1649388788.114518587]: sick_scan_xd Tcp::open: connected to 192.168.51.3:2112
[ INFO] [1649388788.116659004]: Parameter setting for <active_echo: 0d>

[ INFO] [1649388788.117592834]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[ INFO] [1649388788.120003133]: Receiving: <STX>sRA SCdevicestate \x01<ETX>
[ INFO] [1649388788.120046102]: checkColaDialect: lidar response in configured Cola-dialect Cola-B
[ INFO] [1649388788.320207848]: Sending  : <STX><STX><STX><STX><Len=0023>sMN SetAccessMode 0x03 0xf4 0x72 0x47 0x44 CRC:<0xb3>
[ INFO] [1649388788.323377159]: Receiving: <STX>sAN SetAccessMode \x01<ETX>
[ INFO] [1649388788.523929682]: Sending  : <STX><STX><STX><STX><Len=0015>sWN EIHstCola 0x01 CRC:<0x09>
[ INFO] [1649388788.525316755]: Receiving: <STX>sWA EIHstCola <ETX>
^C[sick_lms_1xx-1] killing on exit
[ INFO] [1649388788.673082770]: Caught signal 2

[ INFO] [1649388788.673166721]: good bye

[ INFO] [1649388788.673221175]: You are leaving the following version of this node:

[ INFO] [1649388788.673290320]: sick_generic_caller V. 2.6.1

[ INFO] [1649388788.725570603]: Sending  : <STX><STX><STX><STX><Len=0019>sRN FirmwareVersion CRC:<0x24>
[ INFO] [1649388788.726742211]: Receiving: <STX>sRA FirmwareVersion \x00\x0a\x56\x31\x2e\x32\x33\x20\x20\x2...
[ INFO] [1649388788.926931192]: Sending  : <STX><STX><STX><STX><Len=0017>sRN SCdevicestate CRC:<0x30>
[ INFO] [1649388788.928320591]: Receiving: <STX>sRA SCdevicestate \x00<ETX>
[ INFO] [1649388789.128692855]: Sending  : <STX><STX><STX><STX><Len=0010>sRN ODoprh CRC:<0x41>
[ INFO] [1649388789.130037289]: Receiving: <STX>sRA ODoprh \x00\x00\x37\xaa<ETX>
[ INFO] [1649388789.332256138]: Sending  : <STX><STX><STX><STX><Len=0010>sRN ODpwrc CRC:<0x52>
[ INFO] [1649388789.333578941]: Receiving: <STX>sRA ODpwrc \x00\x00\x06\x08<ETX>
[ INFO] [1649388789.535604166]: Sending  : <STX><STX><STX><STX><Len=0016>sRN LocationName CRC:<0x55>
[ INFO] [1649388789.536762437]: Receiving: <STX>sRA LocationName \x00\x05\x66\x72\x6f\x6e\x74<ETX>
[ INFO] [1649388789.537550615]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMPoutputRange CRC:<0x5e>
[ INFO] [1649388789.538667472]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x13\x88\xff\xf9\x22\x30...
[ INFO] [1649388789.538736747]: Angle resolution of scanner is 0.5 [deg]  (in 1/10000th deg: 5000)
[ INFO] [1649388789.538759644]: [From:To] -45 [deg] to 225f [deg] (in 1/10000th deg: from -450000 to 2250000)
[ INFO] [1649388789.538772916]: MIN_ANG: -2.35619 [rad] -135 [deg]
[ INFO] [1649388789.538784222]: MAX_ANG: 2.35619 [rad] 135 [deg]
[ INFO] [1649388789.538805645]: Sending  : <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 0x00 0x13 0x88 0xff 0xf9 0x22 0x33 0x00 0x22 0x55 0x0d CRC:<0x8c>
[ INFO] [1649388789.540109536]: Receiving: <STX>sFA\x00\x0a<ETX>
[ WARN] [1649388789.540168796]: Error Sopas answer mismatch: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 ..., received answer: "sFA\x00\x0a", expected patterns: "sWA LMPoutputRange","sAN LMPoutputRange"
[ WARN] [1649388794.540475245]: Timeout during waiting for new datagram
[ WARN] [1649388794.540610473]: Error Sopas answer mismatch: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 ..., received answer: "", expected patterns: "sWA LMPoutputRange","sAN LMPoutputRange"
[ERROR] [1649388794.540690340]: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 ..., giving up after 1 unexpected answers.
[ INFO] [1649388794.540794032]: Failed to init scanner Error Code: 1
Waiting for timeout...

I finally kill the process because the software tries to initialize the scanner again.

BTW, I have tried your old repository sick_scan. I still cannot change the min_ang and max_ang.
Parameter I used:

<param name="min_ang" type="double" value="0.0"/> 
<param name="max_ang" type="double" value="3.141"/> 

I got same SFA 00 0A error. The scanner is initialized successfully, but the output angle range unchanged.

Here is the log from old repository

[ INFO] [1649390309.923662225]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMPoutputRange CRC:<0x5e>
[ INFO] [1649390309.924823547]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x13\x88\xff\xf9\x22\x30\x00\x22\x55\x10<ETX>
[ INFO] [1649390309.924919518]: Angle resolution of scanner is 0.50000 [deg]  (in 1/10000th deg: 0x1388)
[ INFO] [1649390309.924959997]: [From:To] -45.00000 [deg] to 225.00000 [deg] (in 1/10000th deg: from 0xFFF92230 to 0x225510)
[ INFO] [1649390309.924980914]: MIN_ANG:    0.000 [rad]    0.000 [deg]
[ INFO] [1649390309.925002415]: MAX_ANG:    3.141 [rad]  179.966 [deg]
[ INFO] [1649390309.925072690]: Sending  : <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 0x00 0x13 0x88 0x00 0x0d 0xbb 0xa0 0x00 0x29 0x31 0x8c CRC:<0x63>
[ INFO] [1649390309.927279732]: Receiving: <STX>sFA\x00\x0a<ETX>
[ERROR] [1649390309.927356897]: Error Sopas answer mismatch Error unexpected Sopas Answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 0x00 0x13 0x88 0x00 0x0d 0xbb 0xa0 0x00 0x29 0x31 0x8c CRC:<0x63>Answer= >>>sFA\x00\x0a<<<

[ INFO] [1649390309.927450118]: Sending  : <STX><STX><STX><STX><Len=0018>sRN LMPoutputRange CRC:<0x5e>
[ INFO] [1649390309.929700704]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x13\x88\xff\xf9\x22\x30\x00\x22\x55\x10<ETX>
[ INFO] [1649390309.929795785]: Angle resolution of scanner is 0.50000 [deg]  (in 1/10000th deg: 0x1388)
[ INFO] [1649390309.931434007]: MIN_ANG (after command verification):    0.000 [rad]    0.000 [deg]
[ INFO] [1649390309.931477863]: MAX_ANG (after command verification):    3.141 [rad]  179.966 [deg]

LMS511: Problems with setting the start and end angle to limit the data output during scan output.

Usually you can use the min_ang and max_ang parameters to restrict the angle range to limit the output of the angle data to the range of interest. For the LMS511 it is advisable to keep the following command sequence:

sWN LMPoutputRange 
sMN Run
sMN SetAccessMode 
sMN mLMPsetscancfg 

Specifically, after LMPoutputRange, you must exit the command mode once and log in again. Then the angle range will be set correctly.

For many lidars it is sufficient to use directly the sequence
sWN LMPoutputRange, sMN mLMPsetscancfg to limit the angle range.

The driver software will be extended to support this mechanism for the LMS511.

LRS4xxx - scan_cfg_list_entry=65, skip=2, scan and pointcloud available?

It should be checked whether the LRS-4xxx can also deliver a low shot rate by setting the following parameters:

<param name="scan_cfg_list_entry" type="int" value="65"/>
<param name="skip" type="int" value="2" /> <!-- Default: 0 (i.e. publish each scan), otherwise only each n.th scan is published -->

How to use the python launch file format with a yaml config?

I am migrating from sick_scan2 to sick_scan_xd. Thanks for this repo and the collected and nicely presented information. I have following launch file which worked with sick_scan2's sick_generic_caller, but doesn't with the new one.

import sys
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description():
    base_config_path = os.path.join(get_package_share_directory('my_package'), 'config')
    sick_config = os.path.join(base_config_path, "sensor", "lms_xd.yaml")
    return LaunchDescription([
        Node(
            package='sick_scan',
            executable='sick_generic_caller',
            output="screen",
            parameters=[sick_config],
        )
    ])

and this yaml file:

sick_scan:
  ros__parameters:
    hostname : "192.168.254.26"

    # Default values from the sick_scan_xd/launch/sick_lms5xx.launch file
    frame_id: "cloud"
    scanner_name: "sick_lms_5xx"
    port: 2112
    min_ang: -1.658062789
    max_ang: 1.658062789
    scanner_type: "sick_lms_5xx"
    range_max: 100.0
    intensity: true
    intensity_resolution_16bit: false
    timelimit: 5
    use_binary_protocol: true
    sw_pll_only_publish: true
    min_intensity: 0.0
    start_services: true
    activate_lferec: true
    activate_lidoutputstate: true
    activate_lidinputstate: true

when launching my launch file I get following stacktrace:

[INFO] [sick_generic_caller-1]: process started with pid [959602]
[sick_generic_caller-1] [INFO] [1645611240.611344578] [sick_scan]: sick_generic_caller V. 2.4.2
[sick_generic_caller-1] 
[sick_generic_caller-1] [INFO] [1645611240.612554789] [sick_scan]: Program argument 1: /home/user/ros2_rolling/install/sick_scan/lib/sick_scan/sick_generic_caller
[sick_generic_caller-1] 
[sick_generic_caller-1] [INFO] [1645611240.613560024] [sick_scan]: Program argument 2: --ros-args
[sick_generic_caller-1] 
[sick_generic_caller-1] [INFO] [1645611240.614298742] [sick_scan]: Program argument 3: --params-file
[sick_generic_caller-1] 
[sick_generic_caller-1] [INFO] [1645611240.615034321] [sick_scan]: Program argument 4: /home/user/ros2_rolling/install/my_package/share/my_package/config/sensor/lms_xd.yaml
[sick_generic_caller-1] 
[sick_generic_caller-1] [ERROR] [1645611240.615913789] [sick_scan]: ## ERROR parseLaunchfileSetParameter(): Tag-Value setting not valid. Use pattern: <tag>:=<value>  (e.g. hostname:=192.168.0.4) (Check the entry: --ros-args)
[sick_generic_caller-1] 
[sick_generic_caller-1] [ERROR] [1645611240.615967060] [sick_scan]: ## ERROR sick_generic_laser: parseLaunchfileSetParameter() failed, aborting
[sick_generic_caller-1] 
[ERROR] [sick_generic_caller-1]: process has died [pid 959602, exit code 255, cmd '/home/user/ros2_rolling/install/sick_scan/lib/sick_scan/sick_generic_caller --ros-args --params-file /home/user/ros2_rolling/install/my_package/share/my_package/config/sensor/lms_xd.yaml'].
not found: "/home/user/ros2_rolling/install/rmw_cyclonedds_cpp/share/rmw_cyclonedds_cpp/local_setup.bash"

Now I looked at the source code and I'm not sure what the function: parseLaunchfileSetParameter under sick_generic_laser.cpp is trying to parse. Is it expecting an xml launch file? Or can it handle yaml, but somehow it trips and tries to parse --ros-args instead of the actual file?

I would like to keep my current setup since I do more things in the python launch file and it is more flexible and I couldn't do those things with an old style xml launch file. Is this possible with the sick_generic_caller in this repo?

LMS1xx mLMPsetscancfg error

The following error occured at LMS1xx startup:

[INFO] [1647857579.088268028] [sick_scan]: Sending  : <STX><STX><STX><STX><Len=0023>sMN mLMPsetscancfg 0x00 0x01 0x00 0x00 CRC:<0x52>
[INFO] [1647857579.090287104] [sick_scan]: Receiving: <STX>sFA\x00\x08<ETX>
[WARN] [1647857579.090435203] [sick_scan]: Error Sopas answer mismatch: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0023>sMN mLMPsetscancfg 0x00 0x01 0x00 ..., received answer: "sFA\x00\x08", expected patterns: "sAN mLMPsetscancfg","sMA mLMPsetscancfg"

TIM781 Parameters & fields

Hello,
First thank you for the driver, it's really helpful.
I would like to know if is it possible to get informations about Fields for the TIM781 lidar in a ROS topic? I didn't find any informations about it.
And I have a 2nd question about fields. I know there are many Set Fields and I would like to change this sets with a ROS pub for example. Is it possible to do it ?

Thank you in advance for your reply :D

LRS-4xxx support: parameter “skip

Question: Is parameter “skip” supported for LRS-4xxx?

Parameter skip can be set in the launch-file by
<param name="skip" type="int" value="0" />
Default value is 0 (i.e. every scan is published)
Otherwise (skip > 0): Each n.th scan is published on topic /cloud

`cloud` topic uses global namespace while `scan` uses private namespace

using the example launch files, e.g.

  • roslaunch sick_scan sick_nav_3xx.launch
  • roslaunch sick_scan sick_lrs_4xxx.launch

I found that the PointCloud2 is published on the global namespace /cloud
while the LaserScan is published on the privat namespace /sick_nav_3xx/scan or /sick_lrs_4xxx/scan respectively

shouldn't this be consistent?

Invalid angles for lrs_4xxx

Hi,
while trying to get scan data from the LRS4000 using the sick_lrs_4xxx.launch I got the following error

Error Sopas answer mismatch: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0033>sWN LMPoutputRange 0x00 0x01 0x00 ..., received answer: "sFA\x00\x04", expected patterns: "sWA LMPoutputRange","sAN LMPoutputRange

an the node failed.
Digging a little bit in the telegram listing and the documentation I found that the angles are restricted to [-180°, 180°] which would also fit the error message (sFA\x00\x04 = Sopas_Error_LOCALCONDITIONFAILED ?) as the angles are set to [-270°,90°] in the launch:

       <param name="min_ang" type="double" value="-4.71238898"/> <!-- value from sick_scan2/config/sick_lrs_4xxx.yaml -->
        <param name="max_ang" type="double" value="1.57079632"/>  <!-- value from sick_scan2/config/sick_lrs_4xxx.yaml -->

Setting the limit to [-180°,180°] everything seems to work as expected.
I'm not sure if it's enough to just change the values in the launch file or if there should be additional checks/calculations in the (ROS) driver.
Another artifact that might result from this issue is that the published cloud and the lasercan have a different "origin" and do therefore not match. I guess it is due to substracting 90° from the startAngle in sick_Scan_common.cpp line 4154
msg.angle_min = startAngle / 180.0 * M_PI - M_PI / 2;

Is this done to have the scan published from basically 0° (-360°) to 0° and "fails" here because we can't set [-270°,90°] ?

I'm using the driver with ROS1 noetic and compiled it as it is described under the respective chapter.

Repository cannot be checked out due to git lfs errors

When cloning (with git-lfs installed):

Downloading test/emulator/scandata/20210104_tim781s_sopas_et_binary_monitoring.pcapng.json (35 MB)
Error downloading object: test/emulator/scandata/20210104_tim781s_sopas_et_binary_monitoring.pcapng.json (f03f0a6): Smudge error: Error downloading test/emulator/scandata/20210104_tim781s_sopas_et_binary_monitoring.pcapng.json (f03f0a6388ba3b22d25aca1aef5459018b7505fdffb3c7e8f4757899d2917107): [f03f0a6388ba3b22d25aca1aef5459018b7505fdffb3c7e8f4757899d2917107] Object does not exist on the server: [404] Object does not exist on the server

Errors logged to /Users/rasmus/Downloads/source_builds/sick_scan_xd/.git/lfs/logs/20211109T173434.945286.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: test/emulator/scandata/20210104_tim781s_sopas_et_binary_monitoring.pcapng.json: smudge filter lfs failed
17:34:40: >sick_scan_xd > git lfs logs last
git-lfs/3.0.1 (GitHub; darwin amd64; go 1.17.1)
git version 2.28.0

$ git-lfs filter-process
Error downloading object: test/emulator/scandata/20210104_tim781s_sopas_et_binary_monitoring.pcapng.json (f03f0a6): Smudge error: Error downloading test/emulator/scandata/20210104_tim781s_sopas_et_binary_monitoring.pcapng.json (f03f0a6388ba3b22d25aca1aef5459018b7505fdffb3c7e8f4757899d2917107): [f03f0a6388ba3b22d25aca1aef5459018b7505fdffb3c7e8f4757899d2917107] Object does not exist on the server: [404] Object does not exist on the server

[404] Object does not exist on the server
[f03f0a6388ba3b22d25aca1aef5459018b7505fdffb3c7e8f4757899d2917107] Object does not exist on the server
github.com/git-lfs/git-lfs/v3/errors.newWrappedError
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/errors/types.go:225
github.com/git-lfs/git-lfs/v3/errors.Wrapf
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/errors/errors.go:85
github.com/git-lfs/git-lfs/v3/tq.(*TransferQueue).enqueueAndCollectRetriesFor
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/tq/transfer_queue.go:614
github.com/git-lfs/git-lfs/v3/tq.(*TransferQueue).collectBatches.func1
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/tq/transfer_queue.go:452
runtime.goexit
	go/src/runtime/asm_amd64.s:1581
Error downloading test/emulator/scandata/20210104_tim781s_sopas_et_binary_monitoring.pcapng.json (f03f0a6388ba3b22d25aca1aef5459018b7505fdffb3c7e8f4757899d2917107)
github.com/git-lfs/git-lfs/v3/errors.newWrappedError
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/errors/types.go:225
github.com/git-lfs/git-lfs/v3/errors.Wrapf
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/errors/errors.go:85
github.com/git-lfs/git-lfs/v3/lfs.(*GitFilter).downloadFile
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/lfs/gitfilter_smudge.go:119
github.com/git-lfs/git-lfs/v3/lfs.(*GitFilter).Smudge
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/lfs/gitfilter_smudge.go:78
github.com/git-lfs/git-lfs/v3/commands.smudge
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/commands/command_smudge.go:127
github.com/git-lfs/git-lfs/v3/commands.filterCommand
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/commands/command_filter_process.go:122
github.com/spf13/cobra.(*Command).execute
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:766
github.com/spf13/cobra.(*Command).ExecuteC
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:852
github.com/spf13/cobra.(*Command).Execute
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:800
github.com/git-lfs/git-lfs/v3/commands.Run
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/commands/run.go:105
main.main
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/git-lfs.go:33
runtime.main
	go/src/runtime/proc.go:255
runtime.goexit
	go/src/runtime/asm_amd64.s:1581
Smudge error
github.com/git-lfs/git-lfs/v3/errors.newWrappedError
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/errors/types.go:225
github.com/git-lfs/git-lfs/v3/errors.NewSmudgeError
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/errors/types.go:311
github.com/git-lfs/git-lfs/v3/lfs.(*GitFilter).Smudge
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/lfs/gitfilter_smudge.go:87
github.com/git-lfs/git-lfs/v3/commands.smudge
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/commands/command_smudge.go:127
github.com/git-lfs/git-lfs/v3/commands.filterCommand
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/commands/command_filter_process.go:122
github.com/spf13/cobra.(*Command).execute
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:766
github.com/spf13/cobra.(*Command).ExecuteC
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:852
github.com/spf13/cobra.(*Command).Execute
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:800
github.com/git-lfs/git-lfs/v3/commands.Run
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/commands/run.go:105
main.main
	/private/tmp/git-lfs-20210929-19227-1o9n83i/git-lfs-3.0.1/src/github.com/git-lfs/git-lfs/git-lfs.go:33
runtime.main
	go/src/runtime/proc.go:255
runtime.goexit
	go/src/runtime/asm_amd64.s:1581

Current time in UTC:
2021-11-09 16:34:34

ENV:
LocalWorkingDir=/Users/rasmus/Downloads/source_builds/sick_scan_xd
LocalGitDir=/Users/rasmus/Downloads/source_builds/sick_scan_xd/.git
LocalGitStorageDir=/Users/rasmus/Downloads/source_builds/sick_scan_xd/.git
LocalMediaDir=/Users/rasmus/Downloads/source_builds/sick_scan_xd/.git/lfs/objects
LocalReferenceDirs=
TempDir=/Users/rasmus/Downloads/source_builds/sick_scan_xd/.git/lfs/tmp
ConcurrentTransfers=8
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=/Users/rasmus/Downloads/source_builds/sick_scan_xd/.git/lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic,lfs-standalone-file,ssh
UploadTransfers=basic,lfs-standalone-file,ssh
GIT_PREFIX=
GIT_EXEC_PATH=/usr/local/Cellar/git/2.28.0/libexec/git-core

Client IP addresses:
fe80::aede:48ff:fe00:1122
fe80::1870:3fce:6f77:e358 192.168.95.139
fe80::cff:ccff:fe27:3db4
fe80::cff:ccff:fe27:3db4
fe80::703:88e3:dcb4:8f49
fe80::f4b:c88a:32c5:3dfa
fe80::c277:b043:61aa:d569
fe80::c5f9:848d:6872:5130

Timestamps laserscan messages

The timestamps in the header of pointcloud messages (i.e. msg.header.stamp of ros::sensor_msgs::PointCloud2 messages) are lidar ticks converted to ros-time using a software pll. The timestamp in the header of laserscan messages (msg.header.stamp of ros::sensor_msgs::LaserScan messages) ist the ros-time when receive the telegram. The timestamp of the laserscan messages should be identical to the timestamp of pointcloud messages.

Regression between old sick_scan2 and new sick_scan_xd driver

I am running the LMS511 and when running it with the older sick_scan2 driver and an min/max angle of 95° the points are perfectly straight, whereas when using this new sick_scan_xd driver the points when using a min/max angle of 95° are 5° rotated clockwise. See attached screenshots when using the sick_scan_xd driver. Is this intended behaviour or a regression?
90°
Screenshot from 2022-03-29 12-07-46
95°
Screenshot from 2022-03-29 12-09-09

LDMRS spinning problem

Running sick_scan_xd with LDMRS by roslaunch sick_scan sick_ldmrs.launch hostname:=192.168.4.161 terminates with the following message:

[ INFO] [1651066466.978342554]: sick_ldmrs_driver is initialized.
[ INFO] [1651066466.978387027]: LDMRS initialized.
[FATAL] [1651066466.978417292]: SingleThreadedSpinner: Attempt to spin a callback queue from two spinners, one of them being single-threaded. You might want to use a MultiThreadedSpinner instead.
terminate called after throwing an instance of 'std::runtime_error'
what():  SingleThreadedSpinner: Attempt to spin a callback queue from two spinners, one of them being single-threaded. You might want to use a MultiThreadedSpinner instead.

Can see topic when using ros2 topic list, but can't echo it over the network?

I have two computers(Ubuntu 20.04) in the same network with ROS_DOMAIN_ID=1 and I'm publishing the pointcloud from the lms511 sensor on the topic /cloud. The driver is running on the PC=A and I want to show the clouds on PC=B. Now when I ros2 topic echo /cloud on PC=A I receive the msgs as normal. When I ros2 topic list on PC=B I see the cloud topic. I only see it after setting the ROS_DOMAIN_ID=1 to make sure no prior topic with that name is available. So far so good, but now when I try to ros2 topic echo /cloud on PC=B I get nothing. Any idea why this could be? In my understanding the msgs are arriving, as shown by ros2 topic echo /cloud on PC=A and I can see them on PC=B shown by ros2 topic list. Funny enough ros2 topic info /cloud works fine and tells me that the publisher and subscriber count at 1 and 2 respectively. Also running the ros2 run demo_nodes_cpp talker demo on PC=A and ros2 run demo_nodes_cpp listener demo on PC=B works as intended. Is it maybe because the sensor is UDP and the demo listener is tcp?

LMS_5xx -- Unable to set ang_res and scan_freq parameters

I am using the bottom launch file and I am trying to change the frequency of the (LMS5xx](https://www.sick.com/ag/en/detection-and-ranging-solutions/2d-lidar-sensors/lms5xx/c/g179651).
By default the frequency is set to 75Hz and the angular resolution is 0.5. By using the sopas engineering tool I was able to change the frequency to 100 Hz and 0.6667 resolution. I would like to achieve the same result using the bottom ros launch file.
I tried to add the following lines but the scanner fail to start and the connection is closed.

    <param name="scan_freq" type="double" value="100" />
    <param name="ang_res" type="double" value="0.6667" /> 

Do u know the reason? Is it related to the client authorization mode?

Here is a copy of the error given by the scanner.

[WARN] [1653062061.401602180] [sick_scan]: Error Sopas answer mismatch: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0023>sMN mLMPsetscancfg 0x00 0x01 0x66 ..., received answer: "sFA\x00\x08", expected patterns: "sAN mLMPsetscancfg","sMA mLMPsetscancfg"
[WARN] [1653062066.401703512] [sick_scan]: Timeout during waiting for new datagram
[WARN] [1653062066.401847345] [sick_scan]: Error Sopas answer mismatch: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0023>sMN mLMPsetscancfg 0x00 0x01 0x66 ..., received answer: "", expected patterns: "sAN mLMPsetscancfg","sMA mLMPsetscancfg"
[ERROR] [1653062066.401909063] [sick_scan]: Error unexpected Sopas answer for request <STX><STX><STX><STX><Len=0023>sMN mLMPsetscancfg 0x00 0x01 0x66 ..., giving up after 1 unexpected answers.
[INFO] [1653062066.401968416] [sick_scan]: Failed to init scanner Error Code: 1
Waiting for timeout...
If the communication mode set in the scanner memory is different from that used by the driver, the scanner's communication mode is changed.
This requires a restart of the TCP-IP connection, which can extend the start time by up to 30 seconds. There are two ways to prevent this:
1. [Recommended] Set the communication mode with the SOPAS ET software to binary and save this setting in the scanner's EEPROM.
2. Use the parameter "use_binary_protocol" to overwrite the default settings of the driver.
[ERROR] [1653062066.402019539] [sick_scan]: ## ERROR in mainGenericLaser: init failed, retrying...
[INFO] [1653062066.402036507] [sick_scan]: Start initialising scanner [Ip: 192.168.124.101] [Port:2112]
[WARN] [1653062066.402047895] [sick_scan]: Disconnecting TCP-Connection.
[ERROR] [1653062066.402321353] [sick_scan]: Tcp::readInputData: Read 0 bytes, connection is lost!
[INFO] [1653062066.402400972] [sick_scan]: SickThread TcpRecvThread finished (flags: threadShouldRun=0, endThread=0).
sick_scan driver closed.
terminate called after throwing an instance of 'rclcpp::exceptions::ParameterAlreadyDeclaredException'
  what():  parameter 'diagnostic_updater.period' has already been declared

Here there is the launch file that I am using.

<launch>
    <arg name="hostname" default="192.168.124.101"/>
    <arg name="sw_pll_only_publish" default="true"/>
    <!-- launch file for the lms_5xx series -->
    <node name="sick_lms_5xx" pkg="sick_scan" type="sick_generic_caller" respawn="false" output="screen" required="true">
        <!-- launch-prefix="gdb -ex run - -args" -->

        <!-- default values: -->
        <!--
          <param name="min_ang" type="double" value="-1.658062789" />
          <param name="max_ang" type="double" value="1.658062789" />
          <param name="intensity" type="bool" value="True" />
          <param name="skip" type="int" value="0" />
          <param name="time_offset" type="double" value="-0.001" />
          <param name="publish_datagram" type="bool" value="False" />
          <param name="subscribe_datagram" type="bool" value="false" />
          <param name="device_number" type="int" value="0" />
          <param name="range_min" type="double" value="0.05" />
        -->
        <param name="frame_id" type="str" value="L1"/>
        <param name="scanner_type" type="string" value="sick_lms_5xx"/>
        <!-- -45 deg -->
        <param name="min_ang" type="double" value="-0.785398163"/>
        <!-- 45 deg -->
        <param name="max_ang" type="double" value="0.785398163"/>
        <param name="range_max" type="double" value="4.0"/>
        <param name="range_min" type="double" value="0.16"/>
        <param name="intensity" type="bool" value="true"/>
        <param name="intensity_resolution_16bit" type="bool" value="false"/>
        <param name="hostname" type="string" value="$(arg hostname)"/>
        <param name="port" type="string" value="2112"/>
        <!--<param name="timelimit" type="int" value="5"/>-->
        <param name="use_binary_protocol" type="bool" value="true"/>
        <param name="sw_pll_only_publish" type="bool" value="$(arg sw_pll_only_publish)"/>
        <param name="min_intensity" type="double" value="0.0"/> <!-- Set range of LaserScan messages to infinity, if intensity < min_intensity (default: 0) -->
        <!-- possible angular resolutions are 1,0.6667,0.5,0.3333,0.25,0.1667
         possible scan frequencies are 25,35,50,75,100 Hz
         Make sure to check in the manual whether the desired scanning frequency
         and angular resolution combination is available.
         The parameters scan_freq and ang_res must always be used together.
        -->
	      
        <param name="scan_freq" type="double" value="100" />
        <param name="ang_res" type="double" value="0.6667" /> 
      
        <param name="start_services" type="bool" value="True"/> <!-- start ros service for cola commands -->
        <param name="activate_lferec" type="bool" value="True"/> <!-- activate field monitoring by lferec messages -->
        <param name="activate_lidoutputstate" type="bool" value="True"/> <!-- activate field monitoring by lidoutputstate messages -->
        <param name="activate_lidinputstate" type="bool" value="True"/> <!-- activate field monitoring by lidinputstate messages -->

        <param name="message_monitoring_enabled" type="bool" value="True" />      <!-- Enable message monitoring with reconnect+reinit in case of timeouts, default: true -->
        <param name="read_timeout_millisec_default" type="int" value="5000"/>     <!-- 5 sec read timeout in operational mode (measurement mode), default: 5000 milliseconds -->
        <param name="read_timeout_millisec_startup" type="int" value="120000"/>   <!-- 120 sec read timeout during startup (sensor may be starting up, which can take up to 120 sec.), default: 120000 milliseconds -->
        <param name="read_timeout_millisec_kill_node" type="int" value="150000"/> <!-- 150 sec pointcloud timeout, ros node will be killed if no point cloud published within the last 150 sec., default: 150000 milliseconds -->
        <param name="client_authorization_pw" type="string" value="F4724744"/>    <!-- Default password for client authorization -->

    </node>
</launch>

LMS511 configuration

The configuration of min/max angles in the LMS511 launchfile currently causes an additional rotation of the scans. The configuration of min/max angles in the LMS511 launchfile is removed to prevent unexpected results.

FREchoFilter bug for LD-LRS36xx

Setup:
Built and ran the sick_scan_xd driver for LD-LRS36xx scanner. Linux/ROS2

Error:
When running the launcher:
ros2 run sick_scan sick_generic_caller ./sick_scan_xd_ws/src/sick_scan_xd/launch/sick_lrs_36x1.launch
Had the following error message:

[INFO] [1638475316.716544632] [sick_scan]: Sending  : <STX><STX><STX><STX><Len=0018>sWN FREchoFilter 0x00 CRC:<0x7f>

[INFO] [1638475316.720468128] [sick_scan]: Receiving: <STX>sFA\x00\x03<ETX>

[ERROR] [1638475316.720602519] [sick_scan]: Error Sopas answer mismatch Error unexpected Sopas Answer for request <STX><STX><STX><STX><Len=0018>sWN FREchoFilter 0x00 CRC:<0x7f>Answer= >>>sFA\x00\x03<<<

Reason:

LD-LRS36xx doesn't have the Set echo filter. See 4.5.6 section

(technical_information_telegram_listing_ranging_sensors_lms1xx_lms5xx_tim2xx_tim5xx_tim7xx_lms1000_mrs1000_mrs6000_nav310_ld_oem15xx_ld_lrs36xx_lms4000_en_im0045927.pdf)

Solution:

sick_scan_common.cpp, line 2697 ->

change if(true) to if(false)

Error after SOPAS command SetAccessMode

The driver restarts due to timeout after entering SOPAS command SetAccessMode:

rosservice call /sick_tim_7xx/ColaMsg "{request: 'sMN SetAccessMode 3 F4724744'}"

Subsequent SOPAS commands like sWN LFPparticle result in error messages.

issue_screenshot_1
issue_screenshot_2

Run sick_scan from launch-file

Hello!
I got a small problem when trying to launch the sick_scan from a launch file. I just don't get the right syntax, maybe you can help me out.

I try to run this command from a python launch file in ros2 (foxy) (the command works)

ros2 run sick_scan sick_generic_caller ./../src/sick_scan_xd/launch/sick_lms_5xx.launch

And my approach was this (just the important snippet):

laserscan_lms511 = Node(
            package='sick_scan',
            executable='sick_generic_caller',
            arguments=['./../src/sick_scan_xd/launch/sick_lms_5xx.launch'],
)

Unfortunately, this does not work.
I really appreciate any help you can provide.

Building sick_scan for ROS2 fails to find the diagnostic_updater

When trying to build the sick_scan_xd package as described in the readme it fails to find the diagnostic_updater package:

In file included from /home/username/ros2_rolling/src/sick_scan_xd/driver/src/sick_generic_imu.cpp:66:
/home/username/ros2_rolling/src/sick_scan_xd/include/sick_scan/sick_ros_wrapper.h:342:10: fatal error: diagnostic_updater/diagnostic_updater.hpp: No such file or directory
  342 | #include <diagnostic_updater/diagnostic_updater.hpp> // part of diagnostic_msgs of ROS2, not available on ROS2-Windows until foxy patch 4
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Looking at the file sick_ros_wrapper.h something seems to be off, because the comment above the code doesn't agree with the code.

/*
** dynamic reconfiguration and diagnostic_updater currently supported on ROS-1 only, todo...
*/
#if __ROS_VERSION == 2 // ROS 2
#ifndef WIN32
#include <diagnostic_updater/diagnostic_updater.hpp> // part of diagnostic_msgs of ROS2, not available on ROS2-Windows until foxy patch 4
#include <diagnostic_updater/publisher.hpp>
#include <rcl_interfaces/msg/set_parameters_result.hpp>
#define USE_DYNAMIC_RECONFIGURE
#define USE_DIAGNOSTIC_UPDATER

So if the dynamic reconfiguration and diagnostic_updater are only supported in ROS-1 it should check if the version is 1? Is that correct?

Build Error: Issue with "diagnostic_updater"

I get the following errors when I build on Linux (Ubuntu 20.04) ROS2 (Foxy Fitzroy). Would you please help me with that? Thanks!

[ 76%] Building CXX object CMakeFiles/sick_scan_shared_lib.dir/roswrap/src/launchparser/launchparser.cpp.o
In file included from /root/dev_ws/src/sick_scan_xd/roswrap/src/launchparser/launchparser.cpp:7:
/root/dev_ws/src/sick_scan_xd/include/sick_scan/sick_ros_wrapper.h:357:10: fatal error: diagnostic_updater/diagnostic_updater.hpp: No such file or directory
  357 | #include <diagnostic_updater/diagnostic_updater.hpp> // part of diagnostic_msgs of ROS2, not available on ROS2-Windows until foxy patch 4
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/sick_scan_lib.dir/build.make:89: CMakeFiles/sick_scan_lib.dir/roswrap/src/launchparser/launchparser.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.