Skip to content

Commit

Permalink
Merge pull request #9 from usdot-fhwa-stol/release/hudson
Browse files Browse the repository at this point in the history
Merge release to master for release carma-system-4.1.0
  • Loading branch information
msmcconnell authored May 31, 2022
2 parents 12ed35d + 590b133 commit 8b52ad2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Pull docker image from docker hub
# XTERM used for better catkin_make output
docker:
- image: usdotfhwastol/carma-base:carma-system-4.0.0
- image: usdotfhwastol/carma-base:carma-system-4.1.0
user: carma
environment:
TERM: xterm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ classifier.max_height_m: 1.5
aggregator.min_ray_angle_rad: -3.14159
aggregator.max_ray_angle_rad: 3.14159
aggregator.ray_width_rad: 0.01
aggregator.max_ray_points: 512
aggregator.max_ray_points: 512 # Cannot be increased as 512 is a hardcoded max. Only decreasing is possible
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <cstdint>
#include <limits>
#include <stdexcept>
#include <iostream>

#include "common/types.hpp"
#include "lidar_utils/lidar_utils.hpp"
Expand Down Expand Up @@ -131,18 +132,25 @@ void RayAggregator::end_of_scan()
////////////////////////////////////////////////////////////////////////////////
bool8_t RayAggregator::insert(const PointXYZIFR & pt)
{
static bool print_overflow = true;
if (static_cast<uint16_t>(PointXYZIF::END_OF_SCAN_ID) == pt.get_point_pointer()->id) {
return false;
} else {
const std::size_t idx = bin(pt);

Ray & ray = m_rays[idx];
if (RayState::RESET == m_ray_state[idx]) {
print_overflow = true;
ray.clear(); // capacity unchanged
m_ray_state[idx] = RayState::NOT_READY;
}
if (ray.size() >= ray.capacity()) {
throw std::runtime_error("RayAggregator: Ray capacity overrun! Use smaller bins");
if (print_overflow) {
std::cerr << "RayAggregator: Ray capacity overrun! Use smaller bins" << std::endl;
print_overflow = false;
}
return false;
//throw std::runtime_error("RayAggregator: Ray capacity overrun! Use smaller bins"); // NOTE see https://github.com/usdot-fhwa-stol/carma-platform/issues/1776 to understand why this is disabled
}
// insert point to ray, do some presorting
ray.push_back(pt);
Expand Down

0 comments on commit 8b52ad2

Please sign in to comment.