Robotics StackExchange | Archived questions

boost exception related to controller manager

Hi, I'm writing a ROS program with galil DMC4060 controller.

When I add gclib and gclibo into the CMakelists.txt file, a run-time exception is thrown:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >'
what(): character conversion failed

The build progress has no error. If gclib and gclibo library is not included the program is totally fine. I think there is something wrong with the Boost library. The Boost version with this error is 1.54, and boost 1.63 is totally fine. But it is inconvenient to compile all the rospacks with the newest version.

Does anybody have the similar problem? Please help me. Thank you!

The gdb debugging information is attached below:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >'
  what():  character conversion failed

Program received signal SIGABRT, Aborted.
0x00007ffff6b42c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.

(gdb) bt
#0  0x00007ffff6b42c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff6b46028 in __GI_abort () at abort.c:89
#2  0x00007ffff7147535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff71456d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff7145703 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff7145922 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff65a95e6 in ?? () from /usr/lib/libgclib.so.0
#7  0x00007ffff665d190 in std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > boost::detail::convert<wchar_t, char, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > >) () from /usr/lib/libgclib.so.0
#8  0x00007ffff665cde6 in boost::from_8_bit(std::string const&, std::codecvt<wchar_t, char, __mbstate_t> const&) ()
   from /usr/lib/libgclib.so.0
#9  0x00007ffff665ce00 in boost::from_utf8(std::string const&) () from /usr/lib/libgclib.so.0
#10 0x00007ffff66546bf in boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::string, std::allocator<std::string> > const&, bool) const () from /usr/lib/libgclib.so.0
#11 0x00007ffff665088e in boost::program_options::store(boost::program_options::basic_parsed_options<char> const&, boost::program_options::variables_map&, bool) () from /usr/lib/libgclib.so.0
#12 0x00007ffff281a0b0 in rospack::parse_args(int, char**, rospack::Rosstackage&, boost::program_options::variables_map&) ()
   from /opt/ros/indigo/lib/librospack.so
#13 0x00007ffff281a501 in rospack::rospack_run(int, char**, rospack::Rosstackage&, std::string&) () from /opt/ros/indigo/lib/librospack.so
#14 0x00007ffff2817e3c in rospack::ROSPack::run(int, char**) () from /opt/ros/indigo/lib/librospack.so
#15 0x00007ffff2818169 in rospack::ROSPack::run(std::string const&) () from /opt/ros/indigo/lib/librospack.so
#16 0x00007ffff3b65f01 in ros::package::command(std::string const&) () from /opt/ros/indigo/lib/libroslib.so
#17 0x00007ffff3b660cd in ros::package::getPath(std::string const&) () from /opt/ros/indigo/lib/libroslib.so
#18 0x00007ffff60a2a26 in pluginlib::ClassLoader<controller_interface::ControllerBase>::ClassLoader(std::string, std::string, std::string, std::vector<std::string, std::allocator<std::string> >) () from /opt/ros/indigo/lib/libcontroller_manager.so
#19 0x00007ffff60a31a2 in controller_manager::ControllerLoader<controller_interface::ControllerBase>::reload() ()
   from /opt/ros/indigo/lib/libcontroller_manager.so
#20 0x00007ffff608a29c in controller_manager::ControllerManager::ControllerManager(hardware_interface::RobotHW*, ros::NodeHandle const&) ()
   from /opt/ros/indigo/lib/libcontroller_manager.so
#21 0x00007ffff7963c8f in big_arm_driver::GenericHardwareControlLoop::GenericHardwareControlLoop(ros::NodeHandle&, boost::shared_ptr<big_arm_driver::BigArmHardwareInterface>) () from /home/ytf/big_arm/devel/lib/libgeneric_hardware_control_loop.so
#22 0x000000000040934a in main ()

Asked by yangtfu on 2017-02-13 08:09:54 UTC

Comments

I'm not entirely sure, but if you are mixing (binary packages of different) Boost versions, then strange things can happen. Are your galil libraries linked against a different Boost version than your ROS nodes are using? That could be a problem.

Asked by gvdhoorn on 2017-02-14 06:38:08 UTC

I have to install and compile all the ros packages I used with boost version 1.63, and it is totally OK. But the apt-get packages are built with version 1.54. Compiling my package with these packages is fine, but the exception above appears at runtime.

Asked by yangtfu on 2017-02-14 10:32:50 UTC

I'm having the same issue, were you able to resolve it? Did you build ros with the new boost version?

Asked by dgregorich on 2017-05-03 16:14:20 UTC

Answers