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

Revision history [back]

click to hide/show revision 1
initial version

Hi Alex,

There is an important difference between source code files and executable files. This goes back to the very basics of programming. Source code files are text files, you can open then in a text editor and read them. Source code files are often used to generate executables. Executable files are binary files, they contain sequences of zeros and ones that are designed to give instructions to your computer (rviz for example contains binary code to enable your computer to perform tasks such as "create a window and draw sensor measurements from the sensor of port xx on the screen").

Practically, executables are not readible by humans: it consists of a very low level 'processor language', as opposed to a source file which contains a fairly straightforward human understandable programming language.

As I said before, in many languages source code files are used to generate executable files. A compiler is used to compile source code into binary files. Languages like c++, c and java need to be compiled. Other languages like html and python can be executed directly, without the need to compile. What actually happens is that an interpreter turns the code in real-time into machine executable instructions for your processor.

Good luck!

P.s. In ROS, catkin_make or rosmake take care of compiling.

P.p.s. Strictly speaking a source code file is of course also described by zeros and ones, but in such a way that your text editor can turn it into text. Executable files can't be turned into some form of text easily. When people are hacking and/or reverse-engineering executable, they sometimes try to figure out how to understand and/or manipulate (=edit) binary files.

For more info you can check: http://en.wikipedia.org/wiki/Executable (espacially the part: Generation of executable files) http://en.wikipedia.org/wiki/Binary_file http://en.wikipedia.org/wiki/Source_code