diff --git a/mrpt_sensor_gnss_nmea/src/mrpt_sensor_gnss_nmea_node.cpp b/mrpt_sensor_gnss_nmea/src/mrpt_sensor_gnss_nmea_node.cpp index b2949c1..3bd50ac 100644 --- a/mrpt_sensor_gnss_nmea/src/mrpt_sensor_gnss_nmea_node.cpp +++ b/mrpt_sensor_gnss_nmea/src/mrpt_sensor_gnss_nmea_node.cpp @@ -127,10 +127,7 @@ void process_gps( auto& pubs = NMEA_Pubs::Instance(); - std::string publish_topic = "sensor"; - node.declare_parameter("publish_topic", publish_topic); - node.get_parameter("publish_topic", publish_topic); - pubs.ensure_pubs_are_created(node, publish_topic); + pubs.ensure_pubs_are_created(node, publish_topic_); std_msgs::msg::Header msgHeader; msgHeader.frame_id = node.sensor_frame_id();