swri-robotics / marti_common

Common utility functions for MARTI
BSD 3-Clause "New" or "Revised" License
54 stars 63 forks source link

swri_transform_util [Foxy]: UtmTransformer silently doesn't initialize based on tf tree #632

Closed jonselling closed 1 year ago

jonselling commented 3 years ago

Depending on the value of the frame set in the local_xy_util (either through a "/local_xy_origin" message or a parameter), the UtmTransformer will not initialize. This was an issue when trying to set a frame_id with a leading "/". The tf2 buffer core code seems to be pretty consistent on removing leading slashes

I think this can be resolved with:

  1. Adding an else statement with a RCLCPP_ERROR stating the frame was not in the tf buffer. Possibly printing all available frame.
  2. Remove any leading slash in the Handle Origin function for the LocalXyWgs84Util class. I believe this change is fine, since it seems like we assume that the frame_id is in the tf tree (which requires no leading slash).
danthony06 commented 1 year ago

@jonselling https://github.com/swri-robotics/marti_common/pull/725 should implement both of your fixes.