-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throws wrong type error while parsing ompl_planning.yaml #184
Comments
You're right, it's a bug in ompl_interface.cpp#L181 it loop over the parameters' name and expect string for all of them which isn't the case here In ROS1 calling a getParam with a different type return false, in ROS2 it throws an exception |
I see, that'll be tricky to get to work right if it throws an exception |
@jrgnicho How about adding a map of KNOWN_GROUP_PARAMS and ParameterType and getting the parameter that matches the parameter type .? |
Something like this should work.
|
Probably, but in general I would prefer either a template function (instead of explicit type checks) or introducing a convention that forbids variable types. I also thought that there are already some implicit conversions available, at least for double and int.
That's interesting, could you start an issue on that? |
That should work but I'm with @henningkayser on preferring template functions |
turns out the solution was to port joint reordering functionality over in joint_trajectory_controller. I've integrated it into the jtc pr. |
Great, thanks! |
Description
In loading the config yaml files for MoveItCPP in my application,
an incorrect yaml type error is thrown when parsing the ompl_planning.yaml file
Overview of your issue here.
I don't have a screen capture of the actual error message but it seemed to suggest that it expected a string but got a double instead. I was able to get it to accept the yaml file by placing quotes around the value assigned to
longest_valid_segment_fraction
field in order to make it a string, see hereYour environment
Steps to reproduce
Load ompl_planning.yaml file which includes the
longest_valid_segment_fraction
set to a doubleExpected behaviour
MoveItCPP should load the yaml file and configure itself from it
Actual behaviour
Throws exception saying that it expected a string but got a double instead
Backtrace or Console output
Did't capture :(
The text was updated successfully, but these errors were encountered: