PepperlFuchs / pf_lidar_ros_driver

ROS driver for Pepperl+Fuchs R2000 and R2300 laser scanners
https://www.pepperl-fuchs.com/global/en/23097.htm
Apache License 2.0
37 stars 37 forks source link

Scan config, scan params and handle info are shared_ptrs #75

Closed hsd-dev closed 2 years ago

hsd-dev commented 2 years ago

The current implement was quite ugly in the way it handled the getting and setting device configuration, which could be done from more than one class. The PR introduces them as shared_ptr which cleans up a lot of unnecessary code.

hsd-dev commented 2 years ago

The mutex introduced in https://github.com/PepperlFuchs/pf_lidar_ros_driver/pull/75/commits/c303f088f7eda7f3c342765500ccd243ed33edd1 blocks changes to device configuration until the current scan cycle is completed. For R2000 this means all the packets for the current scan are received. For R2300 it means that all the active layers are received.

hsd-dev commented 2 years ago

Not merging this yet since R2300 is having a deadlock very occasionally while dynamically reconfiguring layers_on

hsd-dev commented 2 years ago

Merging this as the intended functionality is achieved. Will add fix to https://github.com/PepperlFuchs/pf_lidar_ros_driver/pull/75#issuecomment-1122216816 in https://github.com/PepperlFuchs/pf_lidar_ros_driver/pull/77