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

static_transform_publisher more intuitive command-line arguments #295

Closed
clalancette opened this issue Aug 4, 2020 · 5 comments · Fixed by #392
Closed

static_transform_publisher more intuitive command-line arguments #295

clalancette opened this issue Aug 4, 2020 · 5 comments · Fixed by #392
Assignees
Labels
in progress Actively being worked on (Kanban column)

Comments

@clalancette
Copy link
Contributor

clalancette commented Aug 4, 2020

Bug report

The order of command-line arguments in the static_transform_publisher program is hard to remember and follow. This led directly to the problem described in #292. It would be better if the command-line arguments were much more specific so there is no ambiguity. We discussed this in #292 (comment) and #292 (comment) , and the consensus was to add the following command-line arguments:

Group 1:

  • --roll - specify the roll in radians
  • --pitch - specify the pitch in radians
  • --yaw - specify the yaw in radians

Group 2:

  • --roll_deg - specify the roll in degrees
  • --pitch_deg - specify the pitch in degrees
  • --yaw_deg - specify the yaw in degrees

Group 3:

  • --qx - Specify the quaternion X
  • --qy - Specify the quaternion Y
  • --qz - Specify the quaternion Z
  • --qw - Specify the quaternion W

Note that each of the groups is mutually exclusive; if the user specifies --roll, they cannot then specify --roll_deg or --qx (while we technically could support mixed --roll and --pitch_deg, we'll just specify that they are exclusive for simplicity).

In order to "tick-tock" this, we'll also continue to support the old command-line options up to and including Galactic, though with a deprecation warning. After Galactic, we'll remove the old command-line options. The old command-line options should also be mututally exclusive with any of the 3 groups above.

@allenh1 has graciously offered to take on implementing this. @Stapelzeiger FYI.

@allenh1
Copy link
Contributor

allenh1 commented Oct 10, 2020

@clalancette Starting on this now, but I'm wondering how you want the translation handled? I feel like it's appropriate to add --x [value] --y [value] --z [value] (certainly makes the implementation easier, since I can assume things are in pairs), but I also feel like it's kinda silly to do so.

Would you prefer to have a --translation x y z or --xyz x y z?

Also should --frame-id frame and --child-frame-id child_frame follow the same pattern? I don't really have any strong opinions here.

@clalancette
Copy link
Contributor Author

@clalancette Starting on this now, but I'm wondering how you want the translation handled? I feel like it's appropriate to add --x [value] --y [value] --z [value] (certainly makes the implementation easier, since I can assume things are in pairs), but I also feel like it's kinda silly to do so.

I think we should make translation follow the same pattern as the rotation for consistency. Thus, I would go with --x, --y, --z here.

Also should --frame-id frame and --child-frame-id child_frame follow the same pattern? I don't really have any strong opinions here.

Yeah, I think so.


There's a couple of things I failed to think about in the original description.

  1. What happens if the user specifies no rotation or no translation? In that case, I think we should assume the identity transformation.
  2. What happens in the user specifies --x, but not --y or --z? We could either throw an error (meaning that if you specify one of a "group", you have to specify it all), or we could assume identity, but replace the axes that are specified with the user supplied ones. I'm on the fence with that one. I slightly lean towards throwing an error, but I could easily be persuaded otherwise.

@allenh1
Copy link
Contributor

allenh1 commented Oct 12, 2020

We could either throw an error (meaning that if you specify one of a "group", you have to specify it all), or we could assume identity, but replace the axes that are specified with the user supplied ones. I'm on the fence with that one. I slightly lean towards throwing an error, but I could easily be persuaded otherwise.

I would expect things to work with just --x [value] and no --y or --z specified, but I see where you're coming from. Maybe a warning should be printed?

@clalancette
Copy link
Contributor Author

I would expect things to work with just --x [value] and no --y or --z specified, but I see where you're coming from.

Yeah, that's reasonable. Since this is going to be pretty verbose, I think we want to allow people to specify the minimum. I'm just wary of surprises, but in this case I think people will generally assume identity plus whatever they specified.

Maybe a warning should be printed?

I wouldn't suggest a warning, but maybe something informational. Like:

Applying translation of 0, 0, 0
Applying rotation of 0, 0, 0, 1

(you can probably come up with some better wording than that)

@allenh1
Copy link
Contributor

allenh1 commented Jan 30, 2021

@clalancette I'll be starting on this in the next day or so. Sorry for the delays.

@allenh1 allenh1 added the in progress Actively being worked on (Kanban column) label Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Actively being worked on (Kanban column)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants