0
$\begingroup$

Rosanswers logo

I am new to ROS and I followed the directions for creating/making/running ros packages, but I get an immediate seg fault.

Here is what i did:

  1. cd ~/ros_workspace
  2. roscreate-pkg begtut std_msgs rospy roscpp
  3. rosmake begtut
  4. created talker.cpp from the tutorials and saved to src
  5. added rosbuild_add_executable(talker src/talker.cpp) to CMakelists.txt
  6. make
  7. run roscore
  8. rosrun begtut talker

I get "Segmentation fault" written to the screen

What am I missing?


Originally posted by bobby on ROS Answers with karma: 26 on 2012-01-06

Post score: 0


Original comments

Comment by bobby on 2012-01-06:
Yes, it build no problem.

Comment by DimitriProsser on 2012-01-06:
Did you verify that the code was copied completely correctly?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

So I figured it out. Thanks for those who looked at my question. I looked at the core dump file and saw that it was crashing in the boost threads. I apparentlty have 2 boost libraries installed. I think the ros install put another one in my system.

I went ahead and removed this version, and rebuilt my program. Now it runs fine.

Thanks.


Originally posted by bobby with karma: 26 on 2012-01-06

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.