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

[Feature] Improve Hybrid A* planner #1594

Merged
merged 60 commits into from
Mar 14, 2019
Merged

Conversation

aohsato
Copy link

@aohsato aohsato commented Oct 14, 2018

Status

DEVELOPMENT

Description

I merged logics in astar_navi and obstacle_avoid and created astar_search library package.
I fixed some problems on Hybrid A* algorithm in present Autoware, like the coordinate system, performance, and so on.
Finally, I re-created astar_navi node for free space planning and astar_avoid node for avoiding obstacles on waypoints with the internal state transition.

README

Related branch

depended on feature/rebuild_decision_maker
-> This PR is independent now

Todos

Steps to Test or Reproduce

Freespace planning

  1. Launch Autoware and localization on real vehicle or wf_simulator
  2. Launch points2costmap and grid_map_filter
  3. Launch astar_navi and publish 2D Nav Goal on Rviz
  4. lane_waypoints_array is published and you can see it

Obstacle avoidance

  1. Launch Autoware and localization, waypoint_loader and other planners
  2. Launch points2costmap and grid_map_filter
  3. Launch astar_avoid with Enable Avoidance config
  4. Launch velocity_set, pure_pursuit, twist_filter for motion planning
  5. When find obstacle and stop (by velocity_set behavior), the car start to plan and avoidance behavior

NOTE: If you want to use wf_simulator instead of real vehicle, please use lidar_fake_perception on sim_base_link frame to simulate pointcloud and you need to publish localizer_pose for velocity_set.

@aohsato aohsato requested review from s-azumi and kfunaoka October 14, 2018 07:39
@kennedywai
Copy link

Hello Aohsato, thanks for trying to imporve astar_navi! BTW I have a few questions about how this planner works:

  1. Which branch should I use to perform the astar planner + obstacle avoidance?

  2. Is it not required to use either vector map and waypoint saver methods?

  3. Is it the finall output that we set up a goal wherever on the free areas on the grid map and it will publish a global path and a velocity to the robot until it reaches the goal? Just like a normal 2D slam on ROS Navigation stack, we dont need to create a lane on vector map.

  4. I tried to follow the instructions above but I could not get it working, the astar path wasn't out on Rviz, is that ok that you could upload your testing video on Youtube and share the link here?

Thank you!

@aohsato
Copy link
Author

aohsato commented Oct 19, 2018

@kennedywai Thanks for your comments! Can we continue to discuss on my issue post?

@kfunaoka
Copy link

@kennedywai Would you create an issue and show details including how to reproduce the problem and where the process dies? I assume any issue can be categorized into environment problem, procedure problem, and/or code problem.

@sgermanserrano
Copy link

@kennedywai although the branch works the unit tests are needed to improve Autoware's code base. Let me know if you'd be happy to contribute to adding some unit tests as you have some experience with the modifications on this PR.

@aohsato aohsato requested a review from h-ohta March 4, 2019 01:40
aohsato and others added 6 commits March 9, 2019 06:21
* Restructured folders

* Added unit test base

* Removed remaining folder

* Test WIP

* Added astar_util tests and base file for astar_search tests

* Updated to ROS Cpp Style guidelines

* Added test for SimpleNode constructor

* Updated Copyright date

* Added tests for astar algorithm

* Added default constructor to WaveFront struct
@aohsato
Copy link
Author

aohsato commented Mar 14, 2019

@sgermanserrano Thanks and sorry for my late. About calcDiffOfRadian, I fixed that with fmod in this commit.
1bb1fc7
But actually, it's more simple to handle angle diff between -pi~pi by using atan2(sin(t),cos(t)) technique, so I'll fix that in my next chance. Thanks.

@aohsato
Copy link
Author

aohsato commented Mar 14, 2019

@kennedywai I fixed process died problem in above changes, thanks for your comment.

@aohsato
Copy link
Author

aohsato commented Mar 14, 2019

Finally, we already tested on our real car. Plz check. :)
https://www.dropbox.com/s/ista3yrnxc2sbdo/hybrid-astar-avoididance-moricoro-01-x3.mp4?dl=0

@aohsato aohsato merged commit 8381c44 into develop Mar 14, 2019
@aohsato aohsato deleted the feature/improve_astar_planner branch March 14, 2019 04:14
@kennedywai
Copy link

@aohsato Thank you Aohsato! I had been testing this in Jan on my robot and it worked fine except for the process died problem. I am now currently busy with other things but I will be soon testing the new code on my robot!! Thank you once again!

@aohsato
Copy link
Author

aohsato commented Mar 14, 2019

@kennedywai Wow sounds great. Hopefully, let me know in Github, Autoware slack, and so on. Thanks too!

@hamkuchan
Copy link

hamkuchan commented Jun 18, 2019

Hi, guys, I'm wondering why we use the node "grip_map_filter", because the output topic of "grip_map_filter" goes nowhere. And where comes the topic "/realtime_cost_map" from if I just using 3D Lidar? And I followed the guide above, but no costmap out, can you please show me which nodes and which topic I should use in the latest version 1.11.0@aohsato@sgermanserrano

@gbiggs
Copy link

gbiggs commented Jun 18, 2019

Thanks for using Autoware and for your question. However the issue tracker is for posting confirmed bugs and feature requests.

We ask that you please ask questions at the ROS Answers website following our support guidelines: https://github.com/autowarefoundation/autoware/wiki/Support-guidelines#ros-answers. Please pay particular attention to the information we ask you to provide.

anubhavashok pushed a commit to NuronLabs/autoware.ai that referenced this pull request Sep 7, 2021
* Delete obstacle_sim from astar_planner package, replaced to lidar_fake_perception

* Modify package name, astar_planner -> waypoint_planner, and create astar_planner library package

* Delete obstacle_avoid/astar* and modify its dependency to astar_planner library

* Fix astar_navi with astar_planner library

* Refactor astar_navi by separating HAstar library and fixing coodinate system

* Rename obstacle_avoid -> astar_avoid and under refactoring

* Fix cost function and configures

* Fix backward search and refactor configurations

* Apply clang-format

* Refactor include

* Fix typo and so on

* Improve astar_avoid by incremental goal search

* Apply clang-format

* Revert package names

* Fix package/code names

* Update runtime_manager

* Improve astar_avoid to execute avoidance behavior by state transition (by rebuild decision maker)

* Fix PascalCase message names by autowarefoundation#1408

* Remove obstacle_avoid directory

* Fix default parameter for costmap topic

* Fix warning and initialize condition

* Remove use_avoidance_state mode (TODO: after merging rebuild decision maker)

* Improve astar_avoid behavior by simple state transition and multi-threading

* Apply clang-format

* Fix replan_interval in astar_avoid

* Add descriptions for paramters

* Rename pkg name, astar_planner -> waypoint_planner

* Fix param name

* Fix avoid waypoints height

* Fix parameter and formalize code

* Add README for freespace/waypoint_planner

* Add License terms

Co-Authored-By: aohsato <aohsato@gmail.com>

Add License terms

Co-Authored-By: aohsato <aohsato@gmail.com>

Add License terms

Co-Authored-By: aohsato <aohsato@gmail.com>

Add License terms

Co-Authored-By: aohsato <aohsato@gmail.com>

Add License terms

Co-Authored-By: aohsato <aohsato@gmail.com>

Fix CHANGELOG

Co-Authored-By: aohsato <aohsato@gmail.com>

Add License terms

Co-Authored-By: aohsato <aohsato@gmail.com>

Add License terms

Co-Authored-By: aohsato <aohsato@gmail.com>

* Fix astar_navi/README.md

* Add License terms

* Fix const pointer

* Added unit test base

* Restructured folders

* Fix bug by adding AstarSearch reset

* Fix WaveFrontNode initialization

Co-Authored-By: aohsato <aohsato@gmail.com>

* Fix variable name

* Refactor threading

* Re-adding lidar_fake_perception

* Fix the condition to judge reaching goal

* Add 'use_decision state' mode to transit avoidance state by decision_maker

* Fix calcDiffOfRadian (if diff > 2pi)

* Feature/test astar planner (autowarefoundation#1753)

* Restructured folders

* Added unit test base

* Removed remaining folder

* Test WIP

* Added astar_util tests and base file for astar_search tests

* Updated to ROS Cpp Style guidelines

* Added test for SimpleNode constructor

* Updated Copyright date

* Added tests for astar algorithm

* Added default constructor to WaveFront struct

* Revert use_state_decision mode (94af7b6)

* Fix costmap topic names by merging costmap_generator
@mitsudome-r mitsudome-r added the version:autoware-ai Autoware.AI label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants