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

Which ROS 2 driver package to use and develop #44

Closed
Yadunund opened this issue Jun 17, 2022 · 4 comments
Closed

Which ROS 2 driver package to use and develop #44

Yadunund opened this issue Jun 17, 2022 · 4 comments

Comments

@Yadunund
Copy link

Yadunund commented Jun 17, 2022

Hi @michael1309 and @puck-fzi,

I'm trying to get a better understanding of the driver packages hosted by SICKAG. There are some features like ROS 2 Composition, dynamic parameter reconfiguration ,etc that I would like to implement but unclear which package to target.

Based on the discussion here, the goal was to move the pure C++ library to sick_scan_base and merge this repo back into sick_scan. But it looks like sick_scan_base still has some ROS 1 dependencies and the merge has not happened.

I started using using this package but ran into some memory leak issues that seem to be addressed back in sick_scan_base but not here.

But from this latest comment, I learnt that the actively maintained driver package is now sick_scan_xd. So I tried building sick_scan_xd with the command colcon build --packages-select sick_scan --cmake-args " -DROS_VERSION=2" " -DLDMRS=0" --event-handlers console_direct+ as specified inthe README, but I run into the error below.

/home/yadu/ws_sick/src/sick_scan_xd/driver/src/sick_scan_common.cpp: In member function ‘virtual int sick_scan::SickScanCommon::init_scanner(rosNodePtr)’:
/home/yadu/ws_sick/src/sick_scan_xd/driver/src/sick_scan_common.cpp:2971:17: error: ‘ROS_INFO’ was not declared in this scope
 2971 |                 ROS_INFO("Prepare mLMPsetscancfg: Start Angle in 10000th deg in lidar notation: %10d", start_angle_in_10000th);

It looks like both the ROS 1 and ROS 2 library include the sick_scan_common.cpp translation unit (referring to the CMakeLists.txt file) but this logging implementation includes ROS 1 functions. Hence the compiler error above. It is also unclear if the memory leak issue is resolved in this package.

Lastly I came across the sick_safetyscanners2 package which has a much cleaner implementation of a ROS 2 node along with Lifecycle support. But it has its own sick_safescanners2_base package and does not not support the TIM range or laser scanners?

So I would like to know which package should I be using and developing off of?

It seems like it would be ideal if there is a pure C++ only "base" package and a second package for ROS drivers with ROS 1 and ROS 2 branches offering support for both TIM and other types of laser scanners. This way everyone can benefit from performance improvements and new features?

I'm looking forward to hearing from you. Thanks in advance.

@michael1309
Copy link
Collaborator

From my point of view, for use for ROS1 and ROS2 (and also for generic C++ use), I would use the
https://github.com/SICKAG/sick_scan_xd
repository for the TiM.
We will investigate the problem you reported and in all likelihood fix it on Monday, June 20 (i.e. tomorrow).

Can you write briefly which ROS2 release you have used?

@lenpuc
Copy link

lenpuc commented Jun 19, 2022

Hi, as Michael already stated, for the TiM you should use the sick_scan repositories.
The sick_safetyscanners2 package targets a different group of sick laserscanners from the microScan3 family, each repository should contain the supported scanners in their according readme.

@rostest
Copy link
Collaborator

rostest commented Jun 20, 2022

The ROS_INFO error is now fixed by the latest sick_scan_xd release 2.6.8 in https://github.com/SICKAG/sick_scan_xd.

@Yadunund
Copy link
Author

Hi all,

Thank you very much for the informative responses. Really appreciate it. I will target sick_scan_xd as recommended.

I was building the driver with foxy installed from binaries. I can confirm that the build is successful now. I was having some runtime issues but I'll test a bit more and open a separate ticket if necessary.

Thanks again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants