ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

try to build source moveit with source installed ompl

asked 2017-06-05 15:02:15 -0600

Oh233 gravatar image

updated 2017-06-05 18:44:21 -0600

130s gravatar image

I am trying to introduce one new planner to my ompl. This is the reason that I need to install source ompl. I successfully built source ompl but failed when I tried to build moveit. Here is my reuslt of catkin build. Anybody has the similar problem?

/home/ruinian/ws_moveit/src/moveit/moveit_planners/ompl/ompl_interface/src/constraints_library.cpp: In member function ‘ompl::base::StateStoragePtr ompl_interface::ConstraintsLibrary::constructConstraintApproximation(const ModelBasedPlanningContextPtr&, const Constraints&, const Constraints&, const ompl_interface::ConstraintApproximationConstructionOptions&, ompl_interface::ConstraintApproximationConstructionResults&)’:

/home/ruinian/ws_moveit/src/moveit/moveit_planners/ompl/ompl_interface/src/constraints_library.cpp:439:116: error: no matching function for call to ‘ompl::base::StateStorageWithMetadata<std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std::pair<long unsigned int, long unsigned int> > > >::StateStorageWithMetadata(const ModelBasedStateSpacePtr&)’
ConstraintApproximationStateStorage* cass = new ConstraintApproximationStateStorage(pcontext->getOMPLStateSpace());
                                                                                                                ^
In file included from /home/ruinian/ws_moveit/src/moveit/moveit_planners/ompl/ompl_interface/include/moveit/ompl_interface/model_based_planning_context.h:48:0,
                 from /home/ruinian/ws_moveit/src/moveit/moveit_planners/ompl/ompl_interface/include/moveit/ompl_interface/planning_context_manager.h:40,
                 from /home/ruinian/ws_moveit/src/moveit/moveit_planners/ompl/ompl_interface/include/moveit/ompl_interface/constraints_library.h:41,
                 from /home/ruinian/ws_moveit/src/moveit/moveit_planners/ompl/ompl_interface/src/constraints_library.cpp:37:
/opt/ros/indigo/include/ompl/base/StateStorage.h:221:13: note: candidate: ompl::base::StateStorageWithMetadata<M>::StateStorageWithMetadata(const StateSpacePtr&) [with M = std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std::pair<long unsigned int, long unsigned int> > >; ompl::base::StateSpacePtr = std::shared_ptr<ompl::base::StateSpace>]
             StateStorageWithMetadata(const StateSpacePtr &space) : StateStorage(space)
             ^
/opt/ros/indigo/include/ompl/base/StateStorage.h:221:13: note:   no known conversion for argument 1 from ‘const ModelBasedStateSpacePtr {aka const boost::shared_ptr<ompl_interface::ModelBasedStateSpace>}’ to ‘const StateSpacePtr& {aka const std::shared_ptr<ompl::base::StateSpace>&}’
/opt/ros/indigo/include/ompl/base/StateStorage.h:214:15: note: candidate: ompl::base::StateStorageWithMetadata<std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std::pair<long unsigned int, long unsigned int> > > >::StateStorageWithMetadata(const ompl::base::StateStorageWithMetadata<std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std::pair<long unsigned int, long unsigned int> > > >&)
         class StateStorageWithMetadata : public StateStorage
               ^
/opt/ros/indigo/include/ompl/base/StateStorage.h:214:15: note:   no known conversion for argument 1 from ‘const ModelBasedStateSpacePtr {aka const boost::shared_ptr<ompl_interface::ModelBasedStateSpace>}’ to ‘const ompl::base::StateStorageWithMetadata<std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std::pair<long unsigned int, long unsigned int> > > >&’
/opt/ros/indigo/include/ompl/base/StateStorage.h:214:15: note: candidate: ompl::base::StateStorageWithMetadata<std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std::pair<long unsigned int, long unsigned int> > > >::StateStorageWithMetadata(ompl::base::StateStorageWithMetadata<std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std::pair<long unsigned int, long unsigned int> > > >&&)
/opt/ros/indigo/include/ompl/base/StateStorage.h:214:15: note:   no known conversion for argument 1 from ‘const ModelBasedStateSpacePtr {aka const boost::shared_ptr<ompl_interface::ModelBasedStateSpace>}’ to ‘ompl::base::StateStorageWithMetadata<std::pair<std::vector<long unsigned int>, std::map<long unsigned int, std ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2017-06-05 19:37:08 -0600

ufr3c_tjc gravatar image

It looks like you still have a debian version of ompl installed. The lines saying /opt/ros/indigo/include/ompl/base/... shouldn't be pointing to the /opt/ros/... path, but instead to the workspace in which you installed ompl. I have just installed both ompl and MoveIt from source, and my ompl include files are located in /home/user/moveit_ws/devel/include/ompl/....

I first installed MoveIt in its own new workspace using catkin build as detailed here. Then I added the ompl package to the workspace src and used catkin build again as detailed here. It all built fine and works perfectly.

Remove your debian ompl package using sudo apt-get remove ros-indigo-ompl and you may have better luck. If you have installed ompl in a different workspace, I highly recommend putting them into the one workspace to avoid potential issues.

edit flag offensive delete link more

Comments

That debian ompl is installed from my souce ompl code. There are two ways of installation of source I found until now. One is your way. Treat source ompl as a catkin package. What I am not sure is should I set any path to let moveit to point to the ompl in your catkin workspace?

Oh233 gravatar image Oh233  ( 2017-06-06 10:57:46 -0600 )edit

Or you just remove all other debian ompl? The other way is the way I use now. I treat ompl as external package and generate debian code under the directory of my ros. I asked maintainer of ompl yesterday and he told me it is due to my ros version is not compatible to the latest ompl.

Oh233 gravatar image Oh233  ( 2017-06-06 11:03:45 -0600 )edit

I think I understand what you mean. But yes, if you're installing from source you must remove the debians if you previously installed them. If you're still on indigo it is likely that ompl then may have issues, as the maintainer stated. Try an older source version of ompl and it may work for you.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-06 17:49:19 -0600 )edit

Actually there is the third way one guy provided. I didn't try this way since I think this way is kind of unreasonable. He said first install source moveit with binary ompl. Then remove the binary version of ompl and install source ompl. I think the order is opposite.

Oh233 gravatar image Oh233  ( 2017-06-06 18:07:53 -0600 )edit

That is the exact way that I installed source MoveIt and ompl; MoveIt first and then delete ompl debian and install it from source. It's the recommended way on the MoveIt website.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-06 18:17:07 -0600 )edit

But for my purpose of adding new planner, is this way able to implement new planner in moveit? And my concern of this way is if the binary code I use rosdep to download and source code I download from ompl website are not the same, will there be some errors?

Oh233 gravatar image Oh233  ( 2017-06-06 18:50:27 -0600 )edit

I've seen that if you want to write a new planner you must install source code for both MoveIt and ompl. I am not sure about the compatibility of the current ompl package with indigo, but it works fine for me with kinetic. But I'm sure you can find an older version of ompl that works with indigo.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-06 18:54:27 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-06-05 15:02:15 -0600

Seen: 730 times

Last updated: Jun 05 '17