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

perf(trajectory_follower_nodes): change longitudinal control to use period parameter #763

Conversation

Sharrrrk
Copy link
Contributor

@Sharrrrk Sharrrrk commented Apr 22, 2022

Description

To solve issue #701

Related links

Tests performed

On vehicle test is performed to check the control stability.

  1. Plan a path
  2. Engage vehicle
  3. Check the speed and acceleration control stability.

Notes for reviewers

tier4_control_launch package is also updated accordingly, and duplicated parameters removed the launch.py.

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.

@Sharrrrk Sharrrrk changed the title 701 change longitudinal controller to period control perf(trajectory_follower_nodes): change longitudinal control to use period parameter Apr 22, 2022
@Sharrrrk
Copy link
Contributor Author

@TakaHoribe would you please help me to review this PR?

@codecov
Copy link

codecov bot commented Apr 22, 2022

Codecov Report

Merging #763 (e7183b3) into main (d1cb17e) will increase coverage by 0.15%.
The diff coverage is 42.85%.

@@           Coverage Diff            @@
##            main    #763      +/-   ##
========================================
+ Coverage   9.66%   9.81%   +0.15%     
========================================
  Files        908     907       -1     
  Lines      56560   56717     +157     
  Branches    6830    6786      -44     
========================================
+ Hits        5465    5569     +104     
- Misses     46593   46623      +30     
- Partials    4502    4525      +23     
Flag Coverage Δ *Carryforward flag
differential 34.69% <50.00%> (?)
total 9.63% <50.00%> (-0.03%) ⬇️ Carriedforward from b03d565

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...ion/include/fault_injection/diagnostic_storage.hpp 53.84% <ø> (ø)
...ollower_nodes/src/longitudinal_controller_node.cpp 49.35% <42.85%> (+7.96%) ⬆️
...lision_checker_node/obstacle_collision_checker.cpp 0.00% <0.00%> (-8.14%) ⬇️
...nning/behavior_velocity_planner/test/src/utils.hpp 85.71% <0.00%> (-2.10%) ⬇️
control/trajectory_follower/src/pid.cpp 91.48% <0.00%> (ø)
perception/shape_estimation/src/node.cpp 0.00% <0.00%> (ø)
control/trajectory_follower/test/test_mpc.cpp 53.75% <0.00%> (ø)
planning/behavior_velocity_planner/src/node.cpp 0.00% <0.00%> (ø)
...erception/shape_estimation/lib/corrector/utils.cpp 0.00% <0.00%> (ø)
...eption/shape_estimation/lib/model/bounding_box.cpp 0.00% <0.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cdbff23...e7183b3. Read the comment docs.

@TakaHoribe
Copy link
Contributor

@Sharrrrk Sure. Thank you for your great contribution!

@maxime-clem maxime-clem self-requested a review April 22, 2022 08:58
Copy link
Contributor

@maxime-clem maxime-clem left a comment

Choose a reason for hiding this comment

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

Tested in the planning simulator and everything works fine.
Code changes look good and I only have a few minor comments.

h-ohta referenced this pull request in h-ohta/autoware.universe Apr 26, 2022
* release v0.4.0

* Fixed uninitialized variable. (#763)

* Fixed various bugs. (#768)

* Fixed various bugs.

* Fixed wrong status report of NIC.

* Added the mode of CPU Usage to check statistics calculated as averages among all processors by default. (#788)

* fix uninitialized variables (#816)

* remove ROS1 packages temporarily

Signed-off-by: mitsudome-r <[email protected]>

* Revert "remove ROS1 packages temporarily"

This reverts commit a9436882d50dc09fa5b8d6c0a151a10def76b242.

Signed-off-by: mitsudome-r <[email protected]>

* add COLCON_IGNORE to ros1 packages

Signed-off-by: mitsudome-r <[email protected]>

* Rename launch files to launch.xml (#28)

* Port system monitor to ros2 (#71)

* Implement a utility function that spins and updates a monitor node.

* Port cpu monitor

* Port hdd monitor.

* Port mem_monitor to ROS2

* Port  net_monitor to ROS2

* Port  ntp_monitor to ROS2

* Port  process_monitor to ROS2

* Port GPU_monitor to ROS2

* Port msr_reader and hdd_reader to ROS2

* Clean up the build and launch files:

* Clean up and comment on CMake and package files.
* Port the launch file to ROS2

* Rename h files to hpp (#142)

* Change includes

* Rename files

* Adjustments to make things compile

* Other packages

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

* Use quotes for includes where appropriate (#144)

* Use quotes for includes where appropriate

* Fix lint tests

* Make tests pass hopefully

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

* Run uncrustify on the entire Pilot.Auto codebase

* Exclude open PRs

* ROS2 Linting: system_monitor (#207)

* Add linters

* Fix clang-tidy error in util.hpp

* Ros2 v0.8.0 system monitor (#276)

* fix dependency of system_monitor

Signed-off-by: Takagi, Isamu <[email protected]>

* Rename ROS-related .yaml to .param.yaml (#352)

* Rename ROS-related .yaml to .param.yaml

Signed-off-by: Kenji Miyake <[email protected]>

* Remove prefix 'default_' of yaml files

Signed-off-by: Kenji Miyake <[email protected]>

* Rename vehicle_info.yaml to vehicle_info.param.yaml

Signed-off-by: Kenji Miyake <[email protected]>

* Rename diagnostic_aggregator's param files

Signed-off-by: Kenji Miyake <[email protected]>

* Fix overlooked parameters

Signed-off-by: Kenji Miyake <[email protected]>

* Exclude SwPowerCap as an error. (autowarefoundation#1146) (#364)

Co-authored-by: ito-san <[email protected]>

* [Update v0.9.0] system monitor (#365)

* Disable CPU Load Average warning. (autowarefoundation#1147)

Signed-off-by: mitsudome-r <[email protected]>

* Fix cpu_monitor respawning forever. (autowarefoundation#1150)

* Disable cpu_temperature in planning simulation (autowarefoundation#1151)

Signed-off-by: mitsudome-r <[email protected]>

* Net Monitor: Handle as an error if specified device not exist. (autowarefoundation#1152)

* Handled as an error if specified device not exist.

* Disable network diags in simulation

Signed-off-by: Kenji Miyake <[email protected]>

Co-authored-by: Kenji Miyake <[email protected]>

* apply ament_uncrustify

Signed-off-by: mitsudome-r <[email protected]>

* Disable resource monitoring in planning_simulator (autowarefoundation#1172)

Signed-off-by: Kenji Miyake <[email protected]>

* Treat logging errors as safe faults (autowarefoundation#1164)

Signed-off-by: Kenji Miyake <[email protected]>

* Fix test code of system_monitor (autowarefoundation#1178)

Signed-off-by: Kenji Miyake <[email protected]>

Co-authored-by: ito-san <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>

* Use thread for ntpdate. (autowarefoundation#1160) (#375)

* Use thread for ntpdate. (autowarefoundation#1160)

Signed-off-by: mitsudome-r <[email protected]>

* removed unused variable

Signed-off-by: mitsudome-r <[email protected]>

* Import v0.9.1 (#431)

* add local optimal solution ocillation check to ndt_scan_matcher (autowarefoundation#1182)

* Add obstacle_crush diagnostic (autowarefoundation#1186)

Signed-off-by: Kenji Miyake <[email protected]>

* Fix diagnostics api (autowarefoundation#1185)

* Fix diagnostics api

Signed-off-by: Kenji Miyake <[email protected]>

* Don't overwrite level

Signed-off-by: Kenji Miyake <[email protected]>

* Overwrite level of No Fault diagnostics

Signed-off-by: Kenji Miyake <[email protected]>

* Add missing diag in autoware_error_monitor.yaml (autowarefoundation#1187)

Signed-off-by: Kenji Miyake <[email protected]>

* Filter hazard_status (autowarefoundation#1191)

* Filter hazard_status

Signed-off-by: Kenji Miyake <[email protected]>

* Filter leaf diagnostics

Signed-off-by: Kenji Miyake <[email protected]>

* Fix wrong calculation of available memory. (autowarefoundation#1168)

* Fixed wrong calculation of available memory.

* Added comments about output example of free -tb command.

* Change monitoring method to get HDD temperature and usage per specified device. (autowarefoundation#1195)

* Changed monitoring method to get temperature and usage per specified device.

* Fixed test codes.

* Removed unnecessary (void) parameter.

* return input pointcloud when ground plane not found (autowarefoundation#1190)

* fix yaw-smoothing bug (autowarefoundation#1198)

* Fix lint

Signed-off-by: Kenji Miyake <[email protected]>

Co-authored-by: Taichi Higashide <[email protected]>
Co-authored-by: ito-san <[email protected]>
Co-authored-by: tkimura4 <[email protected]>

* Fix typo in system module (#434)

* Fix typo in system module

* Change variable name

* Move comments

* Apply uncrustify

* Split system_monitor config (#452)

Signed-off-by: Kenji Miyake <[email protected]>

* Remove unnecessary diagnostic update. (#455)

* add use_sim-time option (#454)

* Sync public repo (autowarefoundation#1228)

* [simple_planning_simulator] add readme (#424)

* add readme of simple_planning_simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* Update simulator/simple_planning_simulator/README.md

* set transit_margin_time to intersect. planner (#460)

* Fix pose2twist (#462)

Signed-off-by: Takagi, Isamu <[email protected]>

* Ros2 vehicle info param server (#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 (#425)

* Fix topic name of traffic_light_classifier

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix topic name of traffic_light_visualization

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix topic name of traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix topic name of traffic_light_map_based_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_recognition

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix issues in hdd_reader (#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 (#463)

* Rviz overlay render fix (#461)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <[email protected]>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <[email protected]>

* uncrustified

Signed-off-by: Adam Dabrowski <[email protected]>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <[email protected]>

* back to RTD as superclass

Signed-off-by: Adam Dabrowski <[email protected]>

* Rviz overlay render in update (#465)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <[email protected]>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <[email protected]>

* uncrustified

Signed-off-by: Adam Dabrowski <[email protected]>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <[email protected]>

* removed unnecessary includes and some dead code

Signed-off-by: Adam Dabrowski <[email protected]>

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

Signed-off-by: Adam Dabrowski <[email protected]>

* restored RTD superclass

Signed-off-by: Adam Dabrowski <[email protected]>

Co-authored-by: Takamasa Horibe <[email protected]>
Co-authored-by: tkimura4 <[email protected]>
Co-authored-by: Takagi, Isamu <[email protected]>
Co-authored-by: Kazuki Miyahara <[email protected]>
Co-authored-by: Makoto Tokunaga <[email protected]>
Co-authored-by: Adam Dąbrowski <[email protected]>

* Fix issues in gpu_monitor (autowarefoundation#1248)

* Fix issues in gpu_monitor
* Fix uninitialized variables
* Use range-based for loop
* Fix compile errors of tegra_gpu_monitor
* Replace C-style to C++-style

* Make iterators const

* Fix fmt::format() usage error

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

* Remove use_sim_time for set_parameter (autowarefoundation#1260)

Signed-off-by: wep21 <[email protected]>

* [system_monitor] change some nodes into components (autowarefoundation#1234)

Signed-off-by: mitsudome-r <[email protected]>
Signed-off-by: wep21 <[email protected]>

Co-authored-by: Takeshi Miura <[email protected]>
Co-authored-by: Takeshi Miura <[email protected]>
Co-authored-by: wep21 <[email protected]>

* add system_monitor.launch.py (autowarefoundation#1238)

* add system_monitor.launch.py

* refactor system_monitor.launch.py

* fix launch bug

* fix typo

* fix launch py

* fix param loading

* format code

* fix system monitor executor to publish diagnostics asynclonously (autowarefoundation#1283)

* Fix lint errors (autowarefoundation#1378)

* Fix lint errors

Signed-off-by: Kenji Miyake <[email protected]>

* Fix variable names

Signed-off-by: Kenji Miyake <[email protected]>

* Add kernel CPU usage. (autowarefoundation#1465)

* Add kernel CPU usage.

* Change CPU x: usage to CPU x: total.

* Changed variable name.

* Add markdownlint and prettier (autowarefoundation#1661)

* Add markdownlint and prettier

Signed-off-by: Kenji Miyake <[email protected]>

* Ignore .param.yaml

Signed-off-by: Kenji Miyake <[email protected]>

* Apply format

Signed-off-by: Kenji Miyake <[email protected]>

* suppress warnings for system monitor (autowarefoundation#1723)

* fix for hdd_monitor

* fix no initialization and warning

* change command for ntp_monitor (autowarefoundation#1705)

* [EVT4-403] change command for ntp_monitor

* [EVT4-403] fixed CI build error

* [EVT4-403] fixed cpplint error

* delete executeChronyc thread, fix error topic and log output code

* fix cpplint error and code style divergence

* fix cpplint error(missing correction)

* Fix MD029 (autowarefoundation#1813)

Signed-off-by: Kenji Miyake <[email protected]>

* Fix -Wunused-parameter (autowarefoundation#1836)

* Fix -Wunused-parameter

Signed-off-by: Kenji Miyake <[email protected]>

* Fix mistake

Signed-off-by: Kenji Miyake <[email protected]>

* fix spell

* Fix lint issues

Signed-off-by: Kenji Miyake <[email protected]>

* Ignore flake8 warnings

Signed-off-by: Kenji Miyake <[email protected]>

Co-authored-by: Hiroki OTA <[email protected]>

* add gpu usage per process (autowarefoundation#1798)

* add gpu usage per process

* change illegal usage(4294967295%) to 0%, and fix CI running errors

* Replace gettimeofday with rclcpp::Node::now().

* Fix uncrustify error.

* Replace rclcpp::Node::now() with rclcpp::Clock(RCL_SYSTEM_TIME).

Co-authored-by: ito-san <[email protected]>

* fix some typos (autowarefoundation#1941)

* fix some typos

* fix typo

* Fix typo

Signed-off-by: Kenji Miyake <[email protected]>

Co-authored-by: Kenji Miyake <[email protected]>

* suppress warnings for system directory autowarefoundation#2046

* 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 execution time logging. (autowarefoundation#2066)

* Add markdown-link-check pre-commit (autowarefoundation#2215)

* add markdown-lint-check pre-commit

* delete files argument

* add optional hook

* modify comment

* add comment

* delete hook

* add retry option

* add option

* add files arg

* Fix links in hdd_reader.md

Signed-off-by: Kenji Miyake <[email protected]>

* Ignore 403

Signed-off-by: Kenji Miyake <[email protected]>

* Ignore tier4 github url

Signed-off-by: Kenji Miyake <[email protected]>

* Update link

Signed-off-by: Kenji Miyake <[email protected]>

Co-authored-by: Kenji Miyake <[email protected]>

* 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 <[email protected]>

* Remove ament_cmake_uncrustify and ament_clang_format

Signed-off-by: Kenji Miyake <[email protected]>

* Apply Black

Signed-off-by: Kenji Miyake <[email protected]>

* Apply clang-format

Signed-off-by: Kenji Miyake <[email protected]>

* Fix build errors

Signed-off-by: Kenji Miyake <[email protected]>

* Fix for cpplint

* Fix include double quotes to angle brackets

Signed-off-by: Kenji Miyake <[email protected]>

* Apply clang-format

Signed-off-by: Kenji Miyake <[email protected]>

* Fix build errors

Signed-off-by: Kenji Miyake <[email protected]>

* Add COLCON_IGNORE (#500)

Signed-off-by: Kenji Miyake <[email protected]>

* remove COLCON_IGNORE in system_packages and map_tf_generator (#532)

Co-authored-by: mitsudome-r <[email protected]>
Co-authored-by: ito-san <[email protected]>
Co-authored-by: Kazuki Miyahara <[email protected]>
Co-authored-by: Nikolai Morin <[email protected]>
Co-authored-by: Yunus Emre Çalışkan <[email protected]>
Co-authored-by: Jilada Eccleston <[email protected]>
Co-authored-by: Daisuke Nishimatsu <[email protected]>
Co-authored-by: Takagi, Isamu <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>
Co-authored-by: Ryohsuke Mitsudome <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>
Co-authored-by: Taichi Higashide <[email protected]>
Co-authored-by: Takamasa Horibe <[email protected]>
Co-authored-by: Takagi, Isamu <[email protected]>
Co-authored-by: Makoto Tokunaga <[email protected]>
Co-authored-by: Adam Dąbrowski <[email protected]>
Co-authored-by: Takeshi Miura <[email protected]>
Co-authored-by: Takeshi Miura <[email protected]>
Co-authored-by: wep21 <[email protected]>
Co-authored-by: Hiroki OTA <[email protected]>
Co-authored-by: v-kitahara8153 <[email protected]>
Co-authored-by: ito-san <[email protected]>
Co-authored-by: Keisuke Shima <[email protected]>
Co-authored-by: taikitanaka3 <[email protected]>
h-ohta referenced this pull request in h-ohta/autoware.universe Apr 26, 2022
Signed-off-by: wep21 <[email protected]>

Co-authored-by: Hiroki OTA <[email protected]>
@maxime-clem maxime-clem merged commit e8c0716 into autowarefoundation:main Apr 26, 2022
@Sharrrrk Sharrrrk deleted the 701-Change-longitudinal-controller-to-period-control branch April 27, 2022 10:10
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
…eriod parameter (tier4#763)

* perf(trajectory_follower_nodes): change longitudinal control to use period parameter

Signed-off-by: Shark Liu <[email protected]>

* perf(trajectory_follower_nodes): remove duplicate ros parameters in 'control.launch.py'

Signed-off-by: Shark Liu <[email protected]>

* doc(trajectory_follower_nodes): update design doc according to code update

Signed-off-by: Shark Liu <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: Shark Liu <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
…eriod parameter (tier4#763)

* perf(trajectory_follower_nodes): change longitudinal control to use period parameter

Signed-off-by: Shark Liu <[email protected]>

* perf(trajectory_follower_nodes): remove duplicate ros parameters in 'control.launch.py'

Signed-off-by: Shark Liu <[email protected]>

* doc(trajectory_follower_nodes): update design doc according to code update

Signed-off-by: Shark Liu <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: Shark Liu <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
…eriod parameter (tier4#763)

* perf(trajectory_follower_nodes): change longitudinal control to use period parameter

Signed-off-by: Shark Liu <[email protected]>

* perf(trajectory_follower_nodes): remove duplicate ros parameters in 'control.launch.py'

Signed-off-by: Shark Liu <[email protected]>

* doc(trajectory_follower_nodes): update design doc according to code update

Signed-off-by: Shark Liu <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: Shark Liu <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
…eriod parameter (tier4#763)

* perf(trajectory_follower_nodes): change longitudinal control to use period parameter

Signed-off-by: Shark Liu <[email protected]>

* perf(trajectory_follower_nodes): remove duplicate ros parameters in 'control.launch.py'

Signed-off-by: Shark Liu <[email protected]>

* doc(trajectory_follower_nodes): update design doc according to code update

Signed-off-by: Shark Liu <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: Shark Liu <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
iwatake2222 pushed a commit to iwatake2222/autoware.universe that referenced this pull request Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants