Add conversions for Accel and Eigen #844
Open
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.
Currently there are conversions available between Eigen and Twist but not Accel. With this PR, I wanted to add the same type of conversion for Accel as well.
I have added
fromMSgbut I also wish to addtoMsgfor Accel. However, since Eigen just uses a 6x1 matrix, there would be no distinction between a Twist Eigen matrix and an Acceleration Eigen matrix. Hence thetoMsgfor Accel would then have the same input as the Eigen to TwisttoMsgand it would throw ambiguity error:A workaround for this would be to also pass the output as reference for acceleration's
toMsghence keeping the api the same for Twist'stoMsgwhile introducing a new one for Accel but that would be against the current design pattern fortoMsgfunctions. Curious to know what you think:If you think it is okay to allow such
toMsgimplementation for Eigen to Accel then I will extend the PR.