ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Revision history [back]

There you have an example of C++ mixed node (pub/sub/srv) for ROS1 with Object-Oriented Programming:

This may be a good enough base to build on. There are some differences from your code, such as with ros::NodeHandle.

In general, if your code works, don't worry - just keep building and coding :) But good examples are very helpful.