Skip to content

Commit

Permalink
fix: correct packet output condition for velodyne and robosense
Browse files Browse the repository at this point in the history
  • Loading branch information
mojomex committed Jul 23, 2024
1 parent 3e2239f commit 989b018
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nebula_ros/src/robosense/decoder_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void RobosenseDecoderWrapper::publish(PublishData && data)
cloud_watchdog_->update();

// Publish scan message only if it has been written to
if (current_scan_msg_ && !current_scan_msg_->packets.empty()) {
if (!data.packets->packets.empty()) {
auto robosense_scan = std::make_unique<robosense_msgs::msg::RobosenseScan>();
robosense_scan->header = data.packets->header;

Expand Down
2 changes: 1 addition & 1 deletion nebula_ros/src/velodyne/decoder_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void VelodyneDecoderWrapper::publish(PublishData && data)
cloud_watchdog_->update();

// Publish scan message only if it has been written to
if (current_scan_msg_ && !current_scan_msg_->packets.empty()) {
if (data.packets->packets.empty()) {
auto velodyne_scan = std::make_unique<velodyne_msgs::msg::VelodyneScan>();
velodyne_scan->header = data.packets->header;

Expand Down

0 comments on commit 989b018

Please sign in to comment.