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

feat(freespace_planning_algorithms): add Astar search by python #6398

Merged
merged 9 commits into from
Apr 25, 2024

Conversation

TakumIto
Copy link
Contributor

@TakumIto TakumIto commented Feb 14, 2024

Description

Make the following feature into the freespace_planning_algorithms package.

  • Astar search class with python
    • add setMap() function that sets "costmap" into the Astar class
    • add makePlan() function in the Astar class

Tests performed

Test with the data: settings, costmap, initial pose, and goalpose.
These data were successful in finding the goal in planning simulation with autoware.

evaluator_description: feat/freespace_astar_python
2024/03/13 https://evaluation.tier4.jp/evaluation/reports/3b522d1a-59f5-56a3-aaeb-de18be2c5042/?project_id=prd_jt

-- success to find goal by python, too.

https://evaluation.tier4.jp/evaluation/reports/d4a8a1ce-15b6-5301-95c6-23092a8dbe18?project_id=prd_jt

Effects on system behavior

There is no affection in autoware by this feature.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@github-actions github-actions bot added component:planning Route planning, decision-making, and navigation. (auto-assigned) type:ci Continuous Integration (CI) processes and testing. (auto-assigned) and removed type:ci Continuous Integration (CI) processes and testing. (auto-assigned) labels Feb 14, 2024
@TakumIto TakumIto force-pushed the feat/freespace_astar_python branch 3 times, most recently from 9e50de7 to ac8f592 Compare February 14, 2024 04:50
Comment on lines 11 to 16
// #include <pybind11/stl.h>
// #include <pybind11/stl_bind.h>
// #include <pybind11/eigen.h>
// #include <pybind11/chrono.h>
// #include <pybind11/complex.h>
// #include <pybind11/functional.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are neeeded?

@@ -0,0 +1,103 @@
#include "freespace_planning_algorithms/astar_search.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please write copyright

@kosuke55
Copy link
Contributor

@TakumIto
thanks for your great work!!!!

please check pre-commit.ci
image

you also can run in local

pre-commit run -a

@TakumIto TakumIto force-pushed the feat/freespace_astar_python branch from c23dace to e776033 Compare February 19, 2024 00:26
@TakumIto
Copy link
Contributor Author

@kosuke55
I modified some codes and ran pre-commit. please check it up.

@TakumIto
Copy link
Contributor Author

@kosuke55
I would be able to make this PR more useful. So I will push more commit and then contact here.

@TakumIto TakumIto force-pushed the feat/freespace_astar_python branch from ab8383b to 3b81383 Compare February 21, 2024 04:36
@TakumIto
Copy link
Contributor Author

@kosuke55 I have done updates just now.

@kosuke55
Copy link
Contributor

thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!

@TakumIto TakumIto force-pushed the feat/freespace_astar_python branch 3 times, most recently from 0748c54 to 744fd03 Compare March 6, 2024 00:23
@TakumIto TakumIto force-pushed the feat/freespace_astar_python branch from 744fd03 to 4a4c8cc Compare March 6, 2024 05:00
@kosuke55 kosuke55 force-pushed the feat/freespace_astar_python branch from 4a4c8cc to 5248c96 Compare March 13, 2024 05:02
return self.astar_search.makePlan(start_pose_byte, goal_pose_byte)

def getWaypoints(self):
waypoints_vetor = self.astar_search.getWaypoints()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
waypoints_vetor = self.astar_search.getWaypoints()
waypoints_vector = self.astar_search.getWaypoints()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and others

@kosuke55 kosuke55 force-pushed the feat/freespace_astar_python branch from 5248c96 to ae93f77 Compare March 27, 2024 05:19
@github-actions github-actions bot added the type:documentation Creating or refining documentation. (auto-assigned) label Apr 4, 2024
@TakumIto TakumIto force-pushed the feat/freespace_astar_python branch from 1532c89 to 36b736a Compare April 4, 2024 01:19
@TakumIto
Copy link
Contributor Author

TakumIto commented Apr 4, 2024

@kosuke55 I modified some typos and inserted the document. Could you check them?

@kosuke55 kosuke55 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Apr 4, 2024
@kosuke55 kosuke55 disabled auto-merge April 11, 2024 06:33
@kosuke55
Copy link
Contributor

@TakumIto

could you please fix spellcheck?

image

@TakumIto
Copy link
Contributor Author

TakumIto commented Apr 16, 2024

@kosuke55 I fixed it.

@kosuke55 kosuke55 force-pushed the feat/freespace_astar_python branch from 356aef6 to ce99373 Compare April 16, 2024 02:58
@@ -0,0 +1,50 @@
import freespace_planning_algorithms.freespace_planning_algorithms_pybind as _fp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add copyright

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed it

@@ -0,0 +1,79 @@
import freespace_planning_algorithms.astar_search as fp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add copyright

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed it

@kosuke55 kosuke55 self-requested a review April 17, 2024 01:14
@kosuke55
Copy link
Contributor

hmm, please check this

3: Test command: /usr/bin/python3 "-u" "/opt/ros/humble/share/ament_cmake_test/cmake/run_test.py" "/__w/autoware.universe/autoware.universe/build/freespace_planning_algorithms/test_results/freespace_planning_algorithms/copyright.xunit.xml" "--package-name" "freespace_planning_algorithms" "--output-file" "/__w/autoware.universe/autoware.universe/build/freespace_planning_algorithms/ament_copyright/copyright.txt" "--command" "/opt/ros/humble/bin/ament_copyright" "--xunit-file" "/__w/autoware.universe/autoware.universe/build/freespace_planning_algorithms/test_results/freespace_planning_algorithms/copyright.xunit.xml"
3: Test timeout computed to be: 200
3: -- run_test.py: invoking following command in '/__w/autoware.universe/autoware.universe/planning/freespace_planning_algorithms':
3:  - /opt/ros/humble/bin/ament_copyright --xunit-file /__w/autoware.universe/autoware.universe/build/freespace_planning_algorithms/test_results/freespace_planning_algorithms/copyright.xunit.xml
3: freespace_planning_algorithms/astar_search.py: copyright=TIER IV, Inc. All rights reserved. (2024), license=<unknown>
3: scripts/bind/astar_search_pybind.cpp: copyright=TIER IV, Inc. All rights reserved. (2024), license=<unknown>
3: scripts/example/example.py: copyright=TIER IV, Inc. All rights reserved. (2024), license=<unknown>
3: 3 errors, checked 18 files
3: -- run_test.py: return code 1
3: -- run_test.py: verify result file '/__w/autoware.universe/autoware.universe/build/freespace_planning_algorithms/test_results/freespace_planning_algorithms/copyright.xunit.xml'
3/6 Test #3: copyright ............................***Failed    0.69 sec
test 4
    Start 4: cppcheck

@TakumIto
Copy link
Contributor Author

TakumIto commented Apr 24, 2024

@kosuke55 fixed it. Could you please check?

@kosuke55
Copy link
Contributor

kosuke55 commented Apr 24, 2024

@TakumIto
thanks! and please check pre-coomit
you can check pre-commit run -a also in local

trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

@TakumIto TakumIto force-pushed the feat/freespace_astar_python branch from 06cb432 to 2e319c3 Compare April 24, 2024 03:07
Takumi Ito and others added 9 commits April 25, 2024 10:29
Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>
Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>
- No need to convert to serial when user passes ros2 message to methods.

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>
Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>
Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>
Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>
…ch_pybind.cpp

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>
Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

fix copyright

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

add copyright

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>
@kosuke55 kosuke55 force-pushed the feat/freespace_astar_python branch from 4086808 to 54fff6d Compare April 25, 2024 01:29
@kosuke55 kosuke55 merged commit d5cef0d into autowarefoundation:main Apr 25, 2024
20 of 22 checks passed
@kosuke55 kosuke55 deleted the feat/freespace_astar_python branch April 25, 2024 04:26
@TakumIto
Copy link
Contributor Author

@kosuke55 Thanks!!!

karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…warefoundation#6398)

* feat(freespace_planning_algorithms): add Astar search by python

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

* add copywrite and remove unneeded comment

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

* - Add method getWaypoints() into the astar class.
- No need to convert to serial when user passes ros2 message to methods.

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

* insert astar python documents into the README

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

* trivial modification

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

* modify typo

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

* Update planning/freespace_planning_algorithms/scripts/bind/astar_search_pybind.cpp

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* ad copyright

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

fix copyright

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

add copyright

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>

* Update planning/freespace_planning_algorithms/scripts/bind/astar_search_pybind.cpp

---------

Signed-off-by: Takumi Ito <takumi.ito@tier4.jp>
Co-authored-by: Takumi Ito <takumi.ito@tier4.jp>
Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants