-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add OMPL as an external (isolating the boost dependency) #3413
Comments
OMPL is good, though it uses Boost. |
Implementation is easy enough, but then it has to be maintained. Using a pre-existing open-source library shares the maintenance cost and is good for the open-source community as a whole. |
Copy from email so that we can keep track of the conversation, and get more input: i wonder if it is possible to have a check in the add_mex() cmake script to make sure that boost does not get linked in (at least not directly) with anything that will share the memory space with matlab? that might be a sufficient guard. On Sep 14, 2016, at 10:08 AM, Jeremy Nimmer [email protected] wrote: Yes. You can have Drake builds with Boost, or Matlab, but not both. I have been considering adding Boost as a C++ dependency for other reasons. Thanks, On Wednesday, September 14, 2016 at 9:09:10 AM UTC-4, Grant Gould wrote: If we would be linking in ompl, this would probable happen all over again. I'm Cc:'ing sammy as he has a better idea than I do of the linker behaviour involved. However I suspect that we would have to find a way to make OMPL and mexfile builds mutually exclusive for this to work, or else find a way for them to live in separate process spaces. On Wed, Sep 14, 2016 at 12:57 AM Hongkai Dai [email protected] wrote: Best, |
@RobotLocomotion/kitware -- what do you think about handling the boost dependency of OMPL? |
@jamiesnape Hi Jamie, I am a new graduate student in Russ's group, and I will be working with Hongkai and you on integrating OMPL into Drake. I tried to install OMPL using MacPort, as stated in the website. But I am getting the error message below: dhcp-18-189-54-19:~ pangtao$ sudo port sync ; install ompl +app Moreover, I believe we need to build OMPL from source, like what I did with Drake, so that we can view and modify the source files, right? But currently build from source instruction is only given for Ubuntu. Is there a way to build OMPL from source on OS X? Thank you! |
True, we will definitely not be using MacPorts. Try this for now:
|
@jamiesnape Thanks! I am able to build OMPL following your instructions. I have a few more questions to ask.
OMPL version: 1.2.1
Declared parameters: Info: No planner specified. Using default.
Declared parameters: logout [Process completed] How can I visualise the output? Should I use their GUI, which seems to need to be built separately, or store the output in a file and then plot them in MATLAB? |
For visualization, you could probably try either. I have not used their GUI, but it would seem a sensible place to start. |
@jamiesnape Thanks! Do you happen to know how to build their GUI? This is what happens when I am trying to run the GUI script now: dhcp-18-189-9-111:gui pangtao$ pwd dhcp-18-189-9-111:gui pangtao$ ./ompl_app.py |
|
I am getting a new error after installing PyOpenGL: dhcp-18-189-9-111:gui pangtao$ ./ompl_app.py |
Thank @jamiesnape for helping setting up OMPL. How should we build it as an external of Drake? Do we want to push OMPL to get rid of Boost dependency? (Since FCL does not depend on Boost any more). |
It would be beneficial if OMPL could remove Boost, but at first glance it would be a lot of work. For now, we could make OMPL and MATLAB mutually exclusive. First step is to make a list of the dependencies that we need to install as additional externals. There are a lot of optional ones that may or may not add functionality that we need. |
The only other option would be to use BCP http://www.boost.org/doc/libs/1_62_0/tools/bcp/doc/html/index.html to namespace and limit the amount of boost that is built for OMPL. Then you can mix it with matlab. |
FYI @mamoll |
Note that the boost dependency might not be as crippling for drake anymore, now that we have a clear separation between matlab and the c++ code. |
When OMPL switched to C++11, we tried to remove much of the Boost usage. Boost.Graph and a few other Boost things are still needed. Are OMPL's python bindings useful for Drake? By default they don't get generated, because it's painfully slow (it takes hours). This is because we don't explicitly mark parts of the API for Python bindings (using something like SWIG), but instead programmatically parse all code with CastXML and have general rules on how to generate Boost.Python code. This minimizes the effort required to update the binding code as the API evolves, but makes for a slow build process. On OS X, you should be able to get the latest release by doing |
I would expect that we would connect directly via C++ (not python). |
The license is good, and at first glance the The Boost dependency will be the question, because non-header-only Boost and MATLAB cannot co-exist. The OMPL build system declares hard dependencies on non-header-only portions of Boost (chrono, date-time, filesystem, thread, serialization, system), though with a quick code search perhaps some of those are vestigial and/or easily worked around (e.g., test-only). To the extent that the Boost use is hidden within @hongkai-dai For a first goal, do we want to use this only in some examples and tests, or do we also imagine our installed toolbox |
@hongkai-dai On Ubuntu 16.04 there is a package of OMPL already at version 1.0.0. Do you know if that version is satisfactory for your needs? |
FYI Proof of concept at https://github.com/jwnimmer-tri/drake/tree/ompl-spike. This uses |
Assuming the Protobuf interface to MATLAB is the future, If we modularized |
As I understand it, though the I do agree, though, that modularizing |
@jwnimmer-tri thanks for looking into this. Currently I think OMPL will be mainly used for the manipulation task in Drake. There are two candidate manipulation scenarios that will consume OMPL
In the first scenario, the OMPL library is called in just ta example code. In the second scenario, I will write some functions in drake/solver, that will call OMPL code. |
@hongkai-dai Is the |
@jwnimmer-tri thanks for creating the ompl-spike branch. OMPL 1.0.0 looks good for us. We only use some basic functionalities in OMPL, like an RRT or RRT*. |
Sounds good. Here were the patches, for the record: Add to pkg_config_package(
name = "ompl",
modname = "ompl",
) Use it from our code: cc_test(
name = "foo",
srcs = ["foo.cc"],
deps = [
"@ompl",
],
) (I'll probably kill off my branch in a week or so.) I think you can take that as a starting point, and then work on a branch to develop the features you want. I think the OMPL dependency can wait to be added to master until such a time as your new features are ready; I don't think Jamie or I need to PR it ahead of time. |
Just to check, is this still high-priority? Came across this from our docs: Should this be captured in a higher-level issue, reflected by what we have in our docs? EDIT: Relates #459 |
I am one of the OMPL developers. If there's anything I can do to make progress here, let me know. I released version 1.4.1 today, a patch-level release. The next version will likely be 1.5.0 and we can change the API a bit if needed to facilitate integration with Drake. |
I think upstreaming all the planners and interfaces in anzu/planning is a higher priority, since we'll need those to fully open-source clutter and other parts of our stack. Those planners serve the role OMPL integration was initially going to serve, On a longer-term basis, having it be easy to use Drake with OMPL, both as a state/motion verifier wrapping the collision checker(s) and in the kinodynamic planners, would be ideal. Much of the work for this on Drake-side APIs will be done when we move anzu/planning's interfaces upstream. For now I think it's most useful to identify build and dependency issues so that these can be worked on for OMPL 1.5.0 and leave specific Drake<->OMPL API questions for later. |
Close it for now. Will open it when needed. EDIT (by Eric Cousineau): Just to expand, this isn't on any near-term roadmap at the moment. However, we'll reopen it once there is a valuable use case or high user demand for this interface. Thanks! |
I wish in this issue, we can discuss whether and how to bring in the sampling based motion planning into Drake.
Currently almost all motion planning in Drake is optimization based. On the other hand, there can be benefits to bring in sampling based motion planning, for at least two reasons
The immediate consumer for the sampling based planner could be
If we agree that we need a sample based planner in Drake, then we can either implement it ourselves, or use some third party library.
I list some existing third party libraries as follows.
In the MATLAB implementation of Drake, we have a bi-directional RRT planner implemented, in https://github.com/RobotLocomotion/drake/blob/master/drake/matlab/solvers/MotionPlanningTree.m.
A quick implementation of RRT-connect in C++ should not be hard. @RussTedrake , do you think in the near future, we need to support a full spectrum of sample based planners as OMPL, including PRM, RRT, RRT*, LBTRRT, etc?
The text was updated successfully, but these errors were encountered: