Added collision avoidance to MoveGlobal routine
This commit is contained in:
@@ -34,8 +34,9 @@ mg::PlannerNode::PlannerNode() : Node("planner"), astar_(this) {
|
||||
}
|
||||
}
|
||||
astar_.execute(get_pos(), std::move(goals), resp->indicies);
|
||||
std::reverse(resp->indicies.begin(), resp->indicies.end());
|
||||
mg_msgs::msg::Path path;
|
||||
path.indicies = resp->indicies;
|
||||
path.indicies = std::vector<int>(resp->indicies);
|
||||
path_pub_->publish(path);
|
||||
RCLCPP_INFO(get_logger(), "Handled request in %lf seconds", (get_clock()->now() - elapsed).seconds());
|
||||
});
|
||||
@@ -44,6 +45,8 @@ mg::PlannerNode::PlannerNode() : Node("planner"), astar_(this) {
|
||||
|
||||
tf_buf_ = std::make_shared<tf2_ros::Buffer>(get_clock());
|
||||
tf_listener = std::make_shared<tf2_ros::TransformListener>(*tf_buf_);
|
||||
|
||||
obstacle_manager_ = std::make_shared<ObstacleManager>(this, tf_buf_);
|
||||
}
|
||||
|
||||
glm::ivec2 mg::PlannerNode::get_pos() {
|
||||
|
||||
Reference in New Issue
Block a user