Robotics StackExchange | Archived questions

src and node difference!

Hi all; In some package the main codes are written in two sections: nodes and src! I did not understand what is the difference between them. In other words, I do not understand when we have written our codes in nodes and when we have written them in src? What is their difference in their application? Thanks

Asked by Fi on 2015-08-25 16:11:49 UTC

Comments

Answers

Well, as I'm not sure what you are refering to, there might be several correct answers.

  1. the node is a minimal file, basically just containing the main function. Then, this is just a way of having the code split up into several files. There is ROS code in e.g. a class that has it's own file (src) which actually implements the functionality, and this is used and instantiated in the main (node).

  2. The possibility is that there is non-ROS code in the src and the respective ROS code (the wrapper) in the node. So you can use same code in ROS and non-ROS systems, if you want to. You don't have dependencies from src to all the ROS stuff.

Asked by mgruhler on 2015-08-26 02:14:26 UTC

Comments