ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to read ros::Publisher pub

asked 2017-01-12 15:07:25 -0500

Biomacs gravatar image

updated 2017-01-12 23:23:35 -0500

Please, help me to correctly read some code to have more understanding of the basics of ROS. I understand that #include<ros.h> is to include the cpp library of ROS

How should I read this ros::Publisher pub?

Is it make an object named pub of the class Publisher defined in the namespace ros or what?

Thank you

edit retag flag offensive close merge delete

Comments

1

This is the wrong place to ask this kind of questions. Your question is related to the basic of C++. I suggest to start with C++ and then go to ROS.

rastaxe gravatar image rastaxe  ( 2017-01-13 02:36:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-01-13 02:52:07 -0500

gvdhoorn gravatar image

Is it make an object named pub of the class Publisher defined in the namespace ros or what?

Basically, yes (and to be precise, the object is created on the stack), but as @rastaxe wrote: please follow a C++ tutorial or two and then start working with roscpp. This is really a C++ question, and I would not want to be learning C++ and ROS at the same time.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-01-12 15:07:25 -0500

Seen: 106 times

Last updated: Jan 13 '17