Skip to content

Commit

Permalink
chore: fix spell-check errors in apollo-related packages (autowarefou…
Browse files Browse the repository at this point in the history
…ndation#4987)

Signed-off-by: kminoda <koji.minoda@tier4.jp>
  • Loading branch information
kminoda authored Sep 19, 2023
1 parent 2067a6c commit e8f7233
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ struct Obstacle
float height;
float heading;
MetaType meta_type;
std::vector<float> meta_type_probs;
std::vector<float> meta_type_probabilities;

Obstacle() : score(0.0), height(-5.0), heading(0.0), meta_type(META_UNKNOWN)
{
cloud_ptr.reset(new pcl::PointCloud<pcl::PointXYZI>);
meta_type_probs.assign(MAX_META_TYPE, 0.0);
meta_type_probabilities.assign(MAX_META_TYPE, 0.0);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@ void Cluster2D::classify(const float * inferred_data)
for (size_t grid_id = 0; grid_id < obs->grids.size(); grid_id++) {
int grid = obs->grids[grid_id];
for (int k = 0; k < num_classes; k++) {
obs->meta_type_probs[k] += classify_pt_data[k * size_ + grid];
obs->meta_type_probabilities[k] += classify_pt_data[k * size_ + grid];
}
}
int meta_type_id = 0;
for (int k = 0; k < num_classes; k++) {
obs->meta_type_probs[k] /= obs->grids.size();
if (obs->meta_type_probs[k] > obs->meta_type_probs[meta_type_id]) {
obs->meta_type_probabilities[k] /= obs->grids.size();
if (obs->meta_type_probabilities[k] > obs->meta_type_probabilities[meta_type_id]) {
meta_type_id = k;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ struct Obstacle
float height;
float heading;
MetaType meta_type;
std::vector<float> meta_type_probs;
std::vector<float> meta_type_probabilities;

Obstacle() : score(0.0), height(-5.0), heading(0.0), meta_type(MetaType::META_UNKNOWN)
{
cloud_ptr.reset(new pcl::PointCloud<pcl::PointXYZI>);
meta_type_probs.assign(static_cast<int>(MetaType::MAX_META_TYPE), 0.0);
meta_type_probabilities.assign(static_cast<int>(MetaType::MAX_META_TYPE), 0.0);
}
};

Expand Down
6 changes: 3 additions & 3 deletions perception/lidar_apollo_segmentation_tvm/src/cluster2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ void Cluster2D::classify(const float * inferred_data)
for (size_t grid_id = 0; grid_id < obs->grids.size(); grid_id++) {
int32_t grid = obs->grids[grid_id];
for (int k = 0; k < num_classes; k++) {
obs->meta_type_probs[k] += classify_pt_data[k * siz_ + grid];
obs->meta_type_probabilities[k] += classify_pt_data[k * siz_ + grid];
}
}
int meta_type_id = 0;
for (int k = 0; k < num_classes; k++) {
obs->meta_type_probs[k] /= static_cast<float>(obs->grids.size());
if (obs->meta_type_probs[k] > obs->meta_type_probs[meta_type_id]) {
obs->meta_type_probabilities[k] /= static_cast<float>(obs->grids.size());
if (obs->meta_type_probabilities[k] > obs->meta_type_probabilities[meta_type_id]) {
meta_type_id = k;
}
}
Expand Down

0 comments on commit e8f7233

Please sign in to comment.