Skip to content

Commit

Permalink
Merge pull request #30 from christianrauch/resolve_topic
Browse files Browse the repository at this point in the history
resolve topic name before applying the image transport suffix
  • Loading branch information
christianrauch authored Mar 21, 2024
2 parents 21d1849 + bc71089 commit 6ec122f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/AprilTagNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ AprilTagNode::AprilTagNode(const rclcpp::NodeOptions& options)
cb_parameter(add_on_set_parameters_callback(std::bind(&AprilTagNode::onParameter, this, std::placeholders::_1))),
td(apriltag_detector_create()),
// topics
sub_cam(image_transport::create_camera_subscription(this, "image_rect", std::bind(&AprilTagNode::onCamera, this, std::placeholders::_1, std::placeholders::_2), declare_parameter("image_transport", "raw", descr({}, true)), rmw_qos_profile_sensor_data)),
sub_cam(image_transport::create_camera_subscription(
this,
this->get_node_topics_interface()->resolve_topic_name("image_rect"),
std::bind(&AprilTagNode::onCamera, this, std::placeholders::_1, std::placeholders::_2),
declare_parameter("image_transport", "raw", descr({}, true)),
rmw_qos_profile_sensor_data)),
pub_detections(create_publisher<apriltag_msgs::msg::AprilTagDetectionArray>("detections", rclcpp::QoS(1))),
tf_broadcaster(this)
{
Expand Down

0 comments on commit 6ec122f

Please sign in to comment.