joonr7 / HesaiLidar_General_ROS2

ROS2 driver for PandarXT PandarQT Pandar64 Pandar40P Pandar40M Pandar20A Pandar20B
Apache License 2.0
4 stars 4 forks source link

When I operate "colcon build",there is a error "The following variables are used in this project, but they are set to NOTFOUND" #6

Open NJUSTzwh opened 1 year ago

NJUSTzwh commented 1 year ago

I want to know the author's cmake version

ngnearSINE commented 1 year ago

I solved this problem by replacing _1, _2, _3 in [pandarGeneral_internal.cc] by boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3.

similary, replace boost::lambda_1, boost::lambda_2,_3 in main.cc by boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3.

And package dependency for image_transport and pcl_conversions in CMakeLists.txt. And modify find_package(Boost REQUIRED) to find_package(Boost REQUIRED COMPONENTS thread). And add Boost::thread to target_link_libraries.

Now you can go deal with it.

And launch the example by 'ros2 launch hesai_lidar hesai_lidar_launch.py', not 'roslaunch hesai_lidar hesai_lidar_launch.py'. It's a ROS1 launch style.

And if you are using ROS2 after Galactic, you should modify launch file. just remove 'node_' in Node() arguments.