When loading a CMakeLists.txt, QtCreator will read the content and display all sources (.h and. ![]() Just run the following line from the folder where CMakeLists.txt is:Īlias gqt="path/to/qtcreator_gen_config.py" This repository includes a script (for Linux / macOS) to automatically generate the QtCreator configuration file (non-ROS and ROS projects). On lab computers, the Debug mode is already activated.Īs seen in the previous section, and during some of the labs, Qt Creator can be tricky to configure when we want to load a CMake project, and even more when loading a ROS package. As this folder already exists, Qt Creator will load the compilation settings.The IDE asks for a compilation folder, select the build/package_name folder from the ROS workspace.Have ROS create all the necessary directories by calling catkin build form the ROS workspace.Modying an existing package does not require the following steps. When I write "new ROS package", I mean a package that was just created or downloaded in your src folder. Here are the steps to reproduce to load a new ROS package into Qt Creator (it should also work with other CMake-friendly IDE's). It is in the build folder of the ROS workspace and has to be created by ROS itself. On the other hand, the build directory is not inside the same folder. The projects are called "packages" and the sources are located in the src folder of the ROS workspace. If anything goes wrong (like C++ files not appearing), just quit Qt Creator, delete the file and follow the steps more carefully. There are small differences depending on the project being a ROS package or not. I recall below how to load a CMake project in Qt Creator. To use another tool, do what you want - but we cannot install all IDE's on the lab computers. If you feel (or are sure you are) confident enough Other IDE's may have the same properties (KDevelop, Eclipse) but Qt Creator is recommended for labs. The integration with CMake and even ROS catkin/colcon system works like a charm.You can easily go through the project files.It gives auto-completion which is particularly useful for OpenCV, ROS or ViSP classes.It allows an easy use of the debugger, which is the modern and efficient way to hunt for bugs.As with all IDE's, you can jump to the wrong lines when a compilation error is detected.How to configure Qt Creator for ROS Why an IDE and why Qt CreatorĪs we saw in class, I recommend the use of Qt Creator IDE to develop in C++. The IDE asks for a compilation folder, select the Imported Kit that should be set to the correct build folder.Compile the project using cmake and make.In this case I advise to unselect everything but the Debug mode, which activates the Debug compilation.Īlternatively, recent Qt Creation versions can try to guess what the build folder is if you have already compiled your code: Qt Creator may also ask for several folders depending on the build configuration (default, debug, release.).The IDE asks for a compilation folder, select the build folder that is in this project.Open file or project to select your CMakeLists.txt ![]() Launch Qt Creator and go through File. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |