Quellcode durchsuchen

为了适配colcon编译,添加install

fujiankuan vor 3 Jahren
Ursprung
Commit
76f149f7f9

+ 6 - 0
src/ros/open_source_code/NAV992_GNSS_INS/CMakeLists.txt

@@ -202,3 +202,9 @@ include_directories(
 #########################
 add_executable(nav992_driver src/nav992_driver.cpp src/gsof_records.c src/gsof_packet_protocol.c src/struct_endian.c src/struct_pack_unpack.c src/rs232/rs232.c)
 target_link_libraries(nav992_driver ${catkin_LIBRARIES})
+install(
+  TARGETS nav992_driver
+  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
+)

+ 7 - 0
src/ros/open_source_code/rslidar_sdk/CMakeLists.txt

@@ -162,3 +162,10 @@ if(rclcpp_FOUND AND ${COMPILE_METHOD} STREQUAL "COLCON")
   )
   ament_package()
 endif(rclcpp_FOUND AND ${COMPILE_METHOD} STREQUAL "COLCON")
+
+install(
+  TARGETS rslidar_sdk_node
+  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
+)

+ 1 - 1
src/ros/open_source_code/rslidar_sdk/src/msg/proto_msg_translator.h

@@ -80,7 +80,7 @@ inline LidarPointCloudMsg toRsMsg(const proto_msg::LidarPointCloud& proto_msg)
     point.y = proto_msg.data(i + 1);
     point.z = proto_msg.data(i + 2);
     point.intensity = proto_msg.data(i + 3);
-    if ((!std::isnan(point.x)) && (!std::isnan(point.y)) && (!std::isnan(point.z)))  // 20220221
+    //if ((!std::isnan(point.x)) && (!std::isnan(point.y)) && (!std::isnan(point.z)))  // 20220221
     	ptr_tmp->push_back(point);
   }
   ptr_tmp->height = proto_msg.height();