1)git相关
git fetch --all git reset --hard origin/master // 注意后缀master代表远程分支 git pull
2)tail 输出
xxx > app.log 2>&1 &
QPlatformTheme::MouseDoubleClickDistance
gedit qtbase/src/gui/kernel/qguiapplication.cpp
3)交叉编译
https://www.jianshu.com/p/cce9c13d2471
wget https://developer.nvidia.com/embedded/dlc/r32-3-1_Release_v1.0/Sources/T210/public_sources.tbz2
https://blog.csdn.net/qq_17685565/article/details/105741864
http://wiki.ros.org/melodic/Installation/Source
mk@mk-System-Product-Name:/ssd/cross/rosarm/ros/qt1105/build$ /opt/qt-5.9.1-arm/bin/qmake ../RoboScrub_QT/
4) 手动网关
sudo route add default gw 192.168.1.1
5)
a)启动 gazebo 模拟器 可以在本机 但卡 ,如果在pc 则需要配 .bashrc 中的ros 远方路径
roslaunch launcher_state_machine sim_scrubber_launcher.launch
b) ./xxx > app.log 2>&1 &
c) rosrun navigator navigator_teleop_key
database 下需要 创建一个db的文件夹
6) qt apt 依赖
sudo apt-get install qt5-default qt5-doc-html qt5-qmake qt5-doc qt5-image-formats-plugins
sudo apt-get install libqt5quick5 libqt5charts5-dev qtquickcontrols2-5-dev qml-module-*
7)QT5.9 源码
https://download.qt.io/archive/qt/5.9/5.9.1/single/qt-everywhere-opensource-src-5.9.1.tar.xz.mirrorlist
8)UI调试方法 :
四肢滑动
gdb
9)qt lujing
/home/mk/Qt5.9.9x/5.9.9/gcc_64/bin/qmake
sudo gedit /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
#/usr/lib/x86_64-linux-gnu/qt4/bin
#/usr/lib/x86_64-linux-gnu
10)qt 键盘
export QT_IM_MODULE=qtvirtualkeyboard
sudo apt-get install qtvirtualkeyboard-plugin
11)交叉编译判断
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") find_package(catkin REQUIRED COMPONENTS roscpp std_msgs tt_common tt_app ) else () find_package(catkin REQUIRED COMPONENTS roscpp std_msgs tt_common tt_app prebuild ) endif ()
CMAKE_SYSTEM_PROCESSOR
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") find_package(catkin REQUIRED COMPONENTS roscpp std_msgs tt_common tt_app ) else () find_package(catkin REQUIRED COMPONENTS roscpp std_msgs tt_common tt_app prebuild ) endif ()
CMAKE_SYSTEM_PROCESSOR
12) chome 安装 arm64
sudo add-apt-repository ppa:a-v-shkop/chromium
enter
sudo apt-get update
sudo apt-get install chromium-browser
sudo apt-get install chromium-browser
13)apt-get离线下载
apt-get download tcpdump && apt-cache depends -i tcpdump | awk '/Depends:/ {print $2}' | xargs apt-get download
apt-get download ufw && apt-cache depends -i ufw | awk '/Depends:/ {print $2}' | xargs apt-get download
apt-get download sqlite3 && apt-cache depends -i sqlite3 | awk '/Depends:/ {print $2}' | xargs apt-get download
14)clion 配置文件
-DCATKIN_DEVEL_PREFIX:PATH=/ssd/sdfdasfasdf/devel
15)git rebase
git fetch origin
git rebase -S origin/develop
16)clion 环境配置
-DCATKIN_DEVEL_PREFIX:PATH=/ssd/build_rootDEVX64/dfasdfasfd/devel
17) linux 同步时间
ntpdate cn.pool.ntp.org
18) nohup &
19)GDB
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
20)硬盘挂载 mount -o ro,remount
21)c++ 获取网络状态
bool check_internet_wwan() {
std::string tmp("ping -c 3 -I wwan0 bing.com");
if (!system(tmp.c_str())) {
return true;
}
return false;
// return gethostbyname("www.bing.com") != nullptr;
}
22)tcpdump
tcpdump -i wlan0 tcp port 8883 -s0 -w /xxx/xxx
23) qt Debug
#define QDebug (qDebug() "Date:"QDate::currentDate()
#endif // PRE_H
24)clion 配置
vim ~/.local/share/applications/jetbrains-clion.desktop
更改Clion的启动文件
gedit ~/.local/share/applications/jetbrains-clion.desktop 1
更改Exec=bash "/home/zhangying/Downloads/clion-2019.1.2/bin/clion.sh" %f为
Exec=bash -i -c "/home/zhangying/Downloads/clion-2019.1.2/bin/clion.sh" %f
25) C++ Common.h
#define DEBUGLINE std::cout<<"__FILE__: "<<__FILE__ <<"__LINE__: "<<__LINE__<<std::endl;
static int const Regex2 = 2; static char const* const CmdAddIp = "ip address add 192.168.8.1/24 dev ";