C-API: Add set/get origin, xyz2enh and enh2xyz functions#136
Open
CarawaySeed42 wants to merge 8 commits into
Open
C-API: Add set/get origin, xyz2enh and enh2xyz functions#136CarawaySeed42 wants to merge 8 commits into
CarawaySeed42 wants to merge 8 commits into
Conversation
Additive inverse of translation and rotation by modifiers should be applied to channel offsets to retain the global position. This is also necessary to get closer to parity with the Matlab API crg_mods function. Signed-off-by: Patrick Kuemmerle <patrick.kuemmerle@3d-mapping.de>
Signed-off-by: Patrick Kuemmerle <patrick.kuemmerle@3d-mapping.de>
A function to change the global origin was added to the api. Because multiple functions now manipulate the Z channel, this functionality got its designated local function Signed-off-by: Patrick Kuemmerle <patrick.kuemmerle@3d-mapping.de>
Since the heading angle offset is part of the global coordinate system definition, it should also be changable. Signed-off-by: Patrick Kuemmerle <patrick.kuemmerle@3d-mapping.de>
Using the public header, a user has no access to the offset values. Thus a getter function is needed.
To further make use of the global offset values, the xyz2enh and enh2xyz evaluation functions have been translated from the Matlab-API. Now a user can transform between the coordinate systems of different CRG data or simply just get the global coordinates.
Previously offsetting the elevation had three cases: Full refline elevation profile, constant elevation and Z-channel only. When no refline was present, an offset was applied by changing the z-channel mean value. This is confusing and unneccesary, so now all elevation offsets are applied by offsetting the refline. This is also how the Matlab API does offsets. Also, Z-channel first and last values were never used, which made it even more confusing. Signed-off-by: Patrick Kuemmerle <patrick.kuemmerle@3d-mapping.de>
Signed-off-by: Patrick Kuemmerle <patrick.kuemmerle@3d-mapping.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When using multiple CRGs or in conjuction with other external data (e.g. OpenDRIVE maps) it is helpful to be able to evaluate in the same coordinate system.
With this PR the ability to set the global coordinate system origin is added.
Additionally one can transform local crg coordinates to global coordinates analog to existing Matlab API functionality.
RESOLVES: #78