Planner based on A* algorithm using GridMap elevation data.
More...
#include <GridMapAStarPlanner.hpp>
|
| GridMapAStarPlanner () |
| Default constructor.
|
|
virtual std::expected< void, std::string > | on_initialize () override |
| Initializes the planner.
|
|
void | update (NavState &nav_state) override |
| Computes a path using A* algorithm.
|
|
|
std::vector< geometry_msgs::msg::Pose > | a_star_path (const grid_map::GridMap &map, const geometry_msgs::msg::Pose &start, const geometry_msgs::msg::Pose &goal) |
| Internal A* implementation.
|
|
bool | isTraversable (const grid_map::GridMap &map, const grid_map::Index &from, const grid_map::Index &to) const |
| Checks if the slope between two cells is below threshold.
|
|
Planner based on A* algorithm using GridMap elevation data.
◆ GridMapAStarPlanner()
◆ a_star_path()
std::vector< geometry_msgs::msg::Pose > a_star_path |
( |
const grid_map::GridMap & | map, |
|
|
const geometry_msgs::msg::Pose & | start, |
|
|
const geometry_msgs::msg::Pose & | goal ) |
|
protected |
Internal A* implementation.
- Parameters
-
map | The grid map with elevation layer |
start | Pose in world coordinates |
goal | Pose in world coordinates |
- Returns
- List of poses representing the path
◆ isTraversable()
bool isTraversable |
( |
const grid_map::GridMap & | map, |
|
|
const grid_map::Index & | from, |
|
|
const grid_map::Index & | to ) const |
|
protected |
Checks if the slope between two cells is below threshold.
- Parameters
-
map | The grid map |
from | Index of the first cell |
to | Index of the second cell |
- Returns
- true if slope is acceptable, false otherwise
◆ on_initialize()
std::expected< void, std::string > on_initialize |
( |
| ) |
|
|
overridevirtual |
Initializes the planner.
Creates necessary publishers/subscribers and initializes the map instances.
- Returns
- std::expected<void, std::string> Success or error string.
◆ update()
void update |
( |
NavState & | nav_state | ) |
|
|
override |
Computes a path using A* algorithm.
- Parameters
-
nav_state | Current navigation state (with odometry and goals) |
◆ clearance_distance_
double clearance_distance_ |
|
protected |
◆ current_path_
nav_msgs::msg::Path current_path_ |
|
protected |
◆ max_allowed_slope_
double max_allowed_slope_ |
|
protected |
◆ path_pub_
rclcpp::Publisher<nav_msgs::msg::Path>::SharedPtr path_pub_ |
|
protected |
◆ robot_radius_
The documentation for this class was generated from the following files: