Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Adding messages for sequences #65
Adding messages for sequences #65
Changes from 3 commits
63aa1d5
f0218dc
732cfd6
f5d30af
ff2aaad
08a03d8
390d083
763bd08
02d000f
3fd6dd5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably remove this abstraction and directly include lists of
MotionPlanRequest
andblend_radius
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why? Having the two together in a structure enforces a 1-to-1 mapping of radii to requests.
With separate lists that is note as easily enforced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not really a 1-to-1 mapping since the last
blend_radius
is redundant. Also, message types usually have their own semantics with multiple use cases, but here the semantics already implies the use case of being an array item. So, while this abstraction removes a sanity check it makes the message structure a little more complicated than necessary. There are many messages that just use a convention for array lengths (i.e. Marker, RobotTrajectory..).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be, but that's not a very strong argument to not do it.
Not sure I follow this: the semantics of
MotionSequenceRequest
or something else? Because the name does not necessarily imply that it's an array to me (but: not a native speaker).Huh? If by abstraction you refer to the item struct, then I'm not sure how that removes a check.
It also doesn't seem very unreasonable for a
MotionSequenceRequest
to contain items, which themselves contain information about each item respectively. From that nested structure it's very clear that the information in those items belongs together.While if there were just two plain arrays at the level of the request, interpretation of the message is actually less clear as the relationship between the information in the first array and the second array would only be apparent from and encoded in the code interpreting the message (ie: comes from an external and essentially unconnected source).
that may be, but this seems a bit like a tu-quoque: the fact that this is done in other messages does not necessarily make it a good pattern to apply here.