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

Make OMPL an optional installation #178

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ You can perform common Unity operations in this window:

![test_scene_py_img](./test_scene.png)


## (Optional): OMPL Installation

The Open Motion Planning Library (OMPL) is a flexible, open-source library designed for solving complex motion planning problems for robots and other autonomous systems using state-of-the-art planning algorithms. It is an optional function that will not affect your regular use if not installed.

If you would like to install OMPL, and you've never installed it before, please run the following command:

```
python3 -m pip install https://github.com/ompl/ompl/releases/download/prerelease/ompl-1.6.0-cp310-cp310-manylinux_2_28_x86_64.whl
```

Otherwise, make sure you install the python bindings for your current OMPL version.

If that command doesn't work for you, please go to the OMPL Releases page and find the corresponding python version you are using (the above is for python 3.10).

# Get Started with the Examples
Check the examples in the `pyrcareworld/pyrcareworld/demo/examples` folder.
Expand Down
11 changes: 9 additions & 2 deletions pyrcareworld/pyrcareworld/attributes/__init__.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Say something like

THIS IS AN OPTIONAL FUNCTION, WON'T AFFECT YOUR USE
Unable to import OmplManagerAttr. OMPL is likely not installed: skipping.
If you haven't installed OMPL before, install it using python3 -m pip install https://github.com/ompl/ompl/releases/download/prerelease/ompl-1.6.0-cp310-cp310-manylinux_2_28_x86_64.whl
Otherwise, make sure you install the python bindings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just updated the print message!

image

I'd like to highlight that this will print every time any executable is run, lol. Just wondering if this wall of text might confuse people? That's why I had it kinda short before. But your call!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.. then I think just the first line would work.
Unable...will not affect your use

Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@
from pyrcareworld.attributes.bathing_score_attr import BathingScoreAttr
from pyrcareworld.attributes.dressing_score_attr import DressingScoreAttr
from pyrcareworld.attributes.sponge_attr import SpongeAttr
from pyrcareworld.attributes.omplmanager_attr import OmplManagerAttr
from pyrcareworld.attributes.sponge_score_attr import SpongeScoreAttr

# THIS IS AN OPTIONAL FUNCTION, WON'T AFFECT YOUR USE
try:
from pyrcareworld.attributes.omplmanager_attr import OmplManagerAttr
except ImportError:
print("""Unable to import OmplManagerAttr. OMPL is an optional function that likely will not affect your use.""")


attrs = {
"BaseAttr": BaseAttr,
Expand All @@ -50,5 +55,7 @@
"DressingScoreAttr": DressingScoreAttr,
"SpongeAttr": SpongeAttr,
"PersonRandomizerAttr": PersonRandomizerAttr,
"OmplManagerAttr": OmplManagerAttr
}

if "OmplManagerAttr" in locals():
attrs["OmplManagerAttr"] = OmplManagerAttr
Loading