personalrobotics / or_trajopt

OpenRAVE plugin to expose TrajOpt code as an OpenRAVE planner
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

build error: invalid initialization of reference of type in collision_checker.cpp #29

Open fredsukkar opened 7 years ago

fredsukkar commented 7 years ago

Branch: master Commit: 5d980b12f3d5b1865c07ae33d7948dfa4889ff4e

Getting the following build error:

/home/planner/catkin_ws/build/or_trajopt/libtrajopt-prefix/src/libtrajopt/src/trajopt/collision_checker.cpp: In member function ‘void trajopt::CollisionChecker::IgnoreSelfCollisions(OpenRAVE::KinBodyPtr)’:
/home/planner/catkin_ws/build/or_trajopt/libtrajopt-prefix/src/libtrajopt/src/trajopt/collision_checker.cpp:46:70: error: invalid initialization of reference of type ‘const std::set<int>&’ from expression of type ‘const std::vector<int>’
   const std::set<int> &non_adjacent_links = body->GetNonAdjacentLinks(0);
                                                                      ^
src/trajopt/CMakeFiles/trajopt.dir/build.make:302: recipe for target 'src/trajopt/CMakeFiles/trajopt.dir/collision_checker.cpp.o' failed

May be related to: https://github.com/rdiankov/openrave/issues/479

Just curious, why does this package download and build its own version of trajopt? I changed the git repository to use the official repo and it builds okay. But when I try use the planner via prpy bindings I get the following error:

INFO: Sequence - Calling planner "Trajopt".
INFO: openrave (Failed): Userdata has the wrong class!
lakshmip001 commented 5 years ago

Is this problem solved?

fredsukkar commented 5 years ago

I ended up just using an older commit of OpenRAVE, for reference I am using https://github.com/rdiankov/openrave/commit/9c79ea260e1c009b0a6f7c03ec34f59629ccbe2c