Fix joint_limits.yaml generating integer values for double parameters#3716
Open
Med0kin wants to merge 1 commit intomoveit:mainfrom
Open
Fix joint_limits.yaml generating integer values for double parameters#3716Med0kin wants to merge 1 commit intomoveit:mainfrom
Med0kin wants to merge 1 commit intomoveit:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3716 +/- ##
==========================================
+ Coverage 46.22% 46.32% +0.11%
==========================================
Files 726 726
Lines 59503 59504 +1
Branches 7623 7626 +3
==========================================
+ Hits 27499 27559 +60
+ Misses 31836 31779 -57
+ Partials 168 166 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Description
When
moveit_setup_assistantgeneratesjoint_limits.yaml, whole-number limits like1.0are written as1. This causesmove_groupto crash on startup with:This was previously reported in #2776 and previous #2803 attempted to fix this with
static_cast<double>, which doesn't affect yaml-cpp's output.The underlying issue is that yaml-cpp saves C++'s
doublevalue like1.0as1, which is valid per YAML spec. It is then read as integer bylaunch_param_builder. So1would be both aintandfloat, it is just that it's matched asintfirst.This fix is clearly a workaround and yaml-cpp already has a feature to enforce adding trailing zeros (jbeder/yaml-cpp#1407), but yet not available in recently released version.
An alternative solution would be to enfore the type in
joint_limits.yamlwith!!floattags, where!!float 1would be matched asfloat.Checklist