Skip to content

Commit

Permalink
ci(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 27, 2024
1 parent ff8b7f5 commit 2706c08
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@
#include "nebula_decoders/nebula_decoders_hesai/decoders/angle_corrector.hpp"
#include "nebula_decoders/nebula_decoders_hesai/decoders/hesai_packet.hpp"
#include "nebula_decoders/nebula_decoders_hesai/decoders/hesai_scan_decoder.hpp"

#include <nebula_common/hesai/hesai_common.hpp>
#include <nebula_common/nebula_common.hpp>
#include <nebula_common/point_types.hpp>
#include <nlohmann/json.hpp>
#include <rclcpp/logging.hpp>
#include <rclcpp/rclcpp.hpp>

#include <sys/types.h>

#include <algorithm>
#include <array>
#include <cmath>
Expand Down Expand Up @@ -109,24 +112,20 @@ struct HesaiDecodeFilteredInfo
multiple_j,
});
j["total_kept_point_count"] = total_kept_point_count;

return j;
}

void get_minmax_info(const NebulaPoint & point)
{
cloud_azimuth_min_rad =
std::min(cloud_azimuth_min_rad, point.azimuth);
cloud_azimuth_max_rad =
std::max(cloud_azimuth_max_rad, point.azimuth);
cloud_azimuth_min_rad = std::min(cloud_azimuth_min_rad, point.azimuth);
cloud_azimuth_max_rad = std::max(cloud_azimuth_max_rad, point.azimuth);
packet_timestamp_min_ns =
std::min(packet_timestamp_min_ns, static_cast<uint64_t>(point.time_stamp));
packet_timestamp_max_ns =
std::max(packet_timestamp_max_ns, static_cast<uint64_t>(point.time_stamp));
cloud_distance_min_m =
std::min(cloud_distance_min_m, point.distance);
cloud_distance_max_m =
std::max(cloud_distance_max_m, point.distance);
cloud_distance_min_m = std::min(cloud_distance_min_m, point.distance);
cloud_distance_max_m = std::max(cloud_distance_max_m, point.distance);
}
};

Expand Down Expand Up @@ -429,7 +428,7 @@ class HesaiDecoder : public HesaiScanDecoder
nlohmann::ordered_json j = decode_filtered_info_.to_json();
std::cout << "=======================" << std::endl;
for (const auto & [key, value] : j.items()) {
std::cout << key << ": " << std::endl;
std::cout << key << ": " << std::endl;
for (const auto & [k, v] : value.items()) {
std::cout << k << ": " << v << std::endl;
}
Expand Down

0 comments on commit 2706c08

Please sign in to comment.