Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added if condition to check if waypoint in map or not in kinodynamic_astar.cpp #118

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions fast_planner/path_searching/src/kinodynamic_astar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ int KinodynamicAstar::search(Eigen::Vector3d start_pt, Eigen::Vector3d start_v,

Eigen::Vector3d pro_pos = pro_state.head(3);

// check if in map
if (pro_state(0) <= origin_(0) || pro_state(0) >= map_size_3d_(0) ||
pro_state(1) <= origin_(1) || pro_state(1) >= map_size_3d_(1) ||
pro_state(2) <= origin_(2) || pro_state(2) >= map_size_3d_(2)) {

continue;
}

// Check if in close set
Eigen::Vector3i pro_id = posToIndex(pro_pos);
int pro_t_id = timeToIndex(pro_t);
Expand Down