Skip to content

Commit

Permalink
resolve topic name before applying the image transport suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrauch committed Mar 16, 2024
1 parent 21d1849 commit bc71089
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 bc71089

Please sign in to comment.