Ask Your Question
0

src and node difference!

asked 2015-08-25 16:11:49 -0500

Fi gravatar image

updated 2015-08-25 17:34:26 -0500

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-08-26 02:14:26 -0500

mgruhler gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-08-25 16:11:49 -0500

Seen: 66 times

Last updated: Aug 26 '15