Skip to content

Commit

Permalink
Fix typos in planning modules (autowarefoundation#866) (autowarefound…
Browse files Browse the repository at this point in the history
…ation#275)

* fix typos in planning

* fix corresponding typos in planning

* revert fixed typos temporarily due to its impact on launchers

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
  • Loading branch information
2 people authored and wep21 committed Jan 30, 2021
1 parent 0c74758 commit cd697fa
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct NodeUpdate
return result;
}

NodeUpdate fliped() const
NodeUpdate flipped() const
{
NodeUpdate result = *this;
result.shift_y = -result.shift_y;
Expand Down Expand Up @@ -131,7 +131,7 @@ struct AstarParam
double minimum_turning_radius; // [m]]

// search configs
int theta_size; // descritized angle table size [-]
int theta_size; // discretized angle table size [-]
double curve_weight; // curve moving cost [-]
double reverse_weight; // backward moving cost [-]
double lateral_goal_range; // reaching threshold, lateral error [m]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ geometry_msgs::msg::Pose calcRelativePose(
return transformed.pose;
}

int descretizeAngle(const double theta, const int theta_size)
int discretizeAngle(const double theta, const int theta_size)
{
const double one_angle_range = 2.0 * M_PI / theta_size;
return static_cast<int>(normalizeRadian(theta, 0, 2 * M_PI) / one_angle_range) % theta_size;
Expand Down Expand Up @@ -103,7 +103,7 @@ IndexXYT pose2index(
{
const int index_x = pose_local.position.x / costmap.info.resolution;
const int index_y = pose_local.position.y / costmap.info.resolution;
const int index_theta = descretizeAngle(tf2::getYaw(pose_local.orientation), theta_size);
const int index_theta = discretizeAngle(tf2::getYaw(pose_local.orientation), theta_size);
return {index_x, index_y, index_theta};
}

Expand Down Expand Up @@ -156,7 +156,7 @@ AstarSearch::TransitionTable createTransitionTable(
// NodeUpdate actions
const NodeUpdate forward_straight{step, 0.0, 0.0, step, false, false};
const NodeUpdate forward_left{R * sin(dtheta), R * (1 - cos(dtheta)), dtheta, step, true, false};
const NodeUpdate forward_right = forward_left.fliped();
const NodeUpdate forward_right = forward_left.flipped();
const NodeUpdate backward_straight = forward_straight.reversed();
const NodeUpdate backward_left = forward_left.reversed();
const NodeUpdate backward_right = forward_right.reversed();
Expand Down Expand Up @@ -307,7 +307,7 @@ bool AstarSearch::search()
}

// Transit
const auto index_theta = descretizeAngle(current_node->theta, astar_param_.theta_size);
const auto index_theta = discretizeAngle(current_node->theta, astar_param_.theta_size);
for (const auto & transition : transition_table_[index_theta]) {
const bool is_turning_point = transition.is_back != current_node->is_back;
const double move_cost =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class CostmapGenerator : public rclcpp::Node
/// \brief wait for lanelet2 map to load and build routing graph
void initLaneletMap();

/// \brief callback for loading landlet2 map
/// \brief callback for loading lanelet2 map
void onLaneletMapBin(const autoware_lanelet2_msgs::msg::MapBin::ConstSharedPtr msg);

/// \brief callback for DynamicObjectArray
Expand All @@ -142,7 +142,7 @@ class CostmapGenerator : public rclcpp::Node
void onObjects(const autoware_perception_msgs::msg::DynamicObjectArray::ConstSharedPtr msg);

/// \brief callback for sensor_msgs::PointCloud2
/// \param[in] in_points input sensot_msgs::PointCloud2. Assuming groud-fitered pointcloud
/// \param[in] in_points input sensor_msgs::PointCloud2. Assuming ground-filtered pointcloud
/// by default
void onPoints(const sensor_msgs::msg::PointCloud2::ConstSharedPtr msg);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class PointsToCostmap
/// \param[in] gridmap: costmap based on gridmap
/// \param[in] gridmap_layer_name: gridmap layer name for gridmap
/// \param[in] grid_vec: grid-x-length x grid-y-length size grid stuffed with point's height in
/// corresponding grid cell \param[out] caculated costmap in grid_map::Matrix format
/// corresponding grid cell \param[out] calculated costmap in grid_map::Matrix format
grid_map::Matrix calculateCostmap(
const double maximum_height_thres, const double minimum_lidar_height_thres,
const double grid_min_value, const double grid_max_value, const grid_map::GridMap & gridmap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void AstarNavi::onTimer()
if (isPlanRequired()) {
reset();

// Stop before planning new trajectoryg
// Stop before planning new trajectory
const auto stop_trajectory = createStopTrajectory(current_pose_);
trajectory_pub_->publish(stop_trajectory);
debug_pose_array_pub_->publish(trajectory2PoseArray(stop_trajectory));
Expand Down

0 comments on commit cd697fa

Please sign in to comment.