How to debug Ros::NodeHandle's segfault?
This simple code
#include <ros/ros.h>
int main(int argc, char **argv){
ros::init(argc,argv, "talker");
ros::NodeHandle n;
return 0;
}
I
Produces segfault:
[1] 2495949 segmentation fault (core dumped) rosrun test test_node
what is the recommended way to debug ros program?
Asked by achmad_fathoni on 2021-09-24 22:44:18 UTC
Comments
Same as any other C++ program: using a debugger. GDB is a popular choice, but there are more.
If you're using
roslaunch
, see wiki/How to Roslaunch Nodes in Valgrind or GDB.Asked by gvdhoorn on 2021-09-25 00:39:52 UTC