Get/Set Transform Service Improvements #15
Merged
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.
I changed the names of the transform setters to be
set_sensor_to_vehicle_translation
andset_sensor_to_vehicle_rotation
so that both the direction and the specific component of the transform is made a bit more clear.I also added a service that returns the full device-stored transform (both translational and rotational) in a way that they could be directly republished in a
geometry_msgs::TransformStamped
from a client node.On that note, I attemped to use the
getSensorToVehicleRotation_quaternion()
, but this is apparenlty not supported by my device (3DM-GX5-45). This seems rather odd, since it appears to be stored as a quaternion internally. I can remove thetf2::convert
and thesetRPY
calls in theget_sensor_to_vehicle_transform
function if that command is supported, which would clean up this patch a bit (though this can be done in a follow up).Tested with the following (run in succession):
Please let me know if you need any adjustments/style changes, I'm more than happy to do so.