Patch robot localization frames #251
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.
Hi guys,
A recent update to
robot_localizationadded a new parameter,base_link_frame_output, which is used as thechild_frame_idin publishedOdometrymessages and theodom->base_linktransform.The new parameter defaults to the
base_linkparameter's value, before prepending thetf_prefix. However, thebase_link_frame_outputparameter doesn't currently get thetf_prefixprepended to its value. As a result, the/<rovername>_ODOMnode generates a<rovername>/odom -> base_linktransform and publishes messages to/<rovername>/odom/filteredwithframe_id=<rovername>/odomandchild_frame_id=base_link, causing the/<rovername>_MAPnode to fail while looking up a required transform.The disconnected and invalid tf tree looks like this:
And the warning message logged by
/<rovername>_MAPlooks like this:[ WARN] [1552193204.070637937, 662.963000000]: Could not obtain transform from base_link to achilles/base_link. Error was Could not find a connection between 'achilles/base_link' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees.There are a couple of ways to fix this issue. One is here in this PR, which is to simply set the
base_link_frame_outputparameter explicitly, prefixed with the rover name. However, if therobot_localizationpackage begins using thetf_prefixfor this parameter, it will break this, and you'll have to pull these lines out again.Another option is to remove the
tf_prefixparameter altogether, and set anyrobot_localizationparameters with explicit prefixes for the rover name. I'll put that fix up on a different PR.It's important to patch this so you can hopefully provide an image with a much later freeze date than Jan 7th. I'm sure many developers are updating packages on their workstations, and I've encountered binary incompatibilities between released versions of at least one package on the Preinstalled Packages list, causing seg faults while running code built on a up-to-date laptop and deployed to a rover with older packages installed.