0
$\begingroup$

Rosanswers logo

Hello,

I was wondering if there are any proper ways of making large projects more understandable for the reader. I am trying to make separate header and source files for my publishers and subscribers. I have made attempts to place them in a class, but I can't seem to access the data. Even when using global variables, which I hate doing, I can't get things to work.

Now my question is, is there some form of template or example of clearly structured projects that have their publishers and subscribers, maybe even service calling routines as well, in .cpp and .h files?

Thank you for your time. Kind regards, Infection.


Originally posted by Infection on ROS Answers with karma: 3 on 2018-07-12

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Yes, you can check this git repo where you have miminimal templates for all kind of purpose : simple publisher/subscriber, using a class, using a ros message, a ros server etc.. It helped me a lot at the beginning.

Also @pavel92 's advice is good, it's always nice to see well-written code by developpers to get good habits. See the commonly used packages in ROS for example, it's always good to know what's really behind all the nodes you are using to learn and debug faster.


Originally posted by Delb with karma: 3907 on 2018-07-12

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.