Skip to content

Commit

Permalink
Merge pull request #6 from r-aguilera/ros2
Browse files Browse the repository at this point in the history
fix uninitialized publishers in NMEA msg publishers
  • Loading branch information
jlblancoc authored Aug 8, 2024
2 parents 7d0224d + 7363d87 commit c421f63
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mrpt_sensor_gnss_nmea/src/mrpt_sensor_gnss_nmea_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ void process_gps(
ASSERT_(o);

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);

std_msgs::msg::Header msgHeader;
msgHeader.frame_id = node.sensor_frame_id();
msgHeader.stamp = mrpt::ros2bridge::toROS(obs->timestamp);
Expand Down

0 comments on commit c421f63

Please sign in to comment.