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

Run Lidar Centerpoint with TVM #908

Closed
4 of 5 tasks
mitsudome-r opened this issue May 16, 2022 · 30 comments
Closed
4 of 5 tasks

Run Lidar Centerpoint with TVM #908

mitsudome-r opened this issue May 16, 2022 · 30 comments
Assignees
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) priority:high High urgency and importance. status:help-wanted Assistance or contributors needed. type:new-feature New functionalities or additions, feature requests.

Comments

@mitsudome-r
Copy link
Member

mitsudome-r commented May 16, 2022

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I've agreed with the maintainers that I can plan this task.

Description

There are packages in Universe that use TensorRT as neural network library. We would like to document a way to convert TensorRT based model into TVM model. We will start investigation using lidar_centerpoint package first.
https://github.com/autowarefoundation/autoware.universe/tree/main/perception/lidar_centerpoint

Purpose

Investigate a way to use TVM.

Possible approaches

TBD

Definition of done

  • Run lidar_centerpoint using TVM library
  • Write the document for the procedure to convert TensorRT based module to TVM based module
@mitsudome-r mitsudome-r added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label May 16, 2022
@BonoloAWF BonoloAWF added priority:high High urgency and importance. type:new-feature New functionalities or additions, feature requests. labels May 18, 2022
@esteve
Copy link
Contributor

esteve commented May 23, 2022

Here's a summary of what I learned about TVM (thanks @ambroise-arm for your help, please let me know if there's anything incorrect):

  • TVM aims to be backend agnostic when developing, but once it gets deployed it targets the desired backend
  • The workflow is as follows:
    • Parse the ONNX files via ARM's tvm_cli.py tool (https://github.com/autowarefoundation/modelzoo/blob/master/scripts/tvm_cli/tvm_cli.py), which will tune the model using AutoTVM.
    • The script will generate several files:
      • A network module in the form of a shared library (deploy_lib.so)
      • A JSON file describing the network graph (deploy_graph.json)
      • A file containing the parameters of the network (deploy_param.params)
      • A header file with the configuration of the inference engine (inference_engine_tvm_config.hpp)
  • In the C++ load the deploy_lib.so via TVM's dload mechanism, this enables the code to be platform agnostic while being performant at the same time
  • TVM allows developers to use backend-specific code (e.g. CUDA), though the goal is to abstract that entirely

Notes

  • The TVM team is working on their own CLI tool called TVMC (https://tvm.apache.org/docs/tutorial/tvmc_command_line_driver.html), which would supersede tvm_cli.py
  • ARM ported Autoware.AI's lidar_point_pillars package from TensorRT to TVM, this can be used as a reference on how to migrate to TVM. It currently contains backend-specific code through CUDA. Additionally, both TensorRT and TVM are supported and one is chosen at build time (TVM is the default).

@mitsudome-r
Copy link
Member Author

@Sharrrrk knows a candidate to work on this.
@Sharrrrk, Can you tell him/her to follow up on this issue?

YoheiMishina pushed a commit to YoheiMishina/autoware.universe that referenced this issue Jun 9, 2022
* release v0.4.0

* remove ROS1 packages temporarily

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* add sample ros2 packages

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* remove ROS1 packages

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* Revert "remove ROS1 packages temporarily"

This reverts commit 7eacbcea261a65d6c305c7b0d069591ca3a2ee3a.

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* add COLCON_IGNORE to ros1 packages

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* Port autoware-perception-rviz-plugin (autowarefoundation#100)

* Port to ROS2

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* Update namespaces

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* Port autoware-planning-rviz-plugin (autowarefoundation#103)

* Port to ROS2

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* Update deprecated

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* Update namespaces

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* Adjust copyright notice on 532 out of 699 source files (autowarefoundation#143)

* Use quotes for includes where appropriate (autowarefoundation#144)

* Use quotes for includes where appropriate

* Fix lint tests

* Make tests pass hopefully

* Run uncrustify on the entire Pilot.Auto codebase (autowarefoundation#151)

* Run uncrustify on the entire Pilot.Auto codebase

* Exclude open PRs

* Fix rviz plugins (autowarefoundation#175)

* [autoware_perception_rviz_plugin] make library to shared and fix library name in plugin_description.xml

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* [autoware_planning_rviz_plugin] make library to shared and fix library name in plugin_description.xml

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* Port autoware vehicle rviz plugin (autowarefoundation#111)

* Port to ROS2

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* Amend buildtool

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* Fix license

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* Fix

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* Fixes

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* adding linters to autoware_planning_rviz_plugin (autowarefoundation#224)

* adding linters to autoware_perception_rviz_plugin (autowarefoundation#225)

* [autoware_perception_rviz_plugin] make plugin library SHARED (autowarefoundation#236)

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* Fix bugs in autoware vehicle rviz plugin (autowarefoundation#246)

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Ros2 v0.8.0 autoware vehicle rviz plugin (autowarefoundation#333)

* add test depend

* fix console meter size (autowarefoundation#909)

* update to change font scale (autowarefoundation#910)

* Fix typos in common modules (autowarefoundation#914)

* fix typos in common modules

* minor fix (lowercasing)

* revert changes in PathPoint.msg

* Fix memory leaks in turn signal plugin (autowarefoundation#932)

* fix memory leak (QPointF)

* convert raw pointers to smart pointers

* update handle image (autowarefoundation#948)

* reduce calc cost rviz plugin (autowarefoundation#947)

* reduce calc cost

* cosmetic change

* cosmetic change

* Use CMAKE_CXX_STANDARD to enable C++14 for Qt

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp>

* change font size independency desplay (autowarefoundation#946)

* bug fix (wrong unit conversion) (autowarefoundation#956)

* Refactor autoware_vehicle_rviz_plugin (autowarefoundation#967)

* Refactor autoware_vehicle_rviz_plugin

- change smart pointers to raw pointers according to Qt convention
- remove unused headers
- remove unused variables
- cosmetic changes according to Google C++ Style Guide
- use the range-based for statement
- replace push_back with emplace_back

See also: autowarefoundation#932, autowarefoundation#964

* Apply clang-format

* Change a variable name to clarify: history -> histories

* add build testing

* appply ament_uncrustify

* apply lint

* fix bug

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Ros2 v0.8.0 autoware perception rviz plugin (autowarefoundation#334)

* Fix typos in common modules (autowarefoundation#914)

* fix typos in common modules

* minor fix (lowercasing)

* revert changes in PathPoint.msg

* ament_cmake_cppcheck  -> ament_lint_common

* apply lint

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* Ros2 v0.8.0 autoware planning rviz plugin (autowarefoundation#336)

* add speed limit visualizer (autowarefoundation#908)

* add speed limit visualizer

* 🚮

* add max velocity output

* fix bug

* update visualizer

Co-authored-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* change font size independency desplay (autowarefoundation#946)

* ament_cmake_cppcheck -> ament_lint_common

* apply lint

* change topic type

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>

* Ros2 v0.8.0 remove std msgs awapi (autowarefoundation#348)

* [autoware_vehicle_msgs] add BatteryStatus msg

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* [autoware_planning_msgs] add ExpandStopRange and StopSpeedExceeded messages

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* [autoware_api_msgs] add DoorControlCommand, StopCommand, and VelocityLimit messages

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* remove std_msgs related to autoware_awaiv_adapter node

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* apply ament_uncrustify

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* fix build failure

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* fix test failures

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* address review commends

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* Ros2 v0.9.0 pose history (autowarefoundation#387)

* Port pose history to ROS2

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* pose_history (autowarefoundation#1169)

* change pkg name

* add alpha

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>

* fix max velocity visualization (autowarefoundation#397)

* fix max velocity vis

* apply lint-format

* Ros2 rtd plugin (autowarefoundation#444)

* Use RTD instead of MFD

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Sync public repo (autowarefoundation#1228)

* [simple_planning_simulator] add readme (autowarefoundation#424)

* add readme of simple_planning_simulator

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Update simulator/simple_planning_simulator/README.md

* set transit_margin_time to intersect. planner (autowarefoundation#460)

* Fix pose2twist (autowarefoundation#462)

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Ros2 vehicle info param server (autowarefoundation#447)

* add vehicle_info_param_server

* update vehicle info

* apply format

* fix bug

* skip unnecessary search

* delete vehicle param file

* fix bug

* Ros2 fix topic name part2 (autowarefoundation#425)

* Fix topic name of traffic_light_classifier

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix topic name of traffic_light_visualization

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix topic name of traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix topic name of traffic_light_map_based_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_recognition

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix issues in hdd_reader (autowarefoundation#466)

* Fix some issues detected by Coverity Scan and Clang-Tidy

* Update launch command

* Add more `close(new_sock)`

* Simplify the definitions of struct

* fix: re-construct laneletMapLayer for reindex RTree (autowarefoundation#463)

* Rviz overlay render fix (autowarefoundation#461)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* uncrustified

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* back to RTD as superclass

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Rviz overlay render in update (autowarefoundation#465)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* uncrustified

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* removed unnecessary includes and some dead code

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Adepted remaining vehicle plugin classes to render-in-update concept. Returned to MFD superclass

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* restored RTD superclass

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>
Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: Makoto Tokunaga <vios-fish@users.noreply.github.com>
Co-authored-by: Adam Dąbrowski <adam.dabrowski@robotec.ai>

* Unify Apache-2.0 license name (autowarefoundation#1242)

* Porting trajectory rviz plugin (autowarefoundation#1295)

* update trajectory rviz plugin to show velocity (autowarefoundation#1257)

* update trajectory rviz plugin to show velocity

* use size_t instead of int to remove warning during compiling

* not show velocity on rviz unless check button is enabled

* modify visibility of velocity (autowarefoundation#1258)

* fix plugin

* add dependency

Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>
Co-authored-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* Fix msgs (autowarefoundation#1379)

* Fix msgs

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* [autoware_planning_rviz_plugin]: Fix lint

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Fix topic name of autoware_perception_rviz_plugin (autowarefoundation#1277) (autowarefoundation#1479)

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* Porting polar grid to ros2 (autowarefoundation#1507)

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Add dummy unknown publisher (autowarefoundation#1470)

* Add dummy unknown publisher

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Fix lint

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add pre-commit (autowarefoundation#1560)

* add pre-commit

* add pre-commit-config

* add additional settings for private repository

* use default pre-commit-config

* update pre-commit setting

* Ignore whitespace for line breaks in markdown

* Update .github/workflows/pre-commit.yml

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* exclude svg

* remove pretty-format-json

* add double-quote-string-fixer

* consider COLCON_IGNORE file when seaching modified package

* format file

* pre-commit fixes

* Update pre-commit.yml

* Update .pre-commit-config.yaml

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: pre-commit <pre-commit@example.com>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* Fix -Wunused-parameter (autowarefoundation#1836)

* Fix -Wunused-parameter

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix mistake

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix spell

* Fix lint issues

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Ignore flake8 warnings

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp>

* suppress warnings for common packages (autowarefoundation#1891)

* add maybe unused

* add Werror

* fix for uncrustify

* add sort-package-xml hook in pre-commit (autowarefoundation#1881)

* add sort xml hook in pre-commit

* change retval to exit_status

* rename

* add prettier plugin-xml

* use early return

* add license note

* add tier4 license

* restore prettier

* change license order

* move local hooks to public repo

* move prettier-xml to pre-commit-hooks-ros

* update version for bug-fix

* apply pre-commit

* add autoware_state_rviz_plugin (autowarefoundation#2160)

* initial commit

* fix

* use raw pointer

* fix style

* fix style

* fix style

* fix style

* fix header arrangement

* add gear check and prefix label (autowarefoundation#2173)

* add gear and prefix label

* add subscription

* fix for cpplint

* add engage button and status (autowarefoundation#2257)

* fix style

* add engage button and engage status

* use api

* fix for pre commit

* fix for cpplint

* fix

* fix for cpplint

* fix for cpplint

* fix coding style

* Add datetime panel (autowarefoundation#2275)

* Add datetime panel

* Fix/ros time (autowarefoundation#2276)

* Fix ros time

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Add icon

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>

* add footprint in trajectory msg of rviz plugin (autowarefoundation#1553) (autowarefoundation#1684)

* add footprint in trajectory msg of rviz plugin (autowarefoundation#1553)

* add footprint in trajectory msg of rviz plugin

* update

* trajectory -> footprint

* update

* add icons

* rename trajectory footprint from footprint

* add PathFootprint

* update

* Add min value

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>

* Feature/trajectory point rviz plugin (autowarefoundation#2123)

* add trajectory point

* set trajectory point view false by default

* add pull over/out module (autowarefoundation#2147)

* Change formatter to clang-format and black (autowarefoundation#2332)

* Revert "Temporarily comment out pre-commit hooks"

This reverts commit 748e9cdb145ce12f8b520bcbd97f5ff899fc28a3.

* Replace ament_lint_common with autoware_lint_common

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Remove ament_cmake_uncrustify and ament_clang_format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply Black

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply clang-format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix build errors

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix for cpplint

* Fix include double quotes to angle brackets

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply clang-format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix build errors

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* remove unused depends (autowarefoundation#496)

* Add COLCON_IGNORE (autowarefoundation#500)

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* port planning rviz plugins (autowarefoundation#492)

* port planning rviz plugins

* remove COLCON_IGNORE

Co-authored-by: Takayuki Murooka <takayuki.murooka@tier4.jp>

* port autoware vehicle rviz plugin (autowarefoundation#542)

* [ polar grid ] add readme polar grid remove colcon ignore (autowarefoundation#559)

* remove ignore

* add readme

* fix invalid link

* port autoware_state_rviz_plugin (autowarefoundation#563)

* remove COLCON_IGNORE form rviz plugins (autowarefoundation#544)

* port autoware_perception_rviz_plugin (autowarefoundation#581)

* add readme in rviz plugin (autowarefoundation#591)

* [autoware_vehicle_rviz_plugin/route_handler/simple_planning_simulator]fix some packages (autowarefoundation#606)

* fix console meter

* fix velocity_history

* fix route handler

* change topic name

* adding autoware_auto_perception_rviz_plugin (autowarefoundation#574)

* [152] Implement BoundingBoxArray rviz display plugin.

* [285] Clear bounding box markers before adding new markers on new message

* [274] Trajectory visualization plugin

* raw types to sized type

* ControllerTestingNode: added publish_state(), publish_trajectory(), no timer hack to start test, all init is init()

* Squashed 'src/external/mpc/' changes from 8fc7cfdd..eaa5908b

eaa5908b Merge branch 'input-weight-modify' into 'master'
b9ee8e4f Update default mpc_controller_node parameters
8d15f49d Add weights to acceleration and steer controls; loosen simulation test case:

git-subtree-dir: src/external/mpc
git-subtree-split: eaa5908bdd987051a9dcd9c505f99bfd7f028547

* [autowarefoundation#404] apply ament_auto macro to autoware_rviz_plugins

* Adding missing dependency on rviz2.

* Squashed 'src/external/autoware_auto_msgs/' changes from 56550efd..f40970ea

f40970ea Adding velocity_mps to VehicleControlCommand.

git-subtree-dir: src/external/autoware_auto_msgs
git-subtree-split: f40970ead34d36a695b432dc37accff9d67c17e2

* Update copyright headers to transfer ownership to Autoware Foundation

Signed-off-by: Juan Pablo Samper <jp.samper@apex.ai>

* Add CHANGELOG and update package versions for release

Add CHANGELOG and update package versions for release

* [autowarefoundation#286] Parameterize boundingbox colors from rviz
 - Add visualization colours via Qt

* [autowarefoundation#813] use autoware_set_compile_options() for nearly all compiled tests

- fix a few causes of warnings and disable warning flags as needed for
other tests
- set CXX_STANDARD strictly and only in a single place
- add CMake flag `AUTOWARE_OPTIMIZATION_OF_SLOW_TARGETS`. Default: OFF
- update building instructions and MR template
- fix nasty initialization error of static constexpr member in `GenericState`
of Kalman filter

* [autowarefoundation#910] remove private compilation warning ignore flags

* [autowarefoundation#900] Implement rviz plugin to visualize TrackedObjects

* [autowarefoundation#1110] Implement rviz plugin for DetectedObjects msg

* Resolve "Clarify meaning of pose in *ObjectKinematics messages"

* [autowarefoundation#1221] Add co-developed entry to copyright

* [autowarefoundation#1282] Fix double free in ObjectPolygonDisplayBase rviz plugin

* [autowarefoundation#1355] Make DetectedObject shape corners be in object-local coordinates

* porting AAP perception visualization from https://github.com/tier4/AutowareArchitectureProposal.iv/blob/main/perception/util/visualizer/dynamic_object_visualization/include/dynamic_object_visualization/dynamic_object_visualizer.hpp

* rename to autoware_auto_perception_rviz_plugin

* fix copyright

* format code

* fix typo

* convert camel to snake case

* Apply suggestions from code review

Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>

* change color

* replace boost::optional to std::optional

* add icons

* set marker id to value corresponding to the upper 32 bits of uuid

* format code

* change motorsycle color

* add uuid map to set marker id

* format code

* remove brief comment

* fix lint error

* fix include sort

* format code

* fix include

* add autoware_auto_perception_rviz_plugin to pre commit excluded list

Co-authored-by: Yunus Emre Caliskan <yunus.ec@gmail.com>
Co-authored-by: Christopher Ho <christopher.ho@apex.ai>
Co-authored-by: MIURA Yasuyuki <kokosabu@gmail.com>
Co-authored-by: Jit Ray Chowdhury <jit.ray.c@gmail.com>
Co-authored-by: Joshua Whitley <josh.whitley@autoware.org>
Co-authored-by: Juan Pablo Samper <jp.samper@apex.ai>
Co-authored-by: Jilada Eccleston <jilada.eccleston@tier4.jp>
Co-authored-by: Frederik Beaujean <Frederik.Beaujean@apex.ai>
Co-authored-by: Vincent Richard <vincent.francois.richard@gmail.com>
Co-authored-by: Gowtham <gowtham.ranganathan@apex.ai>
Co-authored-by: Nikolai Morin <nikolai.morin@apex.ai>
Co-authored-by: Igor Bogoslavskyi <igor.bogoslavskyi@gmail.com>
Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>

* add autoware_auto_perception_rviz_plugin README (autowarefoundation#631)

* fix readme sentence grammar (autowarefoundation#634)

* Auto/fix perception viz (autowarefoundation#639)

* add ns of uuid

* remove dynamic_object_visualization

* update to support velocity report header (autowarefoundation#655)

* update to support velocity report header

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Update simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp

Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>

* use maybe_unused

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* fix precommit

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>

* adapt to actuation cmd/status as control msg (autowarefoundation#646)

* adapt to actuation cmd/status as control msg

* fix readme

* fix topics

* fix remaing topics

* as to pacmod interface

* fix vehicle status

* add header to twist

* revert gyro_odometer_change

* revert twist topic change

* revert unchanged package

* FIx vehicle status topic name/type (autowarefoundation#658)

* shift -> gear_status

* twist -> velocity_status

* Sync .auto branch with the latest branch in internal repository (autowarefoundation#691)

* add trajectory point offset in rviz plugin (autowarefoundation#2270)

* sync rc rc/v0.23.0 (autowarefoundation#2258)

* fix interpolation for insert point (autowarefoundation#2228)

* fix interpolation for insert point

* to prev interpolation pkg

* Revert "to prev interpolation pkg"

This reverts commit 9eb145b5d36e297186015fb17c267ccd5b3c21ef.

Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com>
Co-authored-by: taikitanaka <ttatcoder@outlook.jp>

* fix topic name (autowarefoundation#2266)

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Add namespace to diag for dual_return_filter (autowarefoundation#2269)

* Add a function to make 'geometry_msgs::msg::TransformStamped' (autowarefoundation#2250)

* Add a function to make 'geometry_msgs::msg::TransformStamped'
* Add 'child_frame_id' as an argument of 'pose2transform'

* Simplify marker scale initialization (autowarefoundation#2286)

* Fix/crosswalk polygon (autowarefoundation#2279)

* extend crosswalk polygon

* improve readability

* fix polygon shape

* Add warning when decel distance calculation fails (autowarefoundation#2289)

Signed-off-by: Makoto Kurihara <mkuri8m@gmail.com>

* [motion_velocity_smoother] ignore debug print (autowarefoundation#2292)

* cosmetic change

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* cahnge severity from WARN to DEBUG for debug info

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* use util for stop_watch

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* fix map based prediction (autowarefoundation#2200)

* fix map based prediction

* fix format

* change map based prediction

* fix spells

* fix spells in comments

* fix for cpplint

* fix some problems

* fix format and code for clang-tidy

* fix space for cpplint

* Update Readme.md

* Update perception/object_recognition/prediction/map_based_prediction/Readme.md

* Update perception/object_recognition/prediction/map_based_prediction/Readme.md

* Update perception/object_recognition/prediction/map_based_prediction/Readme.md

* Update perception/object_recognition/prediction/map_based_prediction/Readme.md

* Update perception/object_recognition/prediction/map_based_prediction/Readme.md

* Update perception/object_recognition/prediction/map_based_prediction/Readme.md

* fix vector access method

* fix readme format

* add parameter

* Update perception/object_recognition/prediction/map_based_prediction/Readme.md

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* Update perception/object_recognition/prediction/map_based_prediction/Readme.md

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* Update perception/object_recognition/prediction/map_based_prediction/Readme.md

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* Update Readme.md

* Update perception/object_recognition/prediction/map_based_prediction/Readme.md

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* remove failure condition for 0 velocity trajectory (autowarefoundation#2295)

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* [mpc_follower] remove stop distance condition from stopState decision (autowarefoundation#1916)

* [mpc_follower] remove stop distance condition from stopState decision

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add invalid index handling

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Move the debug marker initialization part to another file (autowarefoundation#2288)

* Move the debug marker initialization part to 'debug.cpp'

* Make 'isLocalOptimalSolutionOscillation' independent from 'NDTScanMatcher' (autowarefoundation#2300)

* Remove an unused function 'getTransform' (autowarefoundation#2301)

* Simplify iteration of initial poses (autowarefoundation#2310)

* Make a transform object const (autowarefoundation#2311)

* Represent poses in 'std::vector' instead of 'geometry_msgs::msg::PoseArray' (autowarefoundation#2312)

* Feature/no stopping area (autowarefoundation#2163)

* add no stopping area module to behavior velocity planner

* apply utils

* add polygon interpolation module order stopline around area is considered

* devide jpass udge with stop line polygon

* update docs

* rename file name

* update to latest

* minor change for marker

* update license

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>

* update license

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>

* update license

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>

* update license

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>

* minor fix

* add parameter tuning at experiment

* update readme

* format doc

* apply comments

* add exception gurd

* cosmetic change

* fix ament

* fix typo and remove for statement

* & to " "

* better ns

* return pass judge param

* add missing stoppable condition

* add clear pass judge and stoppable flag

* add comment

* precommit fix

* cpplint

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>

* sync rc rc/v0.23.0 (autowarefoundation#2281)

* Fix side shift planner (autowarefoundation#2171) (autowarefoundation#2172)

* add print debug

Signed-off-by: TakaHoribe <horibe.takamasa@gmail.com>

* remove forward shift points when adding new point

Signed-off-by: TakaHoribe <horibe.takamasa@gmail.com>

* remove debug print

Signed-off-by: TakaHoribe <horibe.takamasa@gmail.com>

* format

Signed-off-by: TakaHoribe <horibe.takamasa@gmail.com>

* Fix remove threshold

Co-authored-by: Fumiya Watanabe <rej55.g@gmail.com>

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Fix/pull out and pull over (autowarefoundation#2175)

* delete unnecessary check

* fix condition of starting pull out

* Add emergency status API (autowarefoundation#2174) (autowarefoundation#2182)

* Fix/mpc reset prev result (autowarefoundation#2185) (autowarefoundation#2195)

* reset prev result

* clean code

* reset only raw_steer_cmd

* Update control/mpc_follower/src/mpc_follower_core.cpp

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* [hotfix] 1 path point exception after resampling (autowarefoundation#2204)

* fix 1 path point exception after resampling

Signed-off-by: TakaHoribe <horibe.takamasa@gmail.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>

Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>

* [hotfix] Fix lane ids (autowarefoundation#2211)

* Fix lane ids

* Prevent acceleration on avoidance (autowarefoundation#2214)

* prevent acceleration on avoidance

Signed-off-by: TakaHoribe <horibe.takamasa@gmail.com>

* fix param name

Signed-off-by: TakaHoribe <horibe.takamasa@gmail.com>

* parametrize avoidance acc

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* change param name

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* fix typo

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Fix qos in roi cluster fusion (autowarefoundation#2218)

* fix confidence (autowarefoundation#2220)

* too high confidence (autowarefoundation#2229)

* Fix/obstacle stop 0.23.0 (autowarefoundation#2232)

* fix unexpected slow down in sharp curves (autowarefoundation#2181)

* Fix/insert implementation (autowarefoundation#2186)

Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>

* [hotfix] Remove exception in avoidance module (autowarefoundation#2233)

* Remove exception

* Fix clock

* Remove blank line

* Update traffic light state if ref stop point is ahead of previous one (autowarefoundation#2197)

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* fix interpolation for insert point (autowarefoundation#2228)

* fix interpolation for insert point

* to prev interpolation pkg

* fix index (autowarefoundation#2265)

* turn signal calculation (#2280)

* add turn signal funtion in path shifter

* add ros parameters

Co-authored-by: Fumiya Watanabe <rej55.g@gmail.com>
Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>
Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com>
Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>
Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>
Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>
Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com>
Co-authored-by: Sugatyon <32741405+Sugatyon@users.noreply.github.com>

* [behavior_path_planner] fix sudden path change around ego (autowarefoundation#2305) (autowarefoundation#2318)

* fix return-from-ego shift point generation logic

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* change param for trimSimilarGradShiftPoint

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add comment for issue

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update comment

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* replace code with function (logic has not changed)

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* move func to cpp

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add comment for issue

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* fix typo

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Update planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* Update planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* Add functions to make stamped scalar messages (autowarefoundation#2317)

* Fix/object yaw in intersection module (autowarefoundation#2294)

* fix object orientation

* fix function name

* add guard (autowarefoundation#2321)

* reduce cost (double to float) (autowarefoundation#2298)

* Add detail collision check (autowarefoundation#2274)

* Add detail collision check

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Remove unused function

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Fix arc length

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Seperate time margin

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Fix parameter name

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Update Readme

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Address review: Add comment for TimeDistanceArray

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Run pre-commit

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Fix cpplint

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Add return for empty polygon

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* update CenterPoint  (autowarefoundation#2222)

* update to model trained by mmdet3d

* add vizualizer (debug)

* for multi-frame inputs

* chagne config

* use autoware_utils::pi

* project specific model and param

* rename vfe -> encoder

* rename general to common

* update download link

* update

* fix

* rename model_name

* change training toolbox link

* chage lint package

* fix test error

* commit suggestion

* Feature/lane change detection (autowarefoundation#2331)

* add old information deleter

* fix access bug

* change to deque

* update obstacle buffer

* fix some bugs

* add lane change detector

* make a update lanelet function

* fix code style

* parameterize essential values

* Update perception/object_recognition/prediction/map_based_prediction/src/map_based_prediction_ros.cpp

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* fix slash position

* remove unnecessary lines

* fix format

* fix format

* change to new enum

* fix format

* fix typo and add guard

* change funciton name

* add lane change description

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* Add Planning Evaluator  (autowarefoundation#2293)

* Add prototype planning evaluator

Produced data for dist between points, curvature, and relative angle

* Cleanup the code to make adding metrics easier

* Add remaining basic metrics (length, duration, vel, accel, jerk)

* Add motion_evaluator to evaluate the actual ego motion + code cleanup

* Add deviation metrics

* Add naive stability metric

* Handle invalid stat (TODO: fix the output file formatting)

* Add parameter file and cleanup

* Add basic obstacle metric (TTC not yet implemented) and fix output file format

* Add basic time to collision

* Add lateral-distance based stability metric

* Add check (at init time) that metrics' maps are complete

* Publish metrics as ParamaterDeclaration msg (for openscenario)

* Use lookahead and start from ego_pose when calculating stability metrics

* Code cleanup

* Fix lint

* Add tests

* Fix bug with Frechet dist and the last traj point

* Finish implementing tests

* Fix lint

* Code cleanup

* Update README.md

* Remove unused metric

* Change msg type of published metrics to DiagnosticArray

* fix format to fix pre-commit check

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* fix yaml format to fix pre-commit check

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* fix yaml format

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* apply clang-format

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* apply clang-format

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Update planning/planning_diagnostics/planning_evaluator/include/planning_evaluator/planning_evaluator_node.hpp

* Update planning/planning_diagnostics/planning_evaluator/test/test_planning_evaluator_node.cpp

* Update planning/planning_diagnostics/planning_evaluator/test/test_planning_evaluator_node.cpp

* change lint format to autoware_lint_common

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Add keep braking function at driving state (autowarefoundation#2346)

* Add keep braking function at driving state

Signed-off-by: Makoto Kurihara <mkuri8m@gmail.com>

* Remove debug messages

Signed-off-by: Makoto Kurihara <mkuri8m@gmail.com>

* Fix format

Signed-off-by: Makoto Kurihara <mkuri8m@gmail.com>

* Change diag_updater's pediod from default to 0.1sec (autowarefoundation#2348)

* add cross judgement and common signal function (autowarefoundation#2319)

* merge branch turn_signal_common

* add turn signal function in signal decider

* add cross judge in path_utilities and delete from turn_signal_decider

* remove original signal calculation in lane change

* omit substitution

* replace turn signal decider in pull over function

* modify cross judge logic

* replace turn signal decider in avoidance

* add readme of turn signal

* update

* delete print debug

* update

* delete lane change decider in path shifter

* delete blank line

* fix indent

* fix typo

* fix typo

* decrease nest

* run pre commit

* Add 0 limit at forward jerk velocity filter (autowarefoundation#2340)

Signed-off-by: Makoto Kurihara <mkuri8m@gmail.com>

* add time offset param to point cloud concatenation (autowarefoundation#2303)

* add offset param

* clang-format

Co-authored-by: Akihito OHSATO <aohsato@gmail.com>

* Feature/add doc for keep braking function at driving state (autowarefoundation#2366)

* Add the description of brake keeping

Signed-off-by: Makoto Kurihara <mkuri8m@gmail.com>

* Add the english document

Signed-off-by: Makoto Kurihara <mkuri8m@gmail.com>

* Improve description

Signed-off-by: Makoto Kurihara <mkuri8m@gmail.com>

* Add english description

Signed-off-by: Makoto Kurihara <mkuri8m@gmail.com>

* Fix include files (autowarefoundation#2339)

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix behavior intersection module

* fix behavior no stopping area module

* fix planning_evaluator

* fix motion_velocity_smoother

* rename variable

* Revert "[mpc_follower] remove stop distance condition from stopState decision (autowarefoundation#1916)"

This reverts commit ff4f0b5a844d1f835f1b93bd3b36a76747b0cd02.

* Revert "Add keep braking function at driving state (autowarefoundation#2346)"

This reverts commit f0478187db4c28bf6092c198723dcc5ec11a9c70.

* Revert "Feature/add doc for keep braking function at driving state (autowarefoundation#2366)"

This reverts commit 66de2f3924a479049fce2d5c5c6b579cacbd3e49.

* Fix orientation availability in centerpoint

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* fix test_trajectory.cpp

* add target link libraries

* Use .auto msg in test code for planniing evaluator

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* fix include

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>
Co-authored-by: autoware-iv-sync-ci[bot] <87871706+autoware-iv-sync-ci[bot]@users.noreply.github.com>
Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com>
Co-authored-by: taikitanaka <ttatcoder@outlook.jp>
Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: Takeshi Miura <57553950+1222-takeshi@users.noreply.github.com>
Co-authored-by: Takeshi Ishita <ishitah.takeshi@gmail.com>
Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>
Co-authored-by: Makoto Kurihara <mkuri8m@gmail.com>
Co-authored-by: purewater0901 <43805014+purewater0901@users.noreply.github.com>
Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>
Co-authored-by: Fumiya Watanabe <rej55.g@gmail.com>
Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com>
Co-authored-by: Sugatyon <32741405+Sugatyon@users.noreply.github.com>
Co-authored-by: s-murakami-esol <81723883+s-murakami-esol@users.noreply.github.com>
Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>
Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>
Co-authored-by: Shunsuke Miura <37187849+miursh@users.noreply.github.com>
Co-authored-by: Shinnosuke Hirakawa <8327162+0x126@users.noreply.github.com>
Co-authored-by: Akihito OHSATO <aohsato@gmail.com>
Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp>

* [autoware_auto_perception_rviz_plugin]fix bug (autowarefoundation#721)

* fix perception_marker

* fix missing commit

* apply format

* patch for PR721 (autowarefoundation#722)

* fix id_map erase operation

* fix code to use c++11 function

* update tracked_objects_display

* fix bug

Co-authored-by: Taichi Higashide <taichi.higashide@tier4.jp>

* fix rviz plugin (autowarefoundation#743)

* move plugin packages

* add ignore file to apply pre-commit

Co-authored-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>
Co-authored-by: Servando <43142004+sgermanserrano@users.noreply.github.com>
Co-authored-by: Nikolai Morin <nnmmgit@gmail.com>
Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com>
Co-authored-by: nik-tier4 <71747268+nik-tier4@users.noreply.github.com>
Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>
Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp>
Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com>
Co-authored-by: Makoto Tokunaga <vios-fish@users.noreply.github.com>
Co-authored-by: Adam Dąbrowski <adam.dabrowski@robotec.ai>
Co-authored-by: Keisuke Shima <keisuke.shima@tier4.jp>
Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: wep21 <border_goldenmarket@yahoo.co.jp>
Co-authored-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com>
Co-authored-by: pre-commit <pre-commit@example.com>
Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp>
Co-authored-by: kyoichi sugahara <81.s.kyo.19@gmail.com>
Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com>
Co-authored-by: Takayuki Murooka <takayuki.murooka@tier4.jp>
Co-authored-by: Takeshi Miura <57553950+1222-takeshi@users.noreply.github.com>
Co-authored-by: Taichi Higashide <taichi.higashide@tier4.jp>
Co-authored-by: Yunus Emre Caliskan <yunus.ec@gmail.com>
Co-authored-by: Christopher Ho <christopher.ho@apex.ai>
Co-authored-by: MIURA Yasuyuki <kokosabu@gmail.com>
Co-authored-by: Jit Ray Chowdhury <jit.ray.c@gmail.com>
Co-authored-by: Joshua Whitley <josh.whitley@autoware.org>
Co-authored-by: Juan Pablo Samper <jp.samper@apex.ai>
Co-authored-by: Jilada Eccleston <jilada.eccleston@tier4.jp>
Co-authored-by: Frederik Beaujean <Frederik.Beaujean@apex.ai>
Co-authored-by: Vincent Richard <vincent.francois.richard@gmail.com>
Co-authored-by: Gowtham <gowtham.ranganathan@apex.ai>
Co-authored-by: Nikolai Morin <nikolai.morin@apex.ai>
Co-authored-by: Igor Bogoslavskyi <igor.bogoslavskyi@gmail.com>
Co-authored-by: autoware-iv-sync-ci[bot] <87871706+autoware-iv-sync-ci[bot]@users.noreply.github.com>
Co-authored-by: taikitanaka <ttatcoder@outlook.jp>
Co-authored-by: Takeshi Ishita <ishitah.takeshi@gmail.com>
Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>
Co-authored-by: Makoto Kurihara <mkuri8m@gmail.com>
Co-authored-by: purewater0901 <43805014+purewater0901@users.noreply.github.com>
Co-authored-by: Fumiya Watanabe <rej55.g@gmail.com>
Co-authored-by: Sugatyon <32741405+Sugatyon@users.noreply.github.com>
Co-authored-by: s-murakami-esol <81723883+s-murakami-esol@users.noreply.github.com>
Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>
Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>
Co-authored-by: Shunsuke Miura <37187849+miursh@users.noreply.github.com>
Co-authored-by: Shinnosuke Hirakawa <8327162+0x126@users.noreply.github.com>
Co-authored-by: Akihito OHSATO <aohsato@gmail.com>
@liuzf1988
Copy link

I have some problems when compiling centerpoint with TVM, both for "llvm" backend and "cuda" backend. I'm not sure if the problem is caused by TVM or improper configuration file settings. Taking "pts_backbone_neck_head_default.onnx" model as example, describe the setting and problems follows.

  1. the "definitation.yaml" of centerpoint
    centerpoint-backbone-model-struct
    centerpoint-backbone-definitation

  2. the problems encountered
    a. for cup backend:
    centerpoint-backbone-cpu-error

b. for cuda backend:
centerpoint-backbone-cuda-error

Looking forward to your advice

@ambroise-arm
Copy link
Contributor

Your configuration file looks correct.
I think the issue comes from TVM not having good support for dynamic parameters.

I'm not sure what is the exact effect of specifying "-1" as shape parameter. I've tried to let TVM handle the shape automatically by making the following change in ModelZoo and then building the docker image locally:

diff --git a/scripts/tvm_cli/tvm_cli.py b/scripts/tvm_cli/tvm_cli.py
index 7d5fa54..fec132a 100755
--- a/scripts/tvm_cli/tvm_cli.py
+++ b/scripts/tvm_cli/tvm_cli.py
@@ -75 +75 @@ def get_network(info):
-        mod, params = relay.frontend.from_onnx(onnx_model, info['input_dict'])
+        mod, params = relay.frontend.from_onnx(onnx_model)

Testing for llvm the error becomes RuntimeError: Invalid type of axis: <class 'tvm.tir.expr.Add'>, which gets referenced here: https://discuss.tvm.apache.org/t/how-could-us-use-tvm-relay-transform-tomixedprecision/10465/14
And testing for cuda I get RuntimeError: cuda winograd conv2d doesn't support dynamic input height or width..

@liuzf1988
Copy link

liuzf1988 commented Jul 5, 2022

Your configuration file looks correct. I think the issue comes from TVM not having good support for dynamic parameters.

I'm not sure what is the exact effect of specifying "-1" as shape parameter. I've tried to let TVM handle the shape automatically by making the following change in ModelZoo and then building the docker image locally:

diff --git a/scripts/tvm_cli/tvm_cli.py b/scripts/tvm_cli/tvm_cli.py
index 7d5fa54..fec132a 100755
--- a/scripts/tvm_cli/tvm_cli.py
+++ b/scripts/tvm_cli/tvm_cli.py
@@ -75 +75 @@ def get_network(info):
-        mod, params = relay.frontend.from_onnx(onnx_model, info['input_dict'])
+        mod, params = relay.frontend.from_onnx(onnx_model)

Testing for llvm the error becomes RuntimeError: Invalid type of axis: <class 'tvm.tir.expr.Add'>, which gets referenced here: https://discuss.tvm.apache.org/t/how-could-us-use-tvm-relay-transform-tomixedprecision/10465/14 And testing for cuda I get RuntimeError: cuda winograd conv2d doesn't support dynamic input height or width..

Recently I'm trying to use the dev version of tvm (i.e. the main branch of tvm) instead of the stable 0.8 version, which seems to solve the RuntimeError: Invalid type of axis: <class 'tvm.tir.expr.Add'> error. However the RuntimeError: cuda winograd conv2d doesn't support dynamic input height or width. error remains.

@mitsudome-r mitsudome-r added the status:help-wanted Assistance or contributors needed. label Jul 5, 2022
@mitsudome-r
Copy link
Member Author

mitsudome-r commented Jul 5, 2022

If we don't have enough engineers who can support TVM packages, then I don't think we can proceed with the task. If there is no progress for another week, then we might want to consider using other ML Inference library.
(past discussion about using TVM)

@ambroise-arm
Copy link
Contributor

ambroise-arm commented Jul 5, 2022

Although it seems we can't compile this model with dynamic parameters with the current state of TVM, I can compile it just fine with fixed parameters. The code for LidarCenterpoint in this repository already hardcodes "batch_size" to 1. And the default values for range_max_*_, range_min_*_ and voxel_size_*_ give an "H" and "W" value of 560.

By replacing the "-1" with those values in "definition.yaml", the model compiles without errors.

@liuzf1988 I see that you are trying to target CUDA as a backend, but support for CUDA is not enabled in autoware/model-zoo-tvm-cli:latest. We have autoware/model-zoo-tvm-cli:latest-cuda for that, but it's not really tested; and even if it compiles we don't have a prebuilt TVM runtime that supports CUDA for the Autoware side. I suggest targeting Vulkan instead if you want GPU acceleration.

@ambroise-arm
Copy link
Contributor

@mitsudome-r So good news: I was wrong during the ASWG by saying it was a model issue. If we don't plan on changing the width and height parameters, or if we can keep a small number of possible values, then we can probably go ahead with TVM and fixed parameters.

@liuzf1988
Copy link

Although it seems we can't compile this model with dynamic parameters with the current state of TVM, I can compile it just fine with fixed parameters. The code for LidarCenterpoint in this repository already hardcodes "batch_size" to 1. And the default values for range_max_*_, range_min_*_ and voxel_size_*_ give an "H" and "W" value of 560.

By replacing the "-1" with those values in "definition.yaml", the model compiles without errors.

@liuzf1988 I see that you are trying to target CUDA as a backend, but support for CUDA is not enabled in autoware/model-zoo-tvm-cli:latest. We have autoware/model-zoo-tvm-cli:latest-cuda for that, but it's not really tested; and even if it compiles we don't have a prebuilt TVM runtime that supports CUDA for the Autoware side. I suggest targeting Vulkan instead if you want GPU acceleration.

Yes, I totally agree with you to compile LidarCenterpoint model using default value for "batch_size", "H" and "W" at current. And TVM's Relax architecture (i.e. relay next) which supports dynamic shape workloads is under development.

@BonoloAWF BonoloAWF moved this to In Progress in Bus ODD Project Jul 12, 2022
@mitsudome-r
Copy link
Member Author

@liuzf1988 @ambroise-arm Thanks for the update.
@liuzf1988 Could you try with your proposed approach to use the default values for the model input?

@xmfcx xmfcx added this to the Bus ODD July-Aug Milestone milestone Jul 19, 2022
@xmfcx
Copy link
Contributor

xmfcx commented Jul 26, 2022

@liuzf1988 Are there any updates on this task?

@liuzf1988
Copy link

@liuzf1988 Are there any updates on this task?

@xmfcx So busy these days, sorry for not being able to reply to the message in time. If there is no misunderstanding, we need to write a document for converting raw Lidar Centerpoint model to TVM based modules. Apart from the document, the code for compiling the raw model will also be provided. I'll try to get these done by this weekend.

@mitsudome-r mitsudome-r assigned liuzf1988 and unassigned esteve Aug 2, 2022
@liuzf1988
Copy link

@ambroise-arm
Referring to the official TVM documentation and the existing script (tvm_cli.py) of autoware model zoo, I wrote the independent script for compiling the neuron network model. However, there are some issues that may need to confirm with you:

  • Which files need to be uploaded to the cloud

In the original script, i.e.,tvm_cli.py, the command used to compile the model is: graph, lib, params = relay.build(mod, target=info['target'], params=params), However, for the current version of tvm-0.10.dev0, the origin compilation command will be deprecated and modified to: lib=relay.build(mod, target=info['target'], params=params)

So we originally had to upload three output files, "deploy_lib.so", "deploy_param.params", and "deploy_graph.json", but now only the "deploy_lib.so" file need to upload.
In addition, where should the compiled module file (deploy_lib.so) be uploaded, should it be uploaded to Amazon S3 Bucket as previous? And compiled module files for which backends need to provided (llvm and vulkan, right) ?

  • How to import centerpoint_tvm package to Autoware.universe

I see that you propose a pull request (PR-1181) to port the lidar_apollo_segmentation_tvm packet from Autoware.Auto to Autoware.Universe. Do I need to write a similar package named lidar_centerpoint_tvm to port centerpoint module in the same way? If so, it needs some extra time , and this work is in progress.

@ambroise-arm
Copy link
Contributor

ambroise-arm commented Aug 15, 2022

@liuzf1988

Thanks for your update.

I wrote the independent script for compiling the neuron network model.

If the current script cannot be used as is, do you think it can be modified to accommodate for the compilation of Lidar Centerpoint? That would be preferable to having standalone scripts per model.

Files

For the distribution of the neural network, the idea would be to use the ModelZoo repository for that. The onnx neural network can be committed to the repository (with the relevant definition.yaml file, and possible modifications to the script to have it compile). That way the network will start to get compiled and uploaded automatically to the S3 bucket as part of the ModelZoo CI (currently for llvm and vulkan backends). (see diagrams of the architecture)

Currently ModelZoo uses TVM 0.8 to compile the models. And the tvm_vendor package that provides the runtime capability to Autoware is also on version 0.8 at the moment.
If there is a need to update to TVM 0.9 for Lidar Centerpoint to work, that can be scheduled. But we won't be using a development version, so no 0.10 until it is released.

Package

Yes, I think it is important to have a dedicated package for lidar_centerpoint_tvm. The tvm_utility package provides a pipeline.hpp header so that all packages that make use of TVM in Autoware can use a common interface both for downloading the compiled models and for the inference. tvm_utility has a yolo_v2_tiny test case as an example. And lidar_apollo_segmentation_tvm acts as an example for a standalone package. I think it would be good for lidar_centerpoint_tvm to also use the interface provided by tvm_utility.
That way, when the change in artifacts structure you mentioned with TVM 0.10 happens, it can be taken care of on the Autoware side by only changing tvm_utility instead of the individual packages that make use of it.

@BonoloAWF
Copy link

@liuzf1988 we are organising a meeting to discuss a way forward for TVM in Autoware. If you are interested in joining us please confirm your email address. Thank you.

@mitsudome-r mitsudome-r added this to the Bus ODD Sep-Oct Milestone milestone Aug 30, 2022
@xmfcx xmfcx moved this to In Progress in Bus ODD Project Sep 6, 2022
@mitsudome-r
Copy link
Member Author

We had a discussion among @ambroise-arm, @xmfcx , @BonoloAWF , @angry-crab last week on this topic. See this comment for the summary.

@mitsudome-r
Copy link
Member Author

@liuzf1988 Do you have any progress with this issue? @angry-crab might be able to help you if there are any other blocking items.

@angry-crab
Copy link
Contributor

@liuzf1988 Hi, it would be great if you could share the definition.yaml files so that I'll take over the rest. Thanks.

@angry-crab
Copy link
Contributor

angry-crab commented Sep 13, 2022

@ambroise-arm
Please correct me if I'm wrong.
To sum up, based on the discussion above, we need to do the followings:

  1. fixed input and output size of the network.
  2. push onnx files along with definition.yaml to model_zoo repo.
  3. edit the cli scipt if necessary.

Also, I was wondering since tvm_utility is merged, is cuda backend ready to be tested? Thanks.

@ambroise-arm
Copy link
Contributor

ambroise-arm commented Sep 13, 2022

@angry-crab Yes to the points you listed, plus:

  • have a way to run the TVM model (I suggested here having a separate Autoware package for that, but it could be something else, I don't know what makes the most sense for what we want to achieve)
  • document the procedure

For the cuda backend, it is possible to compile networks for it with the script in ModelZoo. And using the result of that compilation with tvm_utility should work. But the automated compilation and release pipeline of the ModelZoo CI only targets llvm and vulkan (although that could be changed if there is a need). So yes, but it will be a manual process.
EDIT: One more thing, the TVM runtime provided by tvm_vendor is not compiled with cuda support. So that is also something that will need to be compiled and installed locally. A very manual process then.
I would recommend using the Vulkan backend for GPU acceleration, unless there a specific need for cuda.

@angry-crab
Copy link
Contributor

@ambroise-arm
Thanks for the information. I've pushed centerpoint models. CenterPoint
I'll work on the migration to tvm. As for cuda backend, I'll create another issue after this one is closed.

@liuzf1988
Copy link

@liuzf1988 Do you have any progress with this issue? @angry-crab might be able to help you if there are any other blocking items.
A ROS2 package named lidar_centerpoint_tvm was finished last week, but I encountered some problems during the debugging process, and is working on it this week.

@angry-crab
Copy link
Contributor

@liuzf1988
Thanks for the update. I had a look into the current centerpoint implementation. It is using some hand-crafted cuda kernels for processing intermediate data. Did you convert these kernels into tvm operations? It would be great if you could share the repo/link so that I could help.

@liuzf1988
Copy link

@angry-crab
Yes, it take some time to rewrite the cuda code (currently it is changed to std::thread implementation). Can I submit the code to a pull request tomorrow (I need a little time to restore and organize the code)? Then we can together debug and optimize the code.

@liuzf1988
Copy link

@liuzf1988 Thanks for the update. I had a look into the current centerpoint implementation. It is using some hand-crafted cuda kernels for processing intermediate data. Did you convert these kernels into tvm operations? It would be great if you could share the repo/link so that I could help.

@angry-crab
Here is the two definitions for voxel_encoder and backbone_neck_head onnx model of centerpoint.

definition.zip

@angry-crab
Copy link
Contributor

Ideally, cuda kernels could be generated by tvm by defining high-level abstraction, such as tvmScript or tensor Equation. In this issue, it makes more sense to first convert kernels into c++ code and then migrate to tvm dialects to ensure correctness.

@angry-crab
Copy link
Contributor

As a reference of using current tvm utility, apollo_segmentation_tvm also uses c++ for preprocessing and postprocessing. I think tvmScript implemention should be handled in a different issue after this issue is closed.

@masahi
Copy link

masahi commented Nov 3, 2022

Hi everyone, I'm one of developers from the TVM community. I'm very pleased to find that TVM is being integrated to Autoware. Feel free to reach out for any help (I'm active in our discussion forum https://discuss.tvm.apache.org/).

P.S. I've worked on improving the Vulkan backend last year, and I consider it to be one of TVM's unique strengths - Glad to see that it has found a new industrial use case.

@angry-crab
Copy link
Contributor

Hi everyone, I'm one of developers from the TVM community. I'm very pleased to find that TVM is being integrated to Autoware. Feel free to reach out for any help (I'm active in our discussion forum https://discuss.tvm.apache.org/).

P.S. I've worked on improving the Vulkan backend last year, and I consider it to be one of TVM's unique strengths - Glad to see that it has found a new industrial use case.

Hi,
Thank you so much for reaching out. TVM is a really great project with amazing features. We will definitely keep integrating/testing TVM. Please also let us know if there is anything we could do for the TVM community!

@angry-crab
Copy link
Contributor

Closed because the PR is merged.

Repository owner moved this from In Progress to Done in Bus ODD Project Nov 28, 2022
zulfaqar-azmi-t4 pushed a commit to zulfaqar-azmi-t4/autoware.universe that referenced this issue Oct 5, 2023
…warefoundation#5180) (autowarefoundation#908)

* fix coordinate transformation. linear.x denotes longtidional velocity, not the x velocity in the world coordinate



* declare Eigen type



---------

Signed-off-by: Yuki Takagi <yuki.takagi@tier4.jp>
ryuichi-maeda pushed a commit to sensefield/autoware.universe that referenced this issue Jan 10, 2025
* feat: add GitHubAction upload pilotauto source code to GDrive (autowarefoundation#908)

* Add GitHubAction upload pilotauto source code to GDrive

* style(pre-commit): autofix

* リポジトリ名を変数に変更

* コメントの前にスペースを追加

* libunwindとghcupがスペルチェックで引っかからないように修正

* Update .github/workflows/upload-pilot-auto-to-gdirve.yml

* Update .github/workflows/upload-pilot-auto-to-gdirve.yml

* Update .github/workflows/upload-pilot-auto-to-gdirve.yml

* Update .github/workflows/upload-pilot-auto-to-gdirve.yml

* Update .github/workflows/upload-pilot-auto-to-gdirve.yml

* Update .github/workflows/upload-pilot-auto-to-gdirve.yml

* style(pre-commit): autofix

* Update .github/workflows/upload-pilot-auto-to-gdirve.yml

* Update .github/workflows/upload-pilot-auto-to-gdirve.yml

* style(pre-commit): autofix

---------

Co-authored-by: AkariNakano821 <AkariNakano821@users.noreply.github.com>
Co-authored-by: Shumpei Wakabayashi <42209144+shmpwk@users.noreply.github.com>
Co-authored-by: shmpwk <shmpwk@users.noreply.github.com>

* fix(upload-pilot-auto-to-gdrive): fix generate-token (autowarefoundation#912)

* fix(upload-pilot-auto-to-gdrive): fix generate-token

* add git config

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

* disable mlmodel download

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

* install vcs

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

* style(pre-commit): autofix

* feat: get_ml_model

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

* add owner

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

* Update .github/workflows/upload-pilot-auto-to-gdirve.yml

* rename file

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>

---------

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>
Co-authored-by: shmpwk <shmpwk@users.noreply.github.com>

* feat: 手動起動時にタグ指定ができるように修正 (autowarefoundation#971)

* 手動起動時にタグ指定ができるように修正

* 一部コメント等消えていたため修正

* style(pre-commit): autofix

* Update upload-pilot-auto-to-gdrive.yaml

* style(pre-commit): autofix

* Update upload-pilot-auto-to-gdrive.yaml

* Clone Autoware repository内処理を修正

---------

Co-authored-by: AkariNakano821 <AkariNakano821@users.noreply.github.com>

* fix: fixed a bug where the tag version was not displayed in the file name (autowarefoundation#975)

ファイル名にタグVerが表示されない不具合の修正

---------

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>
Co-authored-by: AkariNakano821 <akari.nakano@tier4.jp>
Co-authored-by: AkariNakano821 <AkariNakano821@users.noreply.github.com>
Co-authored-by: Shumpei Wakabayashi <42209144+shmpwk@users.noreply.github.com>
Co-authored-by: shmpwk <shmpwk@users.noreply.github.com>
iwatake2222 pushed a commit to iwatake2222/autoware.universe that referenced this issue Jan 17, 2025
…oundation#908)

* Added parameters of sensor points

Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>

* Added unit

Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>

---------

Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) priority:high High urgency and importance. status:help-wanted Assistance or contributors needed. type:new-feature New functionalities or additions, feature requests.
Projects
No open projects
Status: Done
Development

No branches or pull requests

8 participants