new camera calibraction fix
This commit is contained in:
@@ -8,7 +8,6 @@ endif()
|
|||||||
# Find dependencies
|
# Find dependencies
|
||||||
find_package(ament_cmake REQUIRED)
|
find_package(ament_cmake REQUIRED)
|
||||||
find_package(rclcpp REQUIRED)
|
find_package(rclcpp REQUIRED)
|
||||||
find_package(rclcpp_components REQUIRED)
|
|
||||||
find_package(std_msgs REQUIRED)
|
find_package(std_msgs REQUIRED)
|
||||||
find_package(sensor_msgs REQUIRED)
|
find_package(sensor_msgs REQUIRED)
|
||||||
find_package(image_transport REQUIRED)
|
find_package(image_transport REQUIRED)
|
||||||
@@ -23,7 +22,7 @@ include_directories(
|
|||||||
${EIGEN3_INCLUDE_DIRS}
|
${EIGEN3_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Node library
|
# Node library - without rclcpp_components registration
|
||||||
add_library(camera_calibration_lib SHARED
|
add_library(camera_calibration_lib SHARED
|
||||||
src/calibration_node.cpp
|
src/calibration_node.cpp
|
||||||
)
|
)
|
||||||
@@ -39,13 +38,21 @@ ament_target_dependencies(camera_calibration_lib
|
|||||||
rm_interfaces
|
rm_interfaces
|
||||||
)
|
)
|
||||||
|
|
||||||
# Component library for component container
|
# Create executable directly instead of using component registration
|
||||||
rclcpp_components_register_node(camera_calibration_lib
|
add_executable(camera_calibration_node src/calibration_node.cpp)
|
||||||
PLUGIN "camera_calibration::CalibrationNode"
|
ament_target_dependencies(camera_calibration_node
|
||||||
EXECUTABLE camera_calibration_node
|
rclcpp
|
||||||
|
std_msgs
|
||||||
|
sensor_msgs
|
||||||
|
image_transport
|
||||||
|
cv_bridge
|
||||||
|
OpenCV
|
||||||
|
Eigen3
|
||||||
|
rm_interfaces
|
||||||
)
|
)
|
||||||
|
target_link_libraries(camera_calibration_node camera_calibration_lib)
|
||||||
|
|
||||||
install(TARGETS camera_calibration_lib
|
install(TARGETS camera_calibration_lib camera_calibration_node
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
RUNTIME DESTINATION lib
|
RUNTIME DESTINATION lib
|
||||||
|
|||||||
@@ -488,6 +488,11 @@ cv::Mat CalibrationNode::drawCalibrationResults(const cv::Mat& image,
|
|||||||
|
|
||||||
} // namespace camera_calibration
|
} // namespace camera_calibration
|
||||||
|
|
||||||
#include "rclcpp_components/register_node_macro.hpp"
|
int main(int argc, char** argv) {
|
||||||
|
rclcpp::init(argc, argv);
|
||||||
RCLCPP_COMPONENTS_REGISTER_NODE(camera_calibration::CalibrationNode)
|
rclcpp::NodeOptions options;
|
||||||
|
auto node = std::make_shared<camera_calibration::CalibrationNode>(options);
|
||||||
|
rclcpp::spin(node->get_node_base_interface());
|
||||||
|
rclcpp::shutdown();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user