Robotics StackExchange | Archived questions

Error compiling contact sensor tutorial on Mac OS

Dear all, i have installed gazebo 4 (needed to interface it with some existing plugins) on my mac (10.11.5). I tried to play a bit with the plugin tutorials and the typical hello world works like a charm. However, when i try to make the contact sensor tutorial (as followed here: http://gazebosim.org/tutorials?cat=sensors&tut=contact_sensor&ver=1.9-4.0) i get the following error:

Scanning dependencies of target contact [ 50%] Building CXX object CMakeFiles/contact.dir/ContactPlugin.cc.o [100%] Linking CXX shared library libcontact.dylib Undefined symbols for architecture x8664: "boost::system::systemcategory()", referenced from: cxxglobalvarinit.5 in ContactPlugin.cc.o boost::asio::error::getsystemcategory() in ContactPlugin.cc.o "boost::system::genericcategory()", referenced from: _cxxglobalvarinit.3 in ContactPlugin.cc.o __cxxglobalvarinit.4 in ContactPlugin.cc.o "gazebo::msgs::Contacts::CopyFrom(gazebo::msgs::Contacts const&)", referenced from: gazebo::msgs::Contacts::operator=(gazebo::msgs::Contacts const&) in ContactPlugin.cc.o "gazebo::msgs::Contacts::Contacts()", referenced from: gazebo::ContactPlugin::OnUpdate() in ContactPlugin.cc.o "gazebo::msgs::Contacts::~Contacts()", referenced from: gazebo::ContactPlugin::OnUpdate() in ContactPlugin.cc.o "gazebo::event::Connection::Connection(gazebo::event::Event, int)", referenced from: gazebo::event::EventT::Connect(boost::function const&) in ContactPlugin.cc.o "gazebo::event::Connection::~Connection()", referenced from: void boost::checked_deletegazebo::event::Connection(gazebo::event::Connection) in ContactPlugin.cc.o "gazebo::common::Logger::operator()(std::1::basicstring<char, std::1::chartraits, std::_1::allocator > const&, int)", referenced from: gazebo::ContactPlugin::Load(boost::sharedptrgazebo::sensors::Sensor, boost::sharedptrsdf::Element) in ContactPlugin.cc.o "gazebo::common::Console::err", referenced from: gazebo::ContactPlugin::Load(boost::sharedptrgazebo::sensors::Sensor, boost::sharedptrsdf::Element) in ContactPlugin.cc.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const, int)", referenced from: google::protobuf::RepeatedPtrFieldgazebo::msgs::Contact::TypeHandler::Type const& google::protobuf::internal::RepeatedPtrFieldBase::Getgoogle::protobuf::RepeatedPtrField<gazebo::msgs::Contact::TypeHandler>(int) const in ContactPlugin.cc.o google::protobuf::RepeatedPtrFieldgazebo::msgs::Vector3d::TypeHandler::Type const& google::protobuf::internal::RepeatedPtrFieldBase::Getgoogle::protobuf::RepeatedPtrField<gazebo::msgs::Vector3d::TypeHandler>(int) const in ContactPlugin.cc.o google::protobuf::RepeatedField::Get(int) const in ContactPlugin.cc.o "google::protobuf::internal::LogMessage::~LogMessage()", referenced from: google::protobuf::RepeatedPtrFieldgazebo::msgs::Contact::TypeHandler::Type const& google::protobuf::internal::RepeatedPtrFieldBase::Getgoogle::protobuf::RepeatedPtrField<gazebo::msgs::Contact::TypeHandler>(int) const in ContactPlugin.cc.o google::protobuf::RepeatedPtrFieldgazebo::msgs::Vector3d::TypeHandler::Type const& google::protobuf::internal::RepeatedPtrFieldBase::Getgoogle::protobuf::RepeatedPtrField<gazebo::msgs::Vector3d::TypeHandler>(int) const in ContactPlugin.cc.o google::protobuf::RepeatedField::Get(int) const in ContactPlugin.cc.o "google::protobuf::internal::LogMessage::operator<<(char const)", referenced from: google::protobuf::RepeatedPtrFieldgazebo::msgs::Contact::TypeHandler::Type const& google::protobuf::internal::RepeatedPtrFieldBase::Getgoogle::protobuf::RepeatedPtrField<gazebo::msgs::Contact::TypeHandler>(int) const in ContactPlugin.cc.o google::protobuf::RepeatedPtrFieldgazebo::msgs::Vector3d::TypeHandler::Type const& google::protobuf::internal::RepeatedPtrFieldBase::Getgoogle::protobuf::RepeatedPtrField<gazebo::msgs::Vector3d::TypeHandler>(int) const in ContactPlugin.cc.o google::protobuf::RepeatedField::Get(int) const in ContactPlugin.cc.o "google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)", referenced from: google::protobuf::RepeatedPtrFieldgazebo::msgs::Contact::TypeHandler::Type const& google::protobuf::internal::RepeatedPtrFieldBase::Getgoogle::protobuf::RepeatedPtrField<gazebo::msgs::Contact::TypeHandler>(int) const in ContactPlugin.cc.o google::protobuf::RepeatedPtrFieldgazebo::msgs::Vector3d::TypeHandler::Type const& google::protobuf::internal::RepeatedPtrFieldBase::Getgoogle::protobuf::RepeatedPtrField<gazebo::msgs::Vector3d::TypeHandler>(int) const in ContactPlugin.cc.o google::protobuf::RepeatedField::Get(int) const in ContactPlugin.cc.o "gazebo::sensors::ContactSensor::GetContacts() const", referenced from: gazebo::ContactPlugin::OnUpdate() in ContactPlugin.cc.o "typeinfo for gazebo::sensors::ContactSensor", referenced from: boost::sharedptrgazebo::sensors::ContactSensor boost::dynamicpointercast(boost::sharedptrgazebo::sensors::Sensor const&) in ContactPlugin.cc.o "typeinfo for gazebo::sensors::Sensor", referenced from: boost::sharedptrgazebo::sensors::ContactSensor boost::dynamicpointercast(boost::sharedptrgazebo::sensors::Sensor const&) in ContactPlugin.cc.o ld: symbol(s) not found for architecture x8664 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [libcontact.dylib] Error 1 make[1]: *** [CMakeFiles/contact.dir/all] Error 2 make: *** [all] Error 2

Any ideas on what it might be the case? i understand it is a linker error but i am not sure i can identify exactly where or what is happening... Any help is highly appreciated!!

Thanks, V.

Asked by vickyV on 2016-09-20 10:44:55 UTC

Comments

On Ubuntu Linux I can compile this tutorial but it produces no output. I asked a question about it at http://answers.gazebosim.org/question/14479/does-anyone-get-output-with-the-contactsensor-tutorial/

Asked by JasonMel on 2016-09-25 10:55:35 UTC

Answers