参考:"https://github.com/nodesource/distributions" (https://link.segmentfault.com/?enc=T9cPjhDy5QPYlqHGJ9bFYg%3D%3D.1Vmn3KSXv%2BCcBkco%2B3LhBLpYgjYXL%2FV5b7pbD0qnxl%2Fgh80EjLG6qFO9KrnHnNEt) docker pull ubuntu:22.04 docker run --rm -it ubuntu:22.04 bash apt-get update apt-get install -y ca-certificates curl gnupg mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg NODE_MAJOR=16; echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list apt-get update apt-get install nodejs npm -y 报错 137 added, 0 removed; done. Setting up gpg-wks-server (2.2.27-3ubuntu2.1) ... Setting up libcurl4:amd64 (7.81.0-1ubuntu1.13) ... Setting up curl (7.81.0-1ubuntu1.13) ... Setting up gpg-wks-client (2.2.27-3ubuntu2.1) ... Setting up gnupg (2.2.27-3ubuntu2.1) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... Processing triggers for ca-certificates (20230311ubuntu0.22.04.1) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Get:3 https://deb.nodesource.com/node_16.x nodistro InRelease [12.1 kB] Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Get:5 https://deb.nodesource.com/node_16.x nodistro/main amd64 Packages [7253 B] Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease Fetched 19.4 kB in 6s (3210 B/s) Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: nodejs : Conflicts: npm npm : Depends: node-cacache but it is not going to be installed Depends: node-gyp but it is not going to be installed Depends: node-mkdirp but it is not going to be installed Depends: node-nopt but it is not going to be installed Depends: node-tar but it is not going to be installed Depends: node-which but it is not going to be installed Depends: nodejs:any (>= 10) Recommends: git but it is not going to be installed Recommends: node-tap but it is not going to be installed E: Unable to correct problems, you have held broken packages.
使用n成功安装成功了node ο node/18.17.1 Use up/down arrow keys to select a version, return key to install, d to delete, q to quit 但是输入命令 root@DESKTOP-GS0KUCE:~# node --version -bash: /usr/bin/node: No such file or directory 应该怎么办
1、首先列出我配置好的 Makefile.config文件截图:2、安装第三方库: sudo apt-get install python-skimage3、参考安装网址:ubuntu16.04安装caffe cpu版_Double_V的博客-CSDN博客4、在bashrc中添加caffe路径打开:gedit .bashrc在最后添加如下export PYTHONPATH=/home/dxy/caffe/python:$PYTHONPATH保存.bashrc后:source .bashrc这样在任意终端都可以导入caffe了5、参考make 报错解决办法网址:.build_release/lib/libcaffe.so: undefined reference to cv::imread(cv::String const&, int)’_u011636440的博客-CSDN博客6、Makefile.config整个文件## Refer to http://caffe.berkeleyvision.org/installation.html # Contributions simplifying and improving our build system are welcome! # cuDNN acceleration switch (uncomment to build with cuDNN). # USE_CUDNN := 1 # CPU-only switch (uncomment to build without GPU support). CPU_ONLY := 1 # uncomment to disable IO dependencies and corresponding data layers # USE_OPENCV := 0 # USE_LEVELDB := 0 # USE_LMDB := 0 # This code is taken from https://github.com/sh1r0/caffe-android-lib # USE_HDF5 := 0 # uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary) # You should not set this flag if you will be reading LMDBs with any # possibility of simultaneous read and write # ALLOW_LMDB_NOLOCK := 1 # Uncomment if you're using OpenCV 3 OPENCV_VERSION := 3 # To customize your choice of compiler, uncomment and set the following. # N.B. the default for Linux is g++ and the default for OSX is clang++ # CUSTOM_CXX := g++ # CUDA directory contains bin/ and lib/ directories that we need. CUDA_DIR := /usr/local/cuda # On Ubuntu 14.04, if cuda tools are installed via # "sudo apt-get install nvidia-cuda-toolkit" then use this instead: # CUDA_DIR := /usr # CUDA architecture setting: going with all of them. # For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility. # For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility. # For CUDA >= 9.0, comment the *_20 and *_21 lines for compatibility. CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \ -gencode arch=compute_20,code=sm_21 \ -gencode arch=compute_30,code=sm_30 \ -gencode arch=compute_35,code=sm_35 \ -gencode arch=compute_50,code=sm_50 \ -gencode arch=compute_52,code=sm_52 \ -gencode arch=compute_60,code=sm_60 \ -gencode arch=compute_61,code=sm_61 \ -gencode arch=compute_61,code=compute_61 # BLAS choice: # atlas for ATLAS (default) # mkl for MKL # open for OpenBlas BLAS := atlas # Custom (MKL/ATLAS/OpenBLAS) include and lib directories. # Leave commented to accept the defaults for your choice of BLAS # (which should work)! # BLAS_INCLUDE := /path/to/your/blas # BLAS_LIB := /path/to/your/blas # Homebrew puts openblas in a directory that is not on the standard search path # BLAS_INCLUDE := $(shell brew --prefix openblas)/include # BLAS_LIB := $(shell brew --prefix openblas)/lib # This is required only if you will compile the matlab interface. # MATLAB directory should contain the mex binary in /bin. # MATLAB_DIR := /usr/local # MATLAB_DIR := /Applications/MATLAB_R2012b.app # NOTE: this is required only if you will compile the python interface. # We need to be able to find Python.h and numpy/arrayobject.h. PYTHON_INCLUDE := /usr/include/python2.7 \ /usr/lib/python2.7/dist-packages/numpy/core/include # Anaconda Python distribution is quite popular. Include path: # Verify anaconda location, sometimes it's in root. # ANACONDA_HOME := $(HOME)/anaconda # PYTHON_INCLUDE := $(ANACONDA_HOME)/include \ # $(ANACONDA_HOME)/include/python2.7 \ # $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include # Uncomment to use Python 3 (default is Python 2) # PYTHON_LIBRARIES := boost_python3 python3.5m # PYTHON_INCLUDE := /usr/include/python3.5m \ # /usr/lib/python3.5/dist-packages/numpy/core/include # We need to be able to find libpythonX.X.so or .dylib. PYTHON_LIB := /usr/lib # PYTHON_LIB := $(ANACONDA_HOME)/lib # Homebrew installs numpy in a non standard path (keg only) # PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include # PYTHON_LIB += $(shell brew --prefix numpy)/lib # Uncomment to support layers written in Python (will link against Python libs) # WITH_PYTHON_LAYER := 1 # Whatever else you find you need goes here. INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial # If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies # INCLUDE_DIRS += $(shell brew --prefix)/include # LIBRARY_DIRS += $(shell brew --prefix)/lib # NCCL acceleration switch (uncomment to build with NCCL) # https://github.com/NVIDIA/nccl (last tested version: v1.2.3-1+cuda8.0) # USE_NCCL := 1 # Uncomment to use `pkg-config` to specify OpenCV library paths. # (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.) # USE_PKG_CONFIG := 1 # N.B. both build and distribute dirs are cleared on `make clean` BUILD_DIR := build DISTRIBUTE_DIR := distribute # Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171 # DEBUG := 1 # The ID of the GPU that 'make runtest' will use to run unit tests. TEST_GPUID := 0 # enable pretty build (comment to see full commands) Q ?= @
Open2.x-Python 特征点检测方法对于OpenCV2.x-Python,特征点检测及显示方法如下:# OpenCV2.x-Pythonfunction = cv2.Function_Name()keypoints = function.detect(img, None)img2 = cv2.drawKeyPoints(img, keypoints, color=(0,255,0))其中Function_Name就是特征检测方法的函数名,如BRISK、FastFeatureDetector等。比如,在OpenCV2.x-Python,想使用Fast来检测特征点,示例如下:# OpenCV2.x-Pythonfast = cv2.FastFeatureDetector()keypoints = fast.detect(img, None)img2 = cv2.drawKeypoints(img, keypoints, color=(255,0,0))Open3.x-Python 特征点检测方法对于OpenCV3.x-Python,特征点检测及显示方法如下:# OpenCV3.x-Python# 注意有_create()后缀function = cv2.Function_Name_create()keypoints = function.detect(img, None)# 注意显示之前要先将img2初始化img2 = img.copy()img2 = cv2.drawKeyPoints(img, keypoints, color=(0,255,0))其中Function_Name就是特征检测方法的函数名,如BRISK、FastFeatureDetector等。[注意1]:对于OpenCV3.x-Python,还要在Function_Name后加上_create后缀。其实这一点在opencv_doc中具体的函数python使用方法中已经注明了。[注意2]:对于OpenCV3.x-Python,若要显示检测的特征点,需要初始化img2,才能正常显示。这里可以先使用img2 = img.copy()完成拷贝初始化。下面就重点介绍OpenCV3.x-Python中的各种特征点检测方法的使用示例。测试图像为标准的lena.pngAKAZE Feature Detection#!/usr/bin/env python # -*- coding=utf-8 -*- # Summary: 使用OpenCV3.x-Python检测AKAZE特征点 # Author: Amusi # Date: 2018-03-17 # Reference: https://docs.opencv.org/master/d8/d30/classcv_1_1AKAZE.html import cv2 import numpy def main(): img = cv2.imread("lena.png") cv2.imshow('Input Image', img) cv2.waitKey(0) # 检测 akaze = cv2.AKAZE_create() keypoints = akaze.detect(img, None) # 显示 # 必须要先初始化img2 img2 = img.copy() img2 = cv2.drawKeypoints(img, keypoints, img2, color=(0,255,0)) cv2.imshow('Detected AKAZE keypoints', img2) cv2.waitKey(0) if __name__ == '__main__': main()BRISK Feature Detection#!/usr/bin/env python # -*- coding=utf-8 -*- # Summary: 使用OpenCV3.x-Python检测BRISK特征点 # Author: Amusi # Date: 2018-03-17 # Reference: https://docs.opencv.org/master/de/dbf/classcv_1_1BRISK.html import cv2 import numpy def main(): img = cv2.imread("lena.png") cv2.imshow('Input Image', img) cv2.waitKey(0) brisk = cv2.BRISK_create() keypoints = brisk.detect(img, None) # 必须要先初始化img2 img2 = img.copy() img2 = cv2.drawKeypoints(img, keypoints, img2, color=(0,255,0)) cv2.imshow('Detected BRISK keypoints', img2) cv2.waitKey(0) if __name__ == '__main__': main()Fast Feature Detection#!/usr/bin/env python # -*- coding=utf-8 -*- # Summary: 使用OpenCV3.x-Python检测FAST特征点 # Author: Amusi # Date: 2018-03-17 # Reference: https://docs.opencv.org/master/df/d74/classcv_1_1FastFeatureDetector.html import cv2 import numpy def main(): img = cv2.imread("lena.png") cv2.imshow('Input Image', img) cv2.waitKey(0) # 2018-03-17 Amusi: OpenCV3.x FeatureDetector写法有变化 # OpenCV2.x # fast = cv2.FastFeatureDetector() # keypoints = fast.detect(img, None) # OpenCV3.x # 注意有_create()后缀 fast = cv2.FastFeatureDetector_create() keypoints = fast.detect(img, None) # 必须要先初始化img2 img2 = img.copy() img2 = cv2.drawKeypoints(img, keypoints, img2, color=(0,255,0)) cv2.imshow('Detected FAST keypoints', img2) cv2.waitKey(0) if __name__ == '__main__': main()KAZE Feature Detection#!/usr/bin/env python # -*- coding=utf-8 -*- # Summary: 使用OpenCV3.x-Python检测KAZE特征点 # Author: Amusi # Date: 2018-03-17 # Reference: https://docs.opencv.org/master/d3/d61/classcv_1_1KAZE.html import cv2 import numpy def main(): img = cv2.imread("lena.png") cv2.imshow('Input Image', img) cv2.waitKey(0) # 检测 kaze = cv2.KAZE_create() keypoints = kaze.detect(img, None) # 显示 # 必须要先初始化img2 img2 = img.copy() img2 = cv2.drawKeypoints(img, keypoints, img2, color=(0,255,0)) cv2.imshow('Detected KAZE keypoints', img2) cv2.waitKey(0) if __name__ == '__main__': main()ORB Feature Detection#!/usr/bin/env python # -*- coding=utf-8 -*- # Summary: 使用OpenCV3.x-Python检测ORB特征点 # Author: Amusi # Date: 2018-03-17 # Reference: https://docs.opencv.org/master/db/d95/classcv_1_1ORB.html import cv2 import numpy def main(): img = cv2.imread("lena.png") cv2.imshow('Input Image', img) cv2.waitKey(0) # 检测 orb = cv2.ORB_create() keypoints = orb.detect(img, None) # 显示 # 必须要先初始化img2 img2 = img.copy() img2 = cv2.drawKeypoints(img, keypoints, img2, color=(0,255,0)) cv2.imshow('Detected ORB keypoints', img2) cv2.waitKey(0) if __name__ == '__main__': main()----------我是可爱的分割线----------下面介绍属于nonfree的特征检测方法,如SIFT和SURF。这些方法在opencv-contrib中,所以想要使用前,请卸载当前非contrib版本的opencv,即pip uninstall opencv-python后;再重新安装opencv-contrib-python,即pip install opencv-contrib-pythonSIFT Feature Detection#!/usr/bin/env python # -*- coding=utf-8 -*- # Summary: 使用OpenCV3.x-Python检测SIFT特征点 # Author: Amusi # Date: 2018-03-17 # Reference: https://docs.opencv.org/master/d5/d3c/classcv_1_1xfeatures2d_1_1SIFT.html import cv2 import numpy def main(): img = cv2.imread("lena.png") cv2.imshow('Input Image', img) cv2.waitKey(0) # 检测 sift = cv2.xfeatures2d.SIFT_create() keypoints = sift.detect(img, None) # 显示 # 必须要先初始化img2 img2 = img.copy() img2 = cv2.drawKeypoints(img, keypoints, img2, color=(0,255,0)) cv2.imshow('Detected SIFT keypoints', img2) cv2.waitKey(0) if __name__ == '__main__': main()SURF Feature Detection#!/usr/bin/env python # -*- coding=utf-8 -*- # Summary: 使用OpenCV3.x-Python检测SURF特征点 # Author: Amusi # Date: 2018-03-17 # Reference: https://docs.opencv.org/master/d5/df7/classcv_1_1xfeatures2d_1_1SURF.html import cv2 import numpy def main(): img = cv2.imread("lena.png") cv2.imshow('Input Image', img) cv2.waitKey(0) # 检测 surf = cv2.xfeatures2d.SURF_create() keypoints = surf.detect(img, None) # 显示 # 必须要先初始化img2 img2 = img.copy() img2 = cv2.drawKeypoints(img, keypoints, img2, color=(0,255,0)) cv2.imshow('Detected SURF keypoints', img2) cv2.waitKey(0) if __name__ == '__main__': main()注:OpenCV3.x-Python与OpenCV2.x-Python有很多函数的用法不同,虽然网上教程大多参次不齐,但可以直接去官网查看最新的用法(官网即正义)
1、创建Python2虚拟环境mkvirtualenv ros_cv -p python这里创建一个ros_cv 的虚拟环境,制定的Python环境为22、创建Python3的虚拟环境3、进入指定的虚拟环境工作workon 双击tab键4、停止虚拟环境deactivate5、删除虚拟环境:rmvirtualenv6、使用pip freeze 将当前的虚拟环境中的库名称全部存储在.txt中pip3 freeze >requirements.txt7、使用pip install安装虚拟环境,这样方便直接把环境移植到其他系统中pip install -r requirements.txt
1、在我的ubutnu20.04安装ssh sudo apt-get install openssh-server2、查看被访问的电脑的的IP地址: ifconfig如图所示查到的IP地址为:192.168.100.2553、查看被访问电脑的用户名:那么这台被访问的用户名就是dxy4、对被访问的电脑进行参数设置:设置结果如图所示我们可以看到,这几行默认不允许root登录SSH,所以我们要进行相应设置,我们替换后的地方为如下:# Authentication: LoginGraceTime 120 #PermitRootLogin without-password PermitRootLogin no StrictModes yes5、windows上安装putty并设置6、点击open并输入被连接的ubutnu20.04密码7、连接成功
一、简介: 目前,我们系统开机自启动需要打开界面后才能启动,有两种解决办法,第一种就是修改启动顺序,第二种就是打开界面后启动开机启动脚本后再立马通过命令锁屏,目前,通过第二种办法进行操作实现,第一种方案等以后再实现二、安装安装锁屏命令sudo apt install gnome-screensaver三、执行锁屏操作gnome-screensaver-command -l四、修改开机启动脚本 经过前面安装和操作测试后,可以通过命令行实现锁屏,下面需要修改开机自启动配置文件,让界面进入后,执行启动脚本后,执行锁屏,然后再执行其它自启动操作。创建test.sh添加执行权限:sudo chmod +x test.sh #!/bin/zsh echo -e "\033[45;37m---------roslaunch rosbridge_server无桌面后台运行供安卓APP数据采集---------\033[0m" roslaunch cartographer_ros mapping.launch echo -e "\033[45;37m---------开启锁屏---------\033[0m" gnome-screensaver-command -l & 打开终端,输入:gnome-session-properties设置开机自启动即可。
sudo apt install -y uuid-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev liblzma-dev libssl-dev libgdbm-compat-dev libffi-dev libreadline-dev 安装一些东西,安装好了,都需要我重启服务 "图片.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241226/5182c0a1e1b15a214c0bb8f7560d93c8.png) Setting up checkinstall (1.6.2+git20170426.d24a630-2ubuntu2) ... Processing triggers for man-db (2.10.2-1) ... Scanning processes... Scanning candidates... Scanning processor microcode... Scanning linux images... Running kernel seems to be up-to-date. The processor microcode seems to be up-to-date. Restarting services... Service restarts being deferred: /etc/needrestart/restart.d/dbus.service systemctl restart docker.service systemctl restart networkd-dispatcher.service systemctl restart systemd-logind.service systemctl restart unattended-upgrades.service systemctl restart user@1001.service No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. 这就很烦,尤其是还会重启 docker,为什么呢?有的 ubuntu 就不用,有的就用
在编译catkin_make的时,报错error This file requires compiler and library support for the ISO C++ 2011 standard.参考网址:error This file requires compiler and library support for the ISO C++ 2011 standard._西涯先生的博客-CSDN博客在对应的功能包中的CMakeLists.txt中任意位置添加如下,可以编译成功:SET( CMAKE_CXX_FLAGS "-std=c++11 -O3")
参考链接:VINS-Mono环境配置与测试笔记_guaijiaodie2064的博客-CSDN博客_vins配置这个链接中的安装注意,建立好build文件后,要进入后编译,即cd build ,然后再cmake .. 接下来的的操作参考二:Installation — Ceres Solver遇到一个安装问题:参考 :cmake安装遇到问题总结_野孩子的专栏-CSDN博客这个错误的解决办法就是安装没有权限,,采用:sudo make install 即可,因此以后要切记加sudosudo make install