Begginer Tutorial Publisher/Subscriber Server/Client in C++ boost assertion failed
When I run the beginner tutorials for publisher/suscriber or service/client I get the following error:
add_two_ints_server: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: boost::shared_ptr<t>::reference boost::shared_ptr<t>::operator*() const [with T = boost::regex_traits_wrapper<boost::regex_traits<char> >; boost::shared_ptr<t>::reference = boost::regex_traits_wrapper<boost::regex_traits<char> >&]: Assertion `px != 0' failed. Aborted (core dumped)
It seems to me that the code is exactly the same as those in the tutorial, I am not sure if there is a configuration problem.
The files were made correctly by make.
What Ubuntu and ROS version are you using?
Can you post the CMake file?
Are they exactly the same or do they just seem like that? You can easily check with tools like
meld
ordiffuse
. Looks like a pointer mistake for me.Ubuntu1210/Groovy.
Added the following lines in CMake.. rosbuild_add_executable(talker src/talker.cpp) rosbuild_add_executable(listener src/listener.cpp) rosbuild_add_executable(add_two_ints_server src/add_two_ints_server.cpp) rosbuild_add_executable(add_two_ints_client src/add_two_ints_client.cpp)
I tried running it in different ways and I am not sure sometimes no exceptions come along. I did notice however, a difference between the c++ produced code and python produced code.
In cpp pub/sub: [${severity}] [${time}]: ${message} In python: INFO] [WallTime: 1363321815.771314] hello world 136