//PLUGINLIB_DECLARE_CLASS(image_preproc_ros_tool, ResizeNodelet,
// image_preproc_ros_tool::ResizeNodelet, nodelet::Nodelet);
PLUGINLIB_EXPORT_CLASS(image_preproc_ros_tool::ResizeNodelet, nodelet::Nodelet);
sudo ln -s /usr/include/eigen3/Eigen /usr/include/Eigen
答曰:将网线拔掉(即:装Linux时,千万不要联网)就可以了,一切顺利,浪费了很长时间解决这个问题。
以为是系统镜像问题,重新做了多少次系统启动盘;以为是显卡问题,拔掉显卡重新装,还是这样子;曾以为是主板问题。是:网线的问题。装Linux时,千万不要联网
// 禁用nouveau
sudo gedit /etc/modprobe.d/blacklist.conf
// 加上
blacklist nouveau
//最后输入使之生效
sudo update-initramfs -u
然后开始装nvidia驱动
解决办法是修改hosts文件,添加这个网站的ip地址
#打开hosts文件
sudo gedit /etc/hosts
#在文件末尾添加
151.101.84.133 raw.githubusercontent.com
#保存后退出再尝试
rostopic echo /话题名称 | grep frame_id
find_package(PCL 1.8 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
将 #include
#include
version: "2"
include <eigen3/unsupported/Eigen/MatrixFunctions>
1.
mkdir release
2.
cmake -D CMAKE_BUILD_TYPE=RELEASE -DBUILD_TIFF=ON -DCMAKE_INSTALL_PREFIX=/usr/local PYTHON3_EXECUTABLE=/usr/bin/python3.5 PYTHON_INCLUDE_DIR=/usr/include/python3.5 PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib-3.4.3/modules ..
3.
sudo make
4.
sudo make install
{
//切换版本
CMAKE_MINIMUM_REQUIRED( VERSION 2.8)
PROJECT(useOpenCV)
set(OpenCV_DIR "usr/local/share/OpenCV") // 设置opencv路径来切换版本
FIND_PACKAGE(OpenCV REQUIRED)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
add_executable(useOpenCV useOpenCV.cpp)
TARGET_LINK_LIBRARIES(useOpenCV ${OpenCV_LIBRARIES})
}
//依赖
sudo apt-get update
sudo apt-get install git build-essential linux-libc-dev
sudo apt-get install cmake cmake-gui
sudo apt-get install libusb-1.0-0-dev libusb-dev libudev-dev
sudo apt-get install mpi-default-dev openmpi-bin openmpi-common
sudo apt-get install libflann1.8 libflann-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev
sudo apt-get install libqhull* libgtest-dev
sudo apt-get install freeglut3-dev pkg-config
sudo apt-get install libxmu-dev libxi-dev
sudo apt-get install mono-complete
sudo apt-get install qt-sdk openjdk-8-jdk openjdk-8-jre
//下载
git clone https://github.com/PointCloudLibrary/pcl.git
//编译
cd pcl
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON \
-DCMAKE_INSTALL_PREFIX=/usr ..
make
sudo make install
//CMakeLists.txt
find_package(PCL 1.8 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
sudo gedit /etc/apt/sources.list
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial main universe restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial main universe restricted multiverse #Added by software-properties
#set(METIS_URL https://github.com/ethz-asl/thirdparty_library_binaries/raw/master/metis-5.1.0.tar.gz)
#URL ${METIS_URL}
#URL ${METIS_URL}
dpkg -s libboost-dev | grep 'Version'
./bootstrap.sh
sudo ./b2
sudo ./b2 install
sudo rm -rf /usr/local/lib/libboost_*
sudo rm -rf /usr/local/include/boost/
include(ExternalProject)
file(MAKE_DIRECTORY ${CATKIN_DEVEL_PREFIX}/include)
ExternalProject_Add(gtsam_src
GIT_REPOSITORY https://github.com/borglab/gtsam.git
#GIT_TAG 687ae3d2511b9c296af08ec2f2e717b0627a8d68
#GIT_TAG 4.0.0
UPDATE_COMMAND ""
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/use_catkinized_metis.patch &&
patch -p1 < ${CMAKE_SOURCE_DIR}/fix_warnings.patch
CONFIGURE_COMMAND cmake -DCMAKE_INSTALL_PREFIX:PATH=${CATKIN_DEVEL_PREFIX} -DGTSAM_USE_SYSTEM_EIGEN=ON
-DCMAKE_BUILD_TYPE=Release ../gtsam_src
BUILD_COMMAND make -j2
INSTALL_COMMAND make install
)
https://username:password@github.com
或者 https://username:password@gitee.com
bazel clean --expunge
sudo ln -s 源文件 目标文件
sudo find / -name "cc1plus"
bazel build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100
sudo update-alternatives --config gcc
sudo gedit ~/.gitconfig
然后删除代理https_proxy等。===================================================
sudo ln -s
sudo ln -s /usr/lib/x86_64-linux-gnu/libtbbmalloc.so.2 /usr/lib/x86_64-linux-gnu/libtbbmalloc.so
sudo apt-get remove --purge nvidia*
sudo apt-get autoremove
sudo /usr/bin/nvidia-uninstall
sudo service lightdm stop
sudo ./NVIDA-Linux- --dkms --no-opengl-files
reboot
【备注】:dkms 最好选yes;32位兼容最好选yes;x-org最好选no。此处–no-opengl-files意思是不使用GPU对openGL加速,而是使用CPU核显。如果想使用GPU加速桌面及软件的话就去掉
重新添加ros的源及key
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo rm -rf /var/log/cups
sudo service cups stop
sudo chmod 000 /usr/sbin/cupsd
解决办法:手动链接库
ln –s libuuid.so.1.3.0 libuuid.so
1、error: ‘random_device’ was not declared in this scope
【解决】:在头文件加上 #include
2、error: no match for ‘operator=’ (operand types are ‘mrpt::poses::CPose3D’ and ‘mrpt::math::TPose3D’)
【解决】:改成:
pose_gt = CPose3D(TPose3D(v_auxgt(0),v_auxgt(1),v_auxgt(2),v_auxgt(3),v_auxgt(4),v_auxgt(5)));
【解决】:yaml-cpp.so.0.5.2安装到:
set(LIB_INSTALL_DIR “/usr/lib/x86_64-linux-gnu”)
然后将home下的.rviz文件全部删除,再重新运行rviz即可
【解决】:添加 -fPIC -shared 。并且重启vscode
【解决】: 把glfag编译成动态库,在其CMakeLists.txt里面将Shared lib 置ON
【解决】:删除build后,执行./build.sh
【解决】:
Windows下.m文件编码不是utf-8,需要转换
安装enca:
sudo apt install enca
在对应文件夹下把所有.m 文件转换过来
~$ enca -L zh_CN -x utf-8 *.m
没有中文字体
为系统安装中文字体,
在matlab设置中为编辑器(editor)选择对应字体即可
void
Strutil::utf8_to_unicode (string_view str, std::vector<uint32_t> &uvec)
{
const char* begin = str.begin();
const char* end = str.end();
uint32_t state = 0;
for (; begin != end; ++begin) {
uint32_t codepoint;
if (!decode(&state, &codepoint, (unsigned char) *begin))
uvec.push_back(codepoint);
}
}
依赖:OpenExr2.2
【解决】:将其改为绝对路径。(由于opencv_contrib-3.4.3 和 opencv-3.4.3是分开的,之前的相对路径都错了)
参考:https://blog.csdn.net/weixin_44152895/article/details/102882502
【参考】https://blog.csdn.net/u011736771/article/details/85960300