Skip to content

Commit

Permalink
Add additional lifecycle constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayman committed Oct 20, 2021
1 parent 152f769 commit 8524ee9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <string>

#include "rclcpp/node.hpp"
#include "rclcpp_lifecycle/lifecycle_node.hpp"
#include "sensor_msgs/msg/camera_info.hpp"
#include "sensor_msgs/srv/set_camera_info.hpp"
#include "camera_info_manager/visibility_control.h"
Expand Down Expand Up @@ -187,6 +188,12 @@ class CameraInfoManager
const std::string & cname = "camera",
const std::string & url = "");

CAMERA_INFO_MANAGER_PUBLIC
CameraInfoManager(
rclcpp_lifecycle::LifecycleNode * node,
const std::string & cname = "camera",
const std::string & url = "");

CAMERA_INFO_MANAGER_PUBLIC
CameraInfoManager(
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_base_interface,
Expand Down
8 changes: 8 additions & 0 deletions camera_info_manager/src/camera_info_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ CameraInfoManager::CameraInfoManager(
{
}

CameraInfoManager::CameraInfoManager(
rclcpp_lifecycle::LifecycleNode * node,
const std::string & cname, const std::string & url)
: CameraInfoManager(node->get_node_base_interface(),
node->get_node_services_interface(), node->get_node_logging_interface(), cname, url)
{
}

CameraInfoManager::CameraInfoManager(
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_base_interface,
rclcpp::node_interfaces::NodeServicesInterface::SharedPtr node_services_interface,
Expand Down

0 comments on commit 8524ee9

Please sign in to comment.