Initial fix of the lidar upgrade to Lyrical. Not yet tested.
This commit is contained in:
1 parent
46f7cbb8b5
commit
c9144028f8
8 files changed
+480
-81
No files matched your search
@@ -1,3 +1,101 @@
|
||||
diff --git a/COLCON_IGNORE b/COLCON_IGNORE
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 75e0b30..5375a4a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -61,27 +61,44 @@ endif()
|
||||
find_package(PythonLibs REQUIRED) # Consider using Pybind11 for ROS2
|
||||
find_path(MATPLOTLIB_CPP_INCLUDE_DIRS "matplotlibcpp.h")
|
||||
|
||||
+find_package(PCL REQUIRED COMPONENTS common io filters)
|
||||
+
|
||||
include_directories(
|
||||
include
|
||||
${EIGEN3_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
+ ${PCL_INCLUDE_DIRS}
|
||||
)
|
||||
+link_directories(${PCL_LIBRARY_DIRS})
|
||||
+add_definitions(${PCL_DEFINITIONS})
|
||||
|
||||
# Declare a ROS2 executable
|
||||
add_executable(pointlio_mapping src/laserMapping.cpp include/ikd-Tree/ikd_Tree.cpp src/parameters.cpp src/preprocess.cpp src/Estimator.cpp)
|
||||
-ament_target_dependencies(pointlio_mapping
|
||||
- rclcpp
|
||||
- rclpy
|
||||
- geometry_msgs
|
||||
- nav_msgs
|
||||
- sensor_msgs
|
||||
- pcl_ros
|
||||
- pcl_conversions
|
||||
- tf2_ros
|
||||
- visualization_msgs
|
||||
- # livox_ros_driver2
|
||||
-)
|
||||
-target_link_libraries(pointlio_mapping ${PYTHON_LIBRARIES})
|
||||
+if(COMMAND ament_target_dependencies)
|
||||
+ ament_target_dependencies(pointlio_mapping
|
||||
+ rclcpp
|
||||
+ rclpy
|
||||
+ geometry_msgs
|
||||
+ nav_msgs
|
||||
+ sensor_msgs
|
||||
+ pcl_ros
|
||||
+ pcl_conversions
|
||||
+ tf2_ros
|
||||
+ visualization_msgs
|
||||
+ # livox_ros_driver2
|
||||
+ )
|
||||
+else()
|
||||
+ target_link_libraries(pointlio_mapping
|
||||
+ rclcpp::rclcpp
|
||||
+ geometry_msgs::geometry_msgs
|
||||
+ nav_msgs::nav_msgs
|
||||
+ sensor_msgs::sensor_msgs
|
||||
+ pcl_conversions::pcl_conversions
|
||||
+ tf2_ros::tf2_ros
|
||||
+ visualization_msgs::visualization_msgs
|
||||
+ )
|
||||
+endif()
|
||||
+target_link_libraries(pointlio_mapping ${PYTHON_LIBRARIES} ${PCL_LIBRARIES})
|
||||
target_include_directories(pointlio_mapping PRIVATE ${PYTHON_INCLUDE_DIRS})
|
||||
|
||||
# Install the executable
|
||||
diff --git a/include/common_lib.h b/include/common_lib.h
|
||||
index a3ef8e5..96beb41 100644
|
||||
--- a/include/common_lib.h
|
||||
+++ b/include/common_lib.h
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <pcl/point_cloud.h>
|
||||
#include <sensor_msgs/msg/imu.hpp>
|
||||
#include <nav_msgs/msg/odometry.hpp>
|
||||
-#include <tf2_ros/transform_broadcaster.h>
|
||||
+#include <tf2_ros/transform_broadcaster.hpp>
|
||||
#include <deque>
|
||||
using namespace std;
|
||||
using namespace Eigen;
|
||||
diff --git a/src/IMU_Processing.hpp b/src/IMU_Processing.hpp
|
||||
index 898a451..1a7a0a7 100644
|
||||
--- a/src/IMU_Processing.hpp
|
||||
+++ b/src/IMU_Processing.hpp
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <nav_msgs/msg/odometry.hpp>
|
||||
#include <pcl/common/transforms.h>
|
||||
#include <pcl/kdtree/kdtree_flann.h>
|
||||
-#include <tf2_ros/transform_broadcaster.h>
|
||||
+#include <tf2_ros/transform_broadcaster.hpp>
|
||||
#include <pcl_conversions/pcl_conversions.h>
|
||||
#include <sensor_msgs/msg/imu.hpp>
|
||||
#include <sensor_msgs/msg/point_cloud2.hpp>
|
||||
diff --git a/src/laserMapping.cpp b/src/laserMapping.cpp
|
||||
index b6d5f4a..2d5bebc 100644
|
||||
--- a/src/laserMapping.cpp
|
||||
+++ b/src/laserMapping.cpp
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <pcl/filters/voxel_grid.h>
|
||||
#include <pcl/io/pcd_io.h>
|
||||
#include <sensor_msgs/msg/point_cloud2.hpp>
|
||||
-#include <tf2_ros/transform_broadcaster.h>
|
||||
+#include <tf2_ros/transform_broadcaster.hpp>
|
||||
#include <geometry_msgs/msg/vector3.hpp>
|
||||
// #include <livox_ros_driver2/msg/custom_msg.hpp>
|
||||
|
||||
Reference in new issue
Block a user