[ros-users] Issues Communicating with Rviz

Gavin McCarter gmccarter88 at gmail.com
Thu Sep 30 22:16:32 UTC 2010


 Thanks for the quick response.  One more thing.  After I made the changes
you suggested,  I was able to successfully "make" the node.  I got the
following error when I tried to launch the node:

[FATAL] [1285884626.766008172]: You must call ros::init() before creating
the first NodeHandle
[FATAL] [1285884626.767366060]: BREAKPOINT HIT
    file = /opt/ros/cturtle/ros/core/roscpp/src/libros/node_handle.cpp
    line=140

[subscriber-3] process has died [pid 18638, exit code -5].
log files:
/home/gavin/.ros/log/74977cc6-ccd5-11df-9b91-0007e97f99ca/subscriber-3*.log

I then went and added the middle line( ros::init . . . )

using namespace ros;

  ros::init(argc, argv, "subscriber");
   ros::NodeHandle n;
. . . . .

and I got the following errors when I tried to make the node:

/src/subscriber.cpp:11: error: expected constructor, destructor, or type
conversion before ‘(’ token
make[3]: *** [CMakeFiles/subscriber.dir/src/subscriber.o] Error 1

Could you please explain what's happening?  Thanks a lot!

-Gavin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100930/7d9f5ccd/attachment-0003.html>


More information about the ros-users mailing list