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

Revision history [back]

1) A package is the tool used in ROS to organize the code in your workspace. It can contain several .cpp header files launchfiles, etc. On the other hand, the node is just a program you can execute. Because of that, you can create a package which contain any number of nodes. Typically, the nodes of a package are related among them or share code files.

2) You have to make a package and inside the package yo save your code. Later, when making a CMakeLists.txt you can specify which files to include when making your nodes. So imagine that a node is a program running in ROS system whereas the package is the container of the files needed to build a node (or more) in your PC.

3) You can add the package to Qt before building it. It can be built from Qt also. The CMakeLists.txt you have to add is the one that is inside the package. Be careful and follow the rules of Qt IDE to be able to build the package correctly:

3.1) To open a ROS package code as a project, use "Open File or Project" and select the CMakeLists.txt of your ROS package. Take care to select the "[package_name]/build" directory as the build directory, which is the ROS default. On the next screen click 'Run Cmake' and then Finish. This may not show all the folders such as launch and include in the project tree. If you want to choose the files manually, goto File->New File or Project->Import Project->Import Existing Project and selected to choose all files/folders included in the project.

3.2) You have to change the Exec line in file /usr/share/applications/qt.creator.desktop to look like the next one

[Desktop Entry]
Exec=bash -i -c qtcreator %F
Icon=QtProject-qtcreator
...

If you don't understand something please ask me.