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

fix(joy_controller): joy_type is only set from the param.yaml file #6475

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

xmfcx
Copy link
Contributor

@xmfcx xmfcx commented Feb 21, 2024

Description

Part of:

Related:

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.

@xmfcx xmfcx added the DevOps Dojo: ROS Node Conf Related to Open AD Kit WG label Feb 21, 2024
@xmfcx xmfcx self-assigned this Feb 21, 2024
@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Feb 21, 2024
@xmfcx xmfcx added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Feb 21, 2024
@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 21, 2024

@satoshi-ota @rej55 I've looked for all the references of this joy_type parameter and it is not referenced by any other launch file.

Screenshot from 2024-02-21 21-24-02

If someone wants to set this parameter, they should use the param.yaml file as planned.

Please review 🙇‍♂️

@xmfcx xmfcx marked this pull request as ready for review February 21, 2024 18:25
Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 14.64%. Comparing base (b86a00d) to head (a075503).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6475   +/-   ##
=======================================
  Coverage   14.64%   14.64%           
=======================================
  Files        1899     1899           
  Lines      130282   130282           
  Branches    38311    38311           
=======================================
  Hits        19083    19083           
  Misses      89784    89784           
  Partials    21415    21415           
Flag Coverage Δ *Carryforward flag
differential 0.00% <ø> (?)
total 14.64% <ø> (ø) Carriedforward from b86a00d

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

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

@xmfcx xmfcx force-pushed the fix/joy-controller-schemas branch from 088c90a to 7662812 Compare February 22, 2024 11:52
Copy link
Contributor

@kaspermeck-arm kaspermeck-arm left a comment

Choose a reason for hiding this comment

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

LGTM!

@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 23, 2024

@rej55 @satoshi-ota @shmpwk @taikitanaka3 @TakaHoribe @takayuki5168 @tkimura4

Could you review as a code owner? I would like to merge this as soon as possible and make the action required.

@rej55
Copy link
Contributor

rej55 commented Feb 23, 2024

@xmfcx
This package should be optionally launched, separate from Autoware, if we would like to control from joy.
The launch command is like following.

ros2 launch joy_controller joy_controller.launch.xml joy_type:=G29

As you can see, we would like to launch joy_controller with joy_typeargument, so joy_type should be able to change dynamically.

@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 23, 2024

@rej55 you can call it like:

ros2 launch joy_controller joy_controller.launch.xml config_file:=/path/to/config-file.param.yaml

And set it in the .param.yaml file.

Why is this not enough?

@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 23, 2024

If necessary, we can generate 4 param.yaml files for each joystick type, would this be alright?

@rej55
Copy link
Contributor

rej55 commented Feb 23, 2024

@xmfcx
Thank you for your suggestion.
It seems okay for me.

I will ask the user of this package.
Could you wait?
(It may take a while to reply because it is a holiday... 🙇)

@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 23, 2024

Another option would be to create a second launch file, called joy_controller_no_yaml.launch.xml or joy_controller_direct_params.launch.xml.

And this new launch file wouldn't use the param.yaml at all. All params would be set in the launch file.

By default we would use the joy_controller.launch.xml and for convenience, you could use the joy_controller_no_yaml version.

What do you think?

@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 23, 2024

@rej55 Watanabe-san, happy birthday :D sorry for writing in the holiday time!

It's totally ok to merge this early next week!

It's so simple after all, I am open for negotiations for the ways to implement this.

@shmpwk
Copy link
Contributor

shmpwk commented Feb 25, 2024

I agree launching joy_controller with

ros2 launch joy_controller joy_controller.launch.xml config_file:=/path/to/config-file.param.yaml

I think it would be better to add instructions on how to launch it to the README for previous users.

@rej55
Copy link
Contributor

rej55 commented Feb 26, 2024

@xmfcx
Thank you for waiting, the users also agreed the following suggestion;

If necessary, we can generate 4 param.yaml files for each joystick type, would this be alright?

Could you make these parameter files and add instruction to README?

@xmfcx xmfcx force-pushed the fix/joy-controller-schemas branch from 7662812 to 9d7e37c Compare February 26, 2024 09:40
@github-actions github-actions bot added the type:documentation Creating or refining documentation. (auto-assigned) label Feb 26, 2024
@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 26, 2024

@rej55 @shmpwk I've updated the README and the param files and the launch file.

Also added a new simple launch file to make everyone happy.

# With default config (ds4)
ros2 launch joy_controller joy_controller.launch.xml

# Default config but select from the existing parameter files
ros2 launch joy_controller joy_controller_param_selection.launch.xml joy_type:=ds4 # or g29, p65, xbox

# Override the param file
ros2 launch joy_controller joy_controller.launch.xml config_file:=/path/to/your/param.yaml

The old users can make use of the new joy_controller_param_selection.launch.xml launch file to select a config easily from the terminal.

The default launch file makes use of the param files as agreed.

Signed-off-by: M. Fatih Cırıt <[email protected]>
@xmfcx
Copy link
Contributor Author

xmfcx commented Feb 26, 2024

@rej55 @shmpwk ready for review again.

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!

@xmfcx xmfcx enabled auto-merge (squash) February 26, 2024 10:55
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. Thank you.

@xmfcx xmfcx merged commit fdd3f9e into main Feb 26, 2024
28 of 29 checks passed
@xmfcx xmfcx deleted the fix/joy-controller-schemas branch February 26, 2024 17:38
StepTurtle pushed a commit to StepTurtle/autoware.universe that referenced this pull request Feb 28, 2024
HansRobo pushed a commit that referenced this pull request Mar 12, 2024
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:control Vehicle control algorithms and mechanisms. (auto-assigned) DevOps Dojo: ROS Node Conf Related to Open AD Kit WG run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants