segmentation fault on talker node

asked 2020-01-08 08:12:31 -0500

niyoel gravatar image

Hi,

I am trying to follow ROS tutorial for writing a simple C++ node on my raspberry pi : https://wiki.ros.org/ROS/Tutorials/Wr...

when trying to run the node : rosrun beginner_tutorials talker, I am getting "Segmentation fault".

I identified the code line producing the error : "ros::Publisher chatter_pub = n.advertise<std_msgs::string>("chatter", 1000);"

Thanks for your help

edit retag flag offensive close merge delete

Comments

as this is THE standard tutorial, I guess it would have shown if there is anything wrong with it. Thus, most probably there is an issue in how you implemented the talker.

Please edit your question by adding the full source code (minus any unnecessary comments), a c'n'p of the terminal output with relevant context when the segfault occurs, as well as the relevant parts of you CMakeLists.txt (again, minus any unnecessary comments). It is always a good idea to provide this information right from the start, so that we don't have to request that pretty standard information.

mgruhler gravatar image mgruhler  ( 2020-01-09 00:58:30 -0500 )edit