Ask Your Question
0

Begginer Tutorial Publisher/Subscriber Server/Client in C++ boost assertion failed

asked 2013-03-14 00:53:01 -0600

Juan gravatar image

updated 2013-03-14 07:23:18 -0600

felix k gravatar image

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.

edit retag flag offensive close merge delete

Comments

What Ubuntu and ROS version are you using?

Oier gravatar imageOier ( 2013-03-14 01:01:00 -0600 )edit

Can you post the CMake file?

yigit gravatar imageyigit ( 2013-03-14 06:24:09 -0600 )edit

Are they exactly the same or do they just seem like that? You can easily check with tools like meld or diffuse. Looks like a pointer mistake for me.

felix k gravatar imagefelix k ( 2013-03-14 07:18:34 -0600 )edit

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)

Juan gravatar imageJuan ( 2013-03-14 18:17:25 -0600 )edit

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

Juan gravatar imageJuan ( 2013-03-14 18:31:27 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-03-15 04:19:14 -0600

yigit gravatar image

updated 2013-03-15 04:19:51 -0600

I am sorry Juan, I don't know how it works for groovy yet, but a similar error is caused in fuerte too, when you don't link boost libraries in CMakeLists.txt. Here is an example http://answers.ros.org/question/42853/how-to-solve-undefined-reference-to-symbol-boostsignalsconnectionconnection/

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-03-14 00:53:01 -0600

Seen: 722 times

Last updated: Mar 14 '13