Skip to content
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

Use 1/0 instead of true/false in ompl_planning.yaml #460

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

stephanie-eng
Copy link
Contributor

If you set the parameter in ompl_planning.yaml to "true" or "false" as suggested in the persistent roadmap section, you will get the following error when planning:

[moveit.planning_request_adapter]: Exception caught executing adapter 'Fix Start State In Collision': bad lexical cast: source type value could not be interpreted as target
[task_planning_action_server-1] Skipping adapter instead.`

In ompl_interface, these parameters are set using boost::lexical_cast<bool>(it->second), which expects numbers as strings ("1" or "0") but will fail if passed a string like "true" or "false".

If we set these parameters to "true" or "false, you will get the following error when planning:

```
`[moveit.planning_request_adapter]: Exception caught executing adapter 'Fix Start State In Collision': bad lexical cast: source type value could not be interpreted as target
[task_planning_action_server-1] Skipping adapter instead.`
```

In ompl_interface, these parameters are set using `boost::lexical_cast<bool>(it->second)`, which expects numbers as strings ("1" or "0") but will fail if passed a string like "true" or "false".
@stephanie-eng stephanie-eng requested a review from AndyZe July 5, 2022 21:21
@AndyZe
Copy link
Member

AndyZe commented Jul 5, 2022

Sorry I forgot about this issue:

moveit/moveit2#1303 (comment)

@AndyZe
Copy link
Member

AndyZe commented Jul 6, 2022

In my opinion, it would be better to fix this in source code rather than updating the documentation.

@stephanie-eng
Copy link
Contributor Author

It would be nice to be ale to accept true/false, but we might want this change for consistency if anything. None of the other OMPL planning parameters use "true" or "false", they're set using booleans, for example: https://github.com/ros-planning/moveit_resources/blob/2c58cf3a2ed4e878a7a491572133670a44573c98/panda_moveit_config/config/ompl_planning.yaml#L43-L47

@AndyZe AndyZe merged commit 6a64b97 into main Jul 6, 2022
@AndyZe AndyZe deleted the stephanie-eng-patch-1 branch July 6, 2022 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants