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

refactor(vehicle_external_cmd_converter): rework parameters #5659

Merged

Conversation

karishma1911
Copy link
Contributor

@karishma1911 karishma1911 commented Nov 23, 2023

Description

Implement the ROS Node configuration layout described in https://github.com/orgs/autowarefoundation/discussions/3371 for the vehicle_external_cmd_converter

  1. Remove the default value from the source code in order to ensure all parameter values are passed from the parameter files.

2.create schema

Tests performed

Not applicable.

Effects on system behavior

Not applicable.

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.

@github-actions github-actions bot added the component:vehicle Vehicle-specific implementations, drivers, packages. (auto-assigned) label Nov 23, 2023
@karishma1911 karishma1911 force-pushed the vehicle_external_cmd_converter branch from 8aee382 to 487fc9c Compare November 23, 2023 11:09
@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 23, 2023
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.

LGTM!

wait_for_first_topic_ = declare_parameter("wait_for_first_topic", true);
control_command_timeout_ = declare_parameter("control_command_timeout", 1.0);
emergency_stop_timeout_ = declare_parameter("emergency_stop_timeout", 3.0);
const double timer_rate = declare_parameter<number>("timer_rate");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const double timer_rate = declare_parameter<number>("timer_rate");
const double timer_rate = declare_parameter<double>("timer_rate");

@@ -42,13 +42,13 @@ ExternalCmdConverterNode::ExternalCmdConverterNode(const rclcpp::NodeOptions & n
std::bind(&ExternalCmdConverterNode::onEmergencyStopHeartbeat, this, _1));

// Parameter
ref_vel_gain_ = declare_parameter("ref_vel_gain", 3.0);
ref_vel_gain_ = declare_parameter<number>("ref_vel_gain");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ref_vel_gain_ = declare_parameter<number>("ref_vel_gain");
ref_vel_gain_ = declare_parameter<double>("ref_vel_gain");

control_command_timeout_ = declare_parameter("control_command_timeout", 1.0);
emergency_stop_timeout_ = declare_parameter("emergency_stop_timeout", 3.0);
const double timer_rate = declare_parameter<number>("timer_rate");
wait_for_first_topic_ = declare_parameter<boolean>("wait_for_first_topic");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
wait_for_first_topic_ = declare_parameter<boolean>("wait_for_first_topic");
wait_for_first_topic_ = declare_parameter<bool>("wait_for_first_topic");

@satoshi-ota
Copy link
Contributor

@karishma1911 Sorry. Could you fix build errors?

@karishma1911 karishma1911 force-pushed the vehicle_external_cmd_converter branch from 40110c8 to 3b20384 Compare November 24, 2023 06:20
@karishma1911
Copy link
Contributor Author

@karishma1911 Sorry. Could you fix build errors?

yes, i fixed above errors

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (765a596) 15.32% compared to head (3b20384) 0.00%.
Report is 55 commits behind head on main.

Files Patch % Lines
vehicle/external_cmd_converter/src/node.cpp 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #5659       +/-   ##
==========================================
- Coverage   15.32%   0.00%   -15.33%     
==========================================
  Files        1721       1     -1720     
  Lines      118559     111   -118448     
  Branches    37995       0    -37995     
==========================================
- Hits        18169       0    -18169     
+ Misses      79657     111    -79546     
+ Partials    20733       0    -20733     
Flag Coverage Δ
differential 0.00% <0.00%> (?)
total ?

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@satoshi-ota satoshi-ota merged commit 64612e4 into autowarefoundation:main Nov 24, 2023
danielsanchezaran pushed a commit to tier4/autoware.universe that referenced this pull request Dec 15, 2023
…foundation#5659)

* vehicle_external_cmd_converter

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

* Update vehicle/external_cmd_converter/src/node.cpp

Co-authored-by: Satoshi OTA <[email protected]>
Signed-off-by: karishma <[email protected]>

* Update vehicle/external_cmd_converter/src/node.cpp

Co-authored-by: Satoshi OTA <[email protected]>
Signed-off-by: karishma <[email protected]>

* vehicle_external_cmd_converter

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

---------

Signed-off-by: karishma <[email protected]>
Co-authored-by: Satoshi OTA <[email protected]>
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.

3 participants