当前位置:网站首页>ROS QT environment construction
ROS QT environment construction
2022-06-22 07:05:00 【Ice cream】
download Qt
- S1:
sudo apt-get install qtcreatorThe installed version may be too long , So the official website is installed :https://download.qt.io/archive/qt/ - S2: Choose the version https://download.qt.io/archive/qt/5.9/5.9.9/: qt-opensource-linux-x64-5.9.9.run
- S3: Enter the installation directory , Change execution permission :
chmod a+x qt-opensource-linux-x64-5.9.9.run - S4: Double click installation , always next, Installation component selection
Desktop gcc 64-bitthat will do , Other on-demand installations - S5: Then double-click... Under the installation directory Qtreator It's ready to run , But for convenience , So add to the environment variable
sudo nano /usr/bin/qtcreator
Add the following :#!/bin/sh export QT_HOME=/home/guyue/Qt5.9.9/Tools/QtCreator/bin $QT_HOME/qtcreator $*ctrl+owrite in ,ctrl+xsign out - S6: Add execute permission :
sudo chmod a+x /usr/bin/qtcreator - S7: Terminal operation :
qtcreator
ROS rely on
S1: Installation dependency
sudo apt-get install ros-melodic-qt-create sudo apt-get install ros-melodic-qt-build # sudo apt-get install qtmultimedia5-devS2: establish Qt Function pack
catkin_create_qt_pkg Function package name rely on 1 rely on 2 # Example : cd ~/am_ws/src catkin_create_qt_pkg class1_ros_qt_demo roscpp rvizS3.1: here
catkin_makeWill report a mistake , Make the following changes :
# 1/ Settings include the current directory : set(CMAKE_INCLUDE_CURRENT_DIR ON) # 2/ add to qt library : find_package(Qt5 REQUIRED Core Widgets) set(QT_LIBRARIES Qt5::Widgets) # 3/ Delete : rosbuild_prepare_qt4(QtCore QtGui) # 4/ change # QT4_ADD_RESOURCES(QT_RESOURCES_CPP) ${QT_RESOURCES}) # QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS}) # QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC}) # Change it to : QT5_ADD_RESOURCES(QT_RESOURCES_CPP) ${QT_RESOURCES}) QT5_WRAP_UI(QT_FORMS_HPP ${QT_FORMS}) QT5_WRAP_CPP(QT_MOC_HPP ${QT_MOC})Specific in CMakeList.txt Refer to the following figure for the changes in :

S3.2: An error will be reported when compiling again , You need to change
~/am_ws/src/class1_ros_qt_demo/include/class1_ros_qt_demo/main_window.hppfile , take :#include <QtGui/QMainWindow>, Change it to :#include <QtWidgets/QMainWindow>S4: Then everything is normal and the test can be carried out
test
S1: Run the following commands , The screen appears :
rosrun class1_ros_qt_demo class1_ros_qt_demo
S2: function
roscore, Click... On the above interfaceconnect, Connect
Qt compile ROS engineering
S1: To configure Qt Of ROS Environmental Science
Use Qt Open workspace/srcUnder the CmakeList.txt;
To configure build The directory is a workspace/build;
And then clickConfigure Project
Note that the workspace is open src Under the CmakeList, Not the feature pack
S1.2: If the project does not open properly


S1.3: Header files are in
<Headers>Inside , Click to open the header file , PressF4Key to switch between the header file and the corresponding cpp fileS2: Run configuration
Click onproject, And then chooserun, stayrun configureSettings that need to be run , If it is empty , You can click on theaddButton to add
S3: Then click the green icon to run
Reference resources
Video reference Gu Yueju :

Note reference :https://blog.csdn.net/weixin_51524504/article/details/121465413
边栏推荐
- [Gan] Introduction to Gan basics and dcgan
- golang调用sdl2,播放pcm音频,报错signal arrived during external code execution。
- Qt development simple Bluetooth debugging assistant (low power Bluetooth)
- Successfully solved raise keyerror (F "none of [{key}] are in the [{axis\u name}]") keyerror: "none of [index (['age.in.y
- Up sampling and down sampling (notes, for personal use)
- [meta learning] classic work MAML and reply (Demo understands meta learning mechanism)
- Py之scorecardpy:scorecardpy的简介、安装、使用方法之详细攻略
- Custom implementation of bind method in JS
- [fundamentals of machine learning 03] gbdt (gradient boost decision tree)
- [anomaly detection] malware detection: mamadroid (dnss 2017)
猜你喜欢

首次用DBeaver连接mysql报错

Yolov1 (training process)
![[fundamentals of machine learning 01] blending, bagging and AdaBoost](/img/8e/e1920c8745cf981caa6fd1598065fb.jpg)
[fundamentals of machine learning 01] blending, bagging and AdaBoost
![[rust daily] January 23, 2022 webapi benchmarking](/img/f7/64f389ff2b8fb481820e577b8531b3.png)
[rust daily] January 23, 2022 webapi benchmarking

On vector norm

Introduction to 51 Single Chip Microcomputer -- the use of Proteus 8 professional

【Rust 日报】2022-01-23 WebAPI Benchmarking

Advanced usage of setting breakpoints during keil debugging

自然语言处理理论和应用

6. 安装ssh连接工具(用于我们连接实验室的服务器)
随机推荐
[out of distribution detection] learning confidence for out of distribution detection in neural networks arXiv '18
6. install the SSH connection tool (used to connect the server of our lab)
OpenGL - Draw Triangle
Custom implementation of bind method in JS
Network layer: IP protocol
QT connect to Alibaba cloud using mqtt protocol
Theory and application of naturallanguageprocessing
Up sampling and down sampling (notes, for personal use)
一个算子在深度学习框架中的旅程
Introduction to 51 single chip microcomputer - LED light
Thousands of sails pass by the side of the sunken boat, and thousands of trees spring before the diseased tree
《数据安全实践指南》- 数据采集安全实践-数据分类分级
Languo technology helps the ecological prosperity of openharmony
Introduction to 51 single chip microcomputer - matrix key
Error when connecting MySQL with dbeaver for the first time
Introduction to 51 Single Chip Microcomputer -- timer and external interrupt
咖啡供应链是如何被趟平的?
如何才能有效缓解焦虑?看看猿辅导怎么说
Qt development simple Bluetooth debugging assistant (low power Bluetooth)
Correspondence between pytorch and torchvision