1. Check Qt version on TX2: terminal running

$ qmake --version
Copy the code

The following information is displayed: QMake version 3.0 Using Qt version 5.5.1 in /usr/lib/aarch64-linux-gnu

2. Install qtCreator to enable terminal operation

$ sudo apt-get install qt5-default qtcreator -y
Copy the code

3. Modify Qtcreator startup shortcut to load environment variables

$ cd /usr/share/applications/

$ sudo gedit qtcreator.desktop
Copy the code

Find Exec and join bash-i-c:

Exec=bash -i -c qtcreator %F

The final result is roughly as shown in the figure below:

4. Configure Qt Creator on TX2

  • Open Qt Creator and go to Tools->Options->Build & Run->Compilers

  • Click on theAddButton to selectGCC. inThe Compiler path: 'To select a path to join /usr/bin/gcc. And set it in sequenceABIThe options are shown below 🙁Custom - ARM - Linux - generic - ELF - 64 bit) :

  • And then clickApplyButton to save and clickKits:

– Keep clickingAddButton, fill in Name, Qt Version, CMake Tool and other information as shown in the picture below:

  • Click on theApplyAnd then clickOK, the setting is complete.

5. Simple test — open a ROS package:

  • Open ProjectSelect the cmakelists. TXT file that you want to open ROS Package and clickOpenButton.

– Then, clickBrowse...Select (or create) the Build folder. I usually put it under package, which is level with the SRC folder.

  • Click on theNextButton:

  • Click on theRun CMake:

  • And when it’s done,FinishButton from grey to optional, clickFinishButton to successfully import package.

  • Now you can have fun dancing with code on TX2! Note: TX1 can be installed, configured and set up in the same way as above.

END