Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(accel_brake_map_calibrator): replace polling takeData function with the callback function #7429

Merged
merged 4 commits into from
Jun 11, 2024

Conversation

N-Eiki
Copy link
Contributor

@N-Eiki N-Eiki commented Jun 11, 2024

Description

In this PR, instead of getting msg in callback, it is changed to get msg using takeData function of polling_subscriber in utils.

Recreate PR from #7282 to handle conflicts happned from this PR merge #7351

Related links

Tests performed

// terminal1
ros2 launch accel_brake_map_calibrator accel_brake_map_calibrator.launch.xml rviz:=true use_sim_time:=true

// terminal2
ros2 bag play <rosbag file> --clock

The module works as before. By the way, I only have a rosbag file that was collected with the old messages (autoware_auto_* msgs). I don't have any rosbag files with the new messages (autoware_* msgs). So, I confirmed with the old rosbag file and replaced the messages later.

before with old msg

abc_before.mp4

after with old msg

abc_after.mp4

Notes for reviewers

Interface changes

none

ROS Topic Changes

ROS Parameter Changes

Effects on system behavior

none

Pre-review checklist for the PR author

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

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

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

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

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

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

@github-actions github-actions bot added the component:vehicle Vehicle-specific implementations, drivers, packages. (auto-assigned) label Jun 11, 2024
@N-Eiki N-Eiki requested review from shmpwk, zusizusi and shtokuda June 11, 2024 03:19
@N-Eiki N-Eiki added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 11, 2024
@@ -46,10 +46,10 @@ AccelBrakeMapCalibrator::AccelBrakeMapCalibrator(const rclcpp::NodeOptions & nod
max_accel_ = declare_parameter<double>("max_accel", 5.0);
min_accel_ = declare_parameter<double>("min_accel", -5.0);
pedal_to_accel_delay_ = declare_parameter<double>("pedal_to_accel_delay", 0.3);
max_data_count_ = declare_parameter<int>("max_data_count", 200);
max_data_count_ = static_cast<int>(declare_parameter<int>("max_data_count", 200));
Copy link
Contributor

@shmpwk shmpwk Jun 11, 2024

Choose a reason for hiding this comment

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

Suggested change
max_data_count_ = static_cast<int>(declare_parameter<int>("max_data_count", 200));
max_data_count_ = static_cast<int>(declare_parameter("max_data_count", 200));

or max_data_count_ = declare_parameter<int>("max_data_count", 200); ??

Copy link
Contributor

@shmpwk shmpwk left a comment

Choose a reason for hiding this comment

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

LGTM!
From next time, please divide the PR when it includes the refactoring 🙏

@shmpwk shmpwk enabled auto-merge (squash) June 11, 2024 06:31
@shmpwk shmpwk disabled auto-merge June 11, 2024 06:31
@shmpwk shmpwk merged commit 72237f7 into autowarefoundation:main Jun 11, 2024
24 checks passed
KhalilSelyan pushed a commit that referenced this pull request Jul 22, 2024
…ith the callback function (#7429)

* fix : repush to solve conflict

Signed-off-by: N-Eiki <[email protected]>

* style(pre-commit): autofix

* delete duplicated int cast

Signed-off-by: N-Eiki <[email protected]>

---------

Signed-off-by: N-Eiki <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:vehicle Vehicle-specific implementations, drivers, packages. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants