Struct LedFinder::CloudDifferenceTracker

Nested Relationships

This struct is a nested type of Class LedFinder.

Struct Documentation

struct CloudDifferenceTracker

Internally used within LED finder to track each of several LEDs.

Public Functions

CloudDifferenceTracker(std::string frame, double x, double y, double z)
bool process(sensor_msgs::msg::PointCloud2 &cloud, sensor_msgs::msg::PointCloud2 &prev, geometry_msgs::msg::Point &led_point, double max_distance, double weight)

Update the tracker based on new cloud compared to previous.

Parameters:
  • cloud – The newest cloud

  • prev – The previous cloud

  • led_point – The expected pose of this led in cloud frame

  • max_distance – The maximum distance from expected led pose that we should consider changes.

  • weight – Whether the change between frames should increase or decrease the LED point values. Should be +/- 1 typically.

bool isFound(const sensor_msgs::msg::PointCloud2 &cloud, double threshold)
bool getRefinedCentroid(const sensor_msgs::msg::PointCloud2 &cloud, geometry_msgs::msg::PointStamped &centroid)
void reset(size_t height, size_t width)
sensor_msgs::msg::Image getImage()

Public Members

std::vector<double> diff_
double max_
int max_idx_
int count_
size_t height_
size_t width_
std::string frame_
geometry_msgs::msg::Point point_