-
Notifications
You must be signed in to change notification settings - Fork 650
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(interpolation): add functions for flexible usage (non-static spline interpolation) #379
feat(interpolation): add functions for flexible usage (non-static spline interpolation) #379
Conversation
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
I created the following PR with awf/'s branch wrong. So I created another PR with tier4's one. |
// TODO(murooka) use template | ||
// template <typename T> | ||
// std::vector<double> slerpYawFromPoints(const std::vector<T> & points); | ||
std::vector<double> slerpYawFromPoints(const std::vector<geometry_msgs::msg::Point> & points); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spline interpolation classes (SplineInterpolation1d, SplineInterpolationPoint2d) use some common functions like getSplineCoefficients, getSplineInterpolatedValues.
I think we do not have to write a test for these common functions (and of course I do not want to write more tests), so I put them in anonymous namespace, and put all spline interpolation classes in the same file.
What do you think? Should I add a test for common functions to put SplineInterpolationPoint2d in another file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Horibe-san pointed, SplineInterpolationPoint2d may not be propper. But Path2d seems like interpolation for path points (not trajectory points or other types' points)
This class does not depend on any types like Path, so how about SplineInterpolation"Points2d"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could seperated them, and created spline_interpolation_points_2d.hpp. How about this change?
https://github.com/autowarefoundation/autoware.universe/blob/a683cc0b430221aad789e06c5843397a65bad5f6/common/interpolation/include/interpolation/spline_interpolation_points_2d.hpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Codecov Report
@@ Coverage Diff @@
## tier4/proposal #379 +/- ##
==================================================
+ Coverage 9.30% 10.77% +1.47%
==================================================
Files 701 180 -521
Lines 48911 18242 -30669
Branches 5807 2675 -3132
==================================================
- Hits 4549 1965 -2584
+ Misses 40551 14416 -26135
+ Partials 3811 1861 -1950
Continue to review full report at Codecov.
|
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
c2e8460
to
d965378
Compare
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
e3ffc05
to
a683cc0
Compare
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to me. Thank you!
* release v0.4.0 * Support G29 controller in autoware_joy_controller (autowarefoundation#699) * Add map for G29 controller * Add new line at end of file * Change structure of JoyConverterBase class * Rename PS4 -> DS4 * Rename controler_type -> joy_type * Set joy_type by console input * Change doc * Remap g29 controller * Remap AccelPedal -> accel, BrakePedal -> brake * Remove [autoware_joy_controller] from ROS_INFO Co-authored-by: Fumiya Watanabe <fumiya.watanabe@tier4.jp> * Change key map for G29 controller and set deadzone parameter (autowarefoundation#740) * Add missing dependencies of autoware_joy_controller (autowarefoundation#755) Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * 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 c98294b0b159fb98cd3091d34a626d06f29fdece. Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> * add COLCON_IGNORE to ros1 packages Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> * Rename launch files to launch.xml (autowarefoundation#28) * Rename h files to hpp (autowarefoundation#142) * Change includes * Rename files * Adjustments to make things compile * Other packages * 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 * Port autoware joy controller (autowarefoundation#124) * Port Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org> * Fixed package.xml * now() to use node clock Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org> * Fix include Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org> * Clear compilation warnings Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org> * Run uncrustify on the entire Pilot.Auto codebase (autowarefoundation#151) * Run uncrustify on the entire Pilot.Auto codebase * Exclude open PRs * [update to v0.8.0] autoware joy controller (autowarefoundation#251) * restore filename to original for version update Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com> * Enable to change sensitivity (autowarefoundation#868) * Improve remote emergency stop (autowarefoundation#900) * Apply format Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename emergency to system_emergency in vehicle_cmd_gate Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Add emergency stop feature to vehicle_cmd_gate Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix frame_id of vehicle_cmd_gate output Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename /remote/emergency to /remote/emergency_stop in autoware_joy_controller Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename /remote/emergency to /remote/emergency_stop in remote_cmd_converter Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename /remote/emergency to /remote/emergency_stop in autoware_api Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Check emergency_stop timeout in remote_cmd_converter Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Ignore timeout = 0.0 Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Add config_file to arg Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename emergency_stop to external_emergency_stop Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Remove unnecessary lines Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Wait for first heartbeat Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Add clear_emergency_stop service Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Call clear_external_emegency_stop service from autoware_joy_controller Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename function Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Revert: Wait for first heartbeat Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix console messages Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Move emergency_stop diag to vehicle_cmd_gate Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Add heartbeat to vehicle_cmd_gate Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Revert: Move emergency_stop diag to vehicle_cmd_gate Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * patch in real-vehicle * Apply format Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Change default parameter Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> Co-authored-by: jpntaxi4943-autoware <proj-jpntaxi@tier4.jp> * restore file name Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com> * [tmp] fix build error Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com> * fix service Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com> * fix format Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com> * fix service usage Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com> * fix launch var Co-authored-by: Fumiya Watanabe <rej55.g@gmail.com> Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Co-authored-by: jpntaxi4943-autoware <proj-jpntaxi@tier4.jp> * Rename ROS-related .yaml to .param.yaml (autowarefoundation#352) * Rename ROS-related .yaml to .param.yaml Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Remove prefix 'default_' of yaml files Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename vehicle_info.yaml to vehicle_info.param.yaml Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename diagnostic_aggregator's param files Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix overlooked parameters Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * remove using in global namespace (autowarefoundation#379) * remove using in global namespace (autowarefoundation#1166) * remove using in global namespace * Revert "remove using in global namespace" This reverts commit 7f120509c9e3a036a38e84883868f6036bca23ad. * Add package namespace Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp> * [autoware_joy_controller] add lint tests Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp> * fix namespace (autowarefoundation#414) * add use_sim-time option (autowarefoundation#454) * Fix for rolling (autowarefoundation#1226) * Replace doc by description Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Replace ns by push-ros-namespace Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Make control modules components (autowarefoundation#1262) Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Remove use_sim_time for set_parameter (autowarefoundation#1260) Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Remove autoware_debug_msgs from autoware_joy_controller (autowarefoundation#1303) Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Porting remote cmd selector (autowarefoundation#1286) * Feature/add remote cmd selector (autowarefoundation#1179) * Add in/out args of remote_cmd_converter.launch Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Change remote input topic of vehicle_cmd_gate Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Add msgs for remote_cmd_selector Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Add remote_cmd_selector Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename remote_cmd_selector to external_cmd_selector Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Remove VehicleCommand support in autoware_joy_controller Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Support external_cmd_source in autoware_joy_controller.launch (autowarefoundation#1194) Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix porting miss Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * fix missing function * modify xml format * fix include guard * add callback group * modify remap name * Revert "modify remap name" This reverts commit 169cc8d28442825b1d61b0439b9892c913304527. * change topic name * use rclcpp_component * Remove autoware_debug_msgs from autoware_joy_controller Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Change default mode of autoware_joy_controller Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp> * Ros2/create/external commands (autowarefoundation#1299) * add remote message * add remote commands * fix topic * remove unnecessary topic * remove unused topic * add external cmd instead * ToExternalComd * fix topic in joy con * 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> * Add autoware api (autowarefoundation#1979) * Use EmergencyState instead of deprecated EmergencyMode (autowarefoundation#2030) * Use EmergencyState instead of deprecated EmergencyMode Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Use stamped type Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * 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 selected external command API (autowarefoundation#2053) * submit engage with api service from joy controller (autowarefoundation#2320) * fix engagew with api * delete unused * fix for uncrustify * revive vehicle_engage * some fix * revive autoware name * fix service name * 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> * Add COLCON_IGNORE (autowarefoundation#500) Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * port autoware joy controller (autowarefoundation#588) * port autoware joy controller * fix compile error * use odometry instead of twist * update launch Co-authored-by: Takayuki Murooka <takayuki.murooka@tier4.jp> * update README.md in autoware_joy_controller (autowarefoundation#593) * update README.md * update README.md * fix typo * Update control/autoware_joy_controller/README.md Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com> * update README.md Co-authored-by: Takayuki Murooka <takayuki.murooka@tier4.jp> Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com> * fix format * ci(pre-commit): autofix Co-authored-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> Co-authored-by: Fumiya Watanabe <rej55.g@gmail.com> Co-authored-by: Fumiya Watanabe <fumiya.watanabe@tier4.jp> Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Co-authored-by: Nikolai Morin <nnmmgit@gmail.com> Co-authored-by: Servando <43142004+sgermanserrano@users.noreply.github.com> Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com> Co-authored-by: jpntaxi4943-autoware <proj-jpntaxi@tier4.jp> Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com> Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp> Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp> Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com> Co-authored-by: Keisuke Shima <keisuke.shima@tier4.jp> Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp> Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com> Co-authored-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com> Co-authored-by: Takayuki Murooka <takayuki.murooka@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Takeshi Miura <57553950+1222-takeshi@users.noreply.github.com>
…ine interpolation) (#379) * implement spline interpolation class with some refactoring Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fixed runtime error with template functions Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fixed runtime error with template functions Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * add new tests Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * just rename function: getAccumulatedDistance -> getAccumulatedLength Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * dealt not to extrapolation for spline Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * add explanation to the function Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * move SplineInterpolationPoints2d to another file Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * use template for functions to slerp points Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * move doxygen to header Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com> Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
…velop sync main for develop
… rtc auto mode manager config (autowarefoundation#379)
* Update repos * Update repos
Related Issue(required)
#350
Description(required)
example 1
example 2
FYI, conventional usage (calculate spline interpolation every
slerp
execution)Review Procedure(required)
run test
Related PR(optional)
Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
If you are adding new package following items are required:
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks