Repository navigation
Closed
Description
Failing when enabling units tests of robot_model submodule of moveit_core:
Undefined symbols for architecture x86_64:
"random_numbers::RandomNumberGenerator::quaternion(double*)", referenced from:
moveit::core::FloatingJointModel::getVariableRandomPositions(random_numbers::RandomNumberGenerator&, double*, std::__1::vector<moveit::core::VariableBounds, std::__1::allocator<moveit::core::VariableBounds> > const&) const in libmoveit_robot_model.a(floating_joint_model.cpp.o)
moveit::core::FloatingJointModel::getVariableRandomPositionsNearBy(random_numbers::RandomNumberGenerator&, double*, std::__1::vector<moveit::core::VariableBounds, std::__1::allocator<moveit::core::VariableBounds> > const&, double const*, double) const in libmoveit_robot_model.a(floating_joint_model.cpp.o)
"srdf::SRDFWriter::updateSRDFModel(urdf::ModelInterface const&)", referenced from:
moveit::core::RobotModelBuilder::build() in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"srdf::SRDFWriter::SRDFWriter()", referenced from:
moveit::core::RobotModelBuilder::RobotModelBuilder(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"srdf::SRDFWriter::~SRDFWriter()", referenced from:
std::__1::shared_ptr<srdf::SRDFWriter>::shared_ptr<srdf::SRDFWriter>(srdf::SRDFWriter*, std::__1::enable_if<is_convertible<srdf::SRDFWriter*, srdf::SRDFWriter*>::value, std::__1::shared_ptr<srdf::SRDFWriter>::__nat>::type) in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
std::__1::__shared_ptr_pointer<srdf::SRDFWriter*, std::__1::default_delete<srdf::SRDFWriter>, std::__1::allocator<srdf::SRDFWriter> >::__on_zero_shared() in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"srdf::Model::initFile(urdf::ModelInterface const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
moveit::core::loadSRDFModel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"boost::filesystem::path::operator/=(boost::filesystem::path const&)", referenced from:
boost::filesystem::operator/(boost::filesystem::path const&, boost::filesystem::path const&) in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)", referenced from:
boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int) in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"boost::re_detail_106800::get_mem_block()", referenced from:
boost::re_detail_106800::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::extend_stack() in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
boost::re_detail_106800::save_state_init::save_state_init(boost::re_detail_106800::saved_state**, boost::re_detail_106800::saved_state**) in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"boost::re_detail_106800::put_mem_block(void*)", referenced from:
boost::re_detail_106800::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::unwind_extra_block(bool) in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
boost::re_detail_106800::save_state_init::~save_state_init() in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"boost::re_detail_106800::verify_options(unsigned int, boost::regex_constants::_match_flags)", referenced from:
boost::re_detail_106800::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp() in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"boost::re_detail_106800::raise_runtime_error(std::runtime_error const&)", referenced from:
void boost::re_detail_106800::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type) in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"boost::re_detail_106800::get_default_error_string(boost::regex_constants::error_type)", referenced from:
boost::re_detail_106800::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type) const in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"boost::system::detail::generic_category_instance", referenced from:
boost::system::generic_category() in test.cpp.o
boost::system::generic_category() in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
boost::system::generic_category() in libmoveit_robot_model.a(robot_model.cpp.o)
"moveit::tools::Profiler::end(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
moveit::tools::Profiler::ScopedBlock::~ScopedBlock() in libmoveit_robot_model.a(robot_model.cpp.o)
"moveit::tools::Profiler::stop()", referenced from:
moveit::tools::Profiler::ScopedStart::~ScopedStart() in libmoveit_robot_model.a(robot_model.cpp.o)
"moveit::tools::Profiler::begin(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
moveit::tools::Profiler::ScopedBlock::ScopedBlock(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, moveit::tools::Profiler&) in libmoveit_robot_model.a(robot_model.cpp.o)
"moveit::tools::Profiler::start()", referenced from:
moveit::tools::Profiler::ScopedStart::ScopedStart(moveit::tools::Profiler&) in libmoveit_robot_model.a(robot_model.cpp.o)
"moveit::tools::Profiler::status(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool)", referenced from:
moveit::tools::Profiler::Status(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool) in test.cpp.o
"moveit::tools::Profiler::instance()", referenced from:
moveit::tools::Profiler::Status(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool) in test.cpp.o
moveit::core::RobotModel::buildModel(urdf::ModelInterface const&, srdf::Model const&) in libmoveit_robot_model.a(robot_model.cpp.o)
moveit::core::RobotModel::buildJointInfo() in libmoveit_robot_model.a(robot_model.cpp.o)
moveit::core::RobotModel::constructShape(urdf::Geometry const*) in libmoveit_robot_model.a(robot_model.cpp.o)
"moveit::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
moveit::core::RobotModel::getVariableIndex(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in libmoveit_robot_model.a(robot_model.cpp.o)
moveit::core::JointModel::getLocalVariableIndex(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in libmoveit_robot_model.a(joint_model.cpp.o)
moveit::core::JointModelGroup::getVariableRandomPositionsNearBy(random_numbers::RandomNumberGenerator&, double*, std::__1::vector<std::__1::vector<moveit::core::VariableBounds, std::__1::allocator<moveit::core::VariableBounds> > const*, std::__1::allocator<std::__1::vector<moveit::core::VariableBounds, std::__1::allocator<moveit::core::VariableBounds> > const*> > const&, double const*, std::__1::vector<double, std::__1::allocator<double> > const&) const in libmoveit_robot_model.a(joint_model_group.cpp.o)
"shapes::computeShapeExtents(shapes::Shape const*)", referenced from:
moveit::core::LinkModel::setGeometry(std::__1::vector<std::__1::shared_ptr<shapes::Shape const>, std::__1::allocator<std::__1::shared_ptr<shapes::Shape const> > > const&, std::__1::vector<Eigen::Transform<double, 3, 1, 0>, Eigen::aligned_allocator<Eigen::Transform<double, 3, 1, 0> > > const&) in libmoveit_robot_model.a(link_model.cpp.o)
"shapes::createMeshFromResource(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&)", referenced from:
moveit::core::RobotModel::constructShape(urdf::Geometry const*) in libmoveit_robot_model.a(robot_model.cpp.o)
"shapes::Box::Box(double, double, double)", referenced from:
moveit::core::RobotModel::constructShape(urdf::Geometry const*) in libmoveit_robot_model.a(robot_model.cpp.o)
"shapes::Sphere::Sphere(double)", referenced from:
moveit::core::RobotModel::constructShape(urdf::Geometry const*) in libmoveit_robot_model.a(robot_model.cpp.o)
"shapes::Cylinder::Cylinder(double, double)", referenced from:
moveit::core::RobotModel::constructShape(urdf::Geometry const*) in libmoveit_robot_model.a(robot_model.cpp.o)
"boost::re_detail_106800::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const", referenced from:
boost::cpp_regex_traits<char>::transform_primary(char const*, char const*) const in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"boost::re_detail_106800::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const", referenced from:
boost::cpp_regex_traits<char>::transform(char const*, char const*) const in libmoveit_test_utils.a(robot_model_test_utils.cpp.o)
"typeinfo for shapes::Mesh", referenced from:
moveit::core::LinkModel::setGeometry(std::__1::vector<std::__1::shared_ptr<shapes::Shape const>, std::__1::allocator<std::__1::shared_ptr<shapes::Shape const> > > const&, std::__1::vector<Eigen::Transform<double, 3, 1, 0>, Eigen::aligned_allocator<Eigen::Transform<double, 3, 1, 0> > > const&) in libmoveit_robot_model.a(link_model.cpp.o)
"typeinfo for shapes::Shape", referenced from:
moveit::core::LinkModel::setGeometry(std::__1::vector<std::__1::shared_ptr<shapes::Shape const>, std::__1::allocator<std::__1::shared_ptr<shapes::Shape const> > > const&, std::__1::vector<Eigen::Transform<double, 3, 1, 0>, Eigen::aligned_allocator<Eigen::Transform<double, 3, 1, 0> > > const&) in libmoveit_robot_model.a(link_model.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [robot_model/test_robot_model] Error 1
make[1]: *** [robot_model/CMakeFiles/test_robot_model.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
---
Failed <<< moveit_core [ Exited with code 2 ]
Summary: 0 packages finished [27.3s]Metadata
Metadata
Assignees
Labels
No labels
Activity
update robot_model in an attempt to enable unit tests
davetcoleman commentedon Mar 6, 2019
@mlautman could you help debug this failing test?
vmayoral commentedon Mar 10, 2019
I've been looking at the unit tests of other submodules and I've been getting somewhat similar errors so I may have something wrong in my local setup (working with OS X).
I re-enabled unit tests for this module in a different branch, results should come up at https://travis-ci.org/AcutronicRobotics/moveit2/builds/504368925?utm_source=github_status&utm_medium=notification
@mlautman, any chance you managed to shed some light into this?
mlautman commentedon Mar 15, 2019
Looking into it
Fix missing dependency in OS X moveit_ros_perception
vmayoral commentedon Mar 24, 2019
Minor improvement after reviewing dependencies but still obtaining an error:
vmayoral commentedon Mar 24, 2019
Something similar happens with the unit tests from other modules (e.g.
robot_statesubmodule ofmoveit_core).@dirk-thomas, @wjwwood it seems we're blocked here, any chance you can have a look at https://github.com/AcutronicRobotics/moveit2/blob/master/moveit_core/robot_model/CMakeLists.txt#L26 and advice whether there's something we're missing (refer to the previous comment for the error we're getting)?
davetcoleman commentedon Mar 25, 2019
I think @mlautman 's recent moveit1 fix will help this:
moveit/moveit1#1409
dirk-thomas commentedon Mar 25, 2019
According to the error message you are missing some libraries to provide the missing symbols. Looking at the commented CMake code you seem to pass wrong arguments to
ament_target_dependencies. Its pdocblock](https://github.com/ament/ament_cmake/blob/122f283ab156c159194afce3d932f96327d28ff1/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake#L15-L30) states that it takes the target name as well as a list of package names as arguments - nothing else. So passing*_LIBRARIESis wrong.vmayoral commentedon Mar 30, 2019
Thanks @dirk-thomas, e0dca76 addressed some of the linking issues but still failing:
@davetcoleman and @mlautman, I tried fetching the changes from @mlautman patch at e0dca76 but the result is the one above. Reviewing the linking issues, most point to
moveit_robot_modelandmoveit_test_utils.Is there something that I missed? Help here is required.
vmayoral commentedon Mar 30, 2019
Re-tried again @mlautman's changes more directly e841caf
Similar result:
There's some weird issue with
moveit_test_utils.vmayoral commentedon Mar 31, 2019
Connected to moveit#68, still unable to get the right symbols.
vmayoral commentedon Apr 1, 2019
ping @mlautman and @davetcoleman, can you please help with this?
mlautman commentedon Apr 3, 2019
@vmayoral Can you send over some instructions to reproduce your setup so that we can help you debug this?
vmayoral commentedon Apr 4, 2019
@mlautman https://acutronicrobotics.com/docs/products/robots/mara/moveit2/install/ubuntu should do for getting the environment set up. Then simply uncomment https://github.com/AcutronicRobotics/moveit2/blob/master/moveit_core/robot_model/CMakeLists.txt#L31-L52 and
colcon build --packages-select moveit_core. Let me know if that doesn't work and you have issues reproducing the error.11 remaining items
vmayoral commentedon Apr 14, 2019
I didn't investigate it much but on a quick look, it seems that I can see the missing symbols in the local
libmoveit_test_utilslibrary when inspecting manually.mlautman commentedon Apr 16, 2019
I am having trouble reproducing your results. The way that you have set up the docker-entrypoint.sh makes it really hard to iterate without rebuilding the entire workspace from scratch each time (approx 10 min)
Looking at that error, the problem might be that
moveit_test_utilsonly gets built if you are building the tests. (https://github.com/AcutronicRobotics/moveit2/blob/1bc57d0aabf23deedca075f38f86356a87dfeb29/moveit_core/utils/CMakeLists.txt) What happens if you build that library outside of theif(BUILD_TESTING)block?mlautman commentedon Apr 16, 2019
You may want to look into using an overlay to avoid building dependencies each time
mlautman commentedon Apr 16, 2019
I have been trying to debug the issue but there seem to be quite a few issues with that branch which make the build fail. Namely including header files from srdfdom and random_numbers.h are both failing. I also tried building master but it has the same issue.
anasarrak commentedon Apr 16, 2019
@mlautman Taking into account that you only want to compile moveit_core, just by using
colcon build --merge-install --packages-select moveit_coreshould work.Which kind of errors?
mlautman commentedon Apr 16, 2019
@anasarrak, The build command is in the docker_entrypoint.sh file so anytime you do
docker run -it ....it builds the entire project. This could be avoided by having an underlay that is built in the Dockerfile but this is not the most pressing issuemlautman commentedon Apr 16, 2019
This is the error I get:
mlautman commentedon Apr 16, 2019
I get this error building both locally and in the docker container
vmayoral commentedon Apr 16, 2019
@mlautman, thanks for the help. I'm unable to reproduce your error. Instead, following the instructions provided above I get https://gist.github.com/vmayoral/2f2355a3b8cdb242f010a9f6906fe1fd. Just tested now.
If you wish to debug the environment, simply comment https://github.com/AcutronicRobotics/moveit2/blob/robot-model-tests4/.docker/ci/docker-entrypoint.sh#L11 and launch the build manually. You should get the same result.
dirk-thomas commentedon Apr 17, 2019
I can't reproduce the problem with the current steps but see various other problems and unfortunately don't have the bandwidth to iterate on the build process itself.
I would suggest to double check with
VERBOSE=1if it is actually trying to link against the library where you found the symbol in.anasarrak commentedon Apr 19, 2019
Reproducing the robot model test, I'm having the same errors as @vmayoral
About the error that you have @mlautman I've just created a clean docker with ros2 crystal and I didn't have any issue with any of the dependencies.
Using these repos https://github.com/AcutronicRobotics/moveit2/blob/master/moveit2.repos you should be able to build them without problem...
anasarrak commentedon Apr 19, 2019
Updating the robot_model/CMakelist and leaving it as https://github.com/ros-planning/moveit/blob/7fdc7f35f763c5e6784b5a72665188b2426fc009/moveit_core/robot_model/CMakeLists.txt#L25 the errors has changed to:
vmayoral commentedon May 15, 2019
Fixed by #71
vmayoral commentedon May 15, 2019
Thanks everyone that contributed. Specially @dirk-thomas and @mlautman. Credit to @ahcorde and @anasarrak.