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

chore: remove autoware_auto_common dependency from simple_planning_simulator and osqp_interface #2233

Conversation

takayuki5168
Copy link
Contributor

@takayuki5168 takayuki5168 commented Nov 7, 2022

Signed-off-by: Takayuki Murooka takayuki5168@gmail.com

Description

related to #2229
remove autoware_auto_common from simple_planning_simulator, osqp_interface

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.

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.

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

velocity.lateral_velocity = 0.0F;
velocity.heading_rate = static_cast<float32_t>(vehicle_model_ptr->getWz());
velocity.heading_rate = static_cast<double>(vehicle_model_ptr->getWz());
return velocity;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure why sometimes float32_t instead of float64_t is used

Copy link
Contributor

Choose a reason for hiding this comment

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

It is because the module interface message was defined by float_32 (e.g. path velocity). This package implementation just followed the interface. (If I remember correctly)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. Thanks.

Should I revert to float?
In other planning packages, we use path velocity as double. Therefore, double can be used here as well IMO.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know much about the risk of using different types, but if it is working, I think it is fine. There is no need to revert your commit. I just wanted to make sure it wasn't an unintentional change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@codecov
Copy link

codecov bot commented Nov 7, 2022

Codecov Report

Base: 11.13% // Head: 11.37% // Increases project coverage by +0.24% 🎉

Coverage data is based on head (3e98ca4) compared to base (536a958).
Patch coverage: 64.77% of modified lines in pull request are covered.

❗ Current head 3e98ca4 differs from pull request most recent head a86aa66. Consider uploading reports for the commit a86aa66 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2233      +/-   ##
==========================================
+ Coverage   11.13%   11.37%   +0.24%     
==========================================
  Files        1203     1202       -1     
  Lines       86264    82738    -3526     
  Branches    20827    20748      -79     
==========================================
- Hits         9605     9412     -193     
+ Misses      66501    63330    -3171     
+ Partials    10158     9996     -162     
Flag Coverage Δ *Carryforward flag
differential 13.32% <64.53%> (?)
total 11.23% <64.59%> (+0.12%) ⬆️ Carriedforward from 0d9c92f

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

Impacted Files Coverage Δ
...nterface/include/osqp_interface/osqp_interface.hpp 0.00% <ø> (ø)
...ulator/vehicle_model/sim_model_delay_steer_acc.hpp 100.00% <ø> (ø)
...vehicle_model/sim_model_delay_steer_acc_geared.hpp 100.00% <ø> (ø)
...ulator/vehicle_model/sim_model_delay_steer_vel.hpp 100.00% <ø> (ø)
...ulator/vehicle_model/sim_model_ideal_steer_acc.hpp 100.00% <ø> (ø)
...vehicle_model/sim_model_ideal_steer_acc_geared.hpp 100.00% <ø> (ø)
...ulator/vehicle_model/sim_model_ideal_steer_vel.hpp 100.00% <ø> (ø)
...ng_simulator/vehicle_model/sim_model_interface.hpp 60.00% <ø> (-6.67%) ⬇️
common/osqp_interface/test/test_osqp_interface.cpp 22.22% <11.76%> (+7.22%) ⬆️
...nning_simulator/simple_planning_simulator_core.cpp 46.15% <22.22%> (+7.97%) ⬆️
... and 628 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@takayuki5168 takayuki5168 marked this pull request as ready for review November 9, 2022 16:01
@takayuki5168
Copy link
Contributor Author

I confirmed that planning simulator works well with this PR locally.

@takayuki5168 takayuki5168 changed the title remove autoware_auto_common dependency from simple_planning_simulator and osqp_interface chore: remove autoware_auto_common dependency from simple_planning_simulator and osqp_interface Nov 9, 2022
@takayuki5168
Copy link
Contributor Author

@TakaHoribe @rej55 @maxime-clem @satoshi-ota Could you review? No behavior change with this PR.

yaw += static_cast<float>((*n.rpy_dist_)(*n.rand_engine_));
odom.pose.pose.orientation = motion::motion_common::from_angle(yaw);

vel.longitudinal_velocity += static_cast<float32_t>(velocity_noise);
vel.longitudinal_velocity += static_cast<double>(velocity_noise);
Copy link
Contributor

@TakaHoribe TakaHoribe Nov 9, 2022

Choose a reason for hiding this comment

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

vel.longitudinal_velocity is defined as a float.
https://github.com/tier4/autoware_auto_msgs/blob/tier4/main/autoware_auto_vehicle_msgs/msg/VelocityReport.idl#L14

Did you replace float32_t with double on purpose in this PR? Or just mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As commented here, on purpose.
I followed the other packages' implementation (= path velocity is handled as double).
#2233 (comment)

Copy link
Contributor

@TakaHoribe TakaHoribe left a comment

Choose a reason for hiding this comment

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

Just change to use the premitive types and remove dependency.
(Note: it is decided not to use the autoware specific types in the autoware.universe. This kind of type definition is discussed in the autoware.core architecture design.)

Copy link
Contributor

@rej55 rej55 left a comment

Choose a reason for hiding this comment

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

LGTM

…, osqp_interface

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
@takayuki5168 takayuki5168 force-pushed the chore/remove-autoware-auto-common-dependency branch from 3e98ca4 to a86aa66 Compare November 10, 2022 01:25
@takayuki5168 takayuki5168 enabled auto-merge (squash) November 10, 2022 01:26
@takayuki5168 takayuki5168 merged commit f07801d into autowarefoundation:main Nov 10, 2022
@takayuki5168 takayuki5168 deleted the chore/remove-autoware-auto-common-dependency branch November 10, 2022 02:14
HansRobo pushed a commit to HansRobo/autoware.universe that referenced this pull request Dec 16, 2022
…mulator and osqp_interface (autowarefoundation#2233)

remove autoware_auto_common dependency from simple_planning_simulator, osqp_interface

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
YoshiRi pushed a commit to YoshiRi/autoware.universe that referenced this pull request Jan 11, 2023
…mulator and osqp_interface (autowarefoundation#2233)

remove autoware_auto_common dependency from simple_planning_simulator, osqp_interface

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: yoshiri <yoshiyoshidetteiu@gmail.com>
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