Skip to content

Commit

Permalink
Rearrange code structure
Browse files Browse the repository at this point in the history
Signed-off-by: TaikiYamada4 <[email protected]>
  • Loading branch information
TaikiYamada4 committed Nov 27, 2024
1 parent 8cee06a commit 32f5cf9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,6 @@ class TrafficLightFacingValidator : public lanelet::validation::MapValidator
lanelet::ConstLineString3d get_stop_line_from_reg_elem(
const lanelet::RegulatoryElementConstPtr & reg_elem);

/**
* @brief Returns a linestring that connects both ends of the left and right bounds
* of the input lanelet. There might be two candidates (front and back) but this function
* only returns the one near to the input 'reference'. This is used to get a directional
* stop line from the lanelet here.
*
* @param lanelet
* @param reference
* @return lanelet::LineString3d
*/
lanelet::LineString3d get_starting_edge_from_lanelet(
const lanelet::ConstLanelet & lanelet, const lanelet::ConstLineString3d & reference);

/**
* @brief Returns lanelets that refers the regulatory element specified by the input id
* from the input lanelet map.
Expand All @@ -80,13 +67,26 @@ class TrafficLightFacingValidator : public lanelet::validation::MapValidator
const lanelet::LaneletMap & map, const lanelet::Id reg_elem_id);

/**
* @brief Convert lanelet::ConstLineString3d to a vector3d. The linestring must be made from two
* points.
* @brief Convert lanelet::ConstLineString3d to a Eigen::Vector3d.
* The linestring must be made only from two points.
*
* @param linestring
* @return Eigen::Vector3d
*/
Eigen::Vector3d linestring_to_vector3d(const lanelet::ConstLineString3d linestring);

/**
* @brief Returns a linestring that connects both ends of the left and right bounds
* of the input lanelet. There might be two candidates (front and back) but this function
* only returns the one near to the input 'reference'. This is used to get a directional
* stop line from the lanelet here.
*
* @param lanelet
* @param reference
* @return lanelet::LineString3d
*/
lanelet::LineString3d get_starting_edge_from_lanelet(
const lanelet::ConstLanelet & lanelet, const lanelet::ConstLineString3d & reference);
};
} // namespace lanelet::autoware::validation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ lanelet::validation::Issues TrafficLightFacingValidator::check_traffic_light_fac
continue;
}

// Assume the psuedo stop line from the first lanelet and check it is similar to the ones
// of other lanelets
// Estimate the psuedo stop line from the first lanelet and check whether it is similar to

Check warning on line 85 in map/autoware_lanelet2_map_validator/src/validators/traffic_light/traffic_light_facing.cpp

View workflow job for this annotation

GitHub Actions / spell-check-partial

Misspelled word (psuedo) Suggestions: (pseudo*)
// those of other lanelets
lanelet::ConstLineString3d temp_pseudo_stop_line =
get_starting_edge_from_lanelet(referring_lanelets[0], stop_line);

Expand Down

0 comments on commit 32f5cf9

Please sign in to comment.