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 the
Add
Button to selectGCC
. inThe Compiler path: '
To select a path to join/usr/bin/gcc
. And set it in sequenceABI
The options are shown below 🙁Custom - ARM - Linux - generic - ELF - 64 bit
) :
- And then click
Apply
Button to save and clickKits
:
– Keep clickingAdd
Button, fill in Name, Qt Version, CMake Tool and other information as shown in the picture below:
- Click on the
Apply
And then clickOK
, the setting is complete.
5. Simple test — open a ROS package:
Open Project
Select the cmakelists. TXT file that you want to open ROS Package and clickOpen
Button.
– Then, clickBrowse...
Select (or create) the Build folder. I usually put it under package, which is level with the SRC folder.
- Click on the
Next
Button:
- Click on the
Run CMake
:
- And when it’s done,
Finish
Button from grey to optional, clickFinish
Button 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