ROS ubuntu18.04 工控机安装(轮趣科技 )验证通过
#先安装 ubuntu18.04
#参考一下文档安装 ROS Melodic
http://wiki.ros.org/cn/melodic/Installation/Ubuntu
#基本上以下可以解决所有问题。
#遇到更新源 timeout 问题,需要修改配置文件 增加代码 http://xxxxx/https:///
#这个网上也可以百度到修改方法
sudo apt-get install libuvc-dev
sudo apt-get install libudev-dev
sudo apt-get remove ros-melodic-librealsense2
sudo apt-get install ros-melodic-realsense2-camera
sudo apt-get install ros-melodic-realsense2-description
sudo apt-get install ros-melodic-realsense2-camera-dbgsym
sudo apt-get install ros-kinetic-costmap-converter
sudo apt-get install ros-melodic-bfl
sudo apt-get install ros-melodic-serial
sudo apt-get install ros-melodic-tf2-sensor-msgs
sudo apt-get install ros-melodic-move-base-msgs
sudo apt-get install ros-melodic-costmap-converter
sudo apt-get install ros-melodic-mbf-costmap-core
sudo apt-get install ros-melodic-mbf-msgs
sudo apt-get install ros-melodic-libg2o
sudo apt-get install libbullet-dev
sudo apt-get install libsdl1.2-dev
sudo apt-get install libsdl-image1.2-dev
sudo apt-get install ros-melodic-csm
sudo apt-get install libpgm-dev
sudo apt-get install libnetpbm10-dev
#缺少 .h 文件
#拷贝虚拟机 /usr/include 目录下 文件到对应目录
netpbm-shhopt.h pbm.h pbmplus.h pgm.h pm_config.h pm.h
#需要单独下载安装
git clone https://github.com/ros-geographic-info/unique_identifier.git
#下面这个需要很长时间
更新Ubuntu发行版,包括获取最新的稳定内核
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
安装构建librealsense二进制文件和受影响内核模块所需的核心包
sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev
sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev # Ubuntu 18.04 的执行该步,其他版本有其他命令
cd 到从 github 上下载下来的源码目录
安装位于librealsense源目录中的Intel Realsense权限脚本
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger
脚本将下载、修补和构建受现实影响的内核模块(驱动程序)
./scripts/patch-realsense-ubuntu-lts.sh # 这一步需要很久,近一个小时
导航到 librealsense 根目录并运行
mkdir build && cd build
构建librealsense以及演示和教程
cmake …/ -DBUILD_EXAMPLES=true
编译并安装librealsense二进制文件
sudo make -j16 # 我的 CPU 是 8 核 16 线程的,所以我填的 16,多线程编译可以提高速度
sudo make install # 安装
#如果有需要可以加我微信 18151119929
参考资料
https://guyuehome.com/34925
https://blog.csdn.net/weixin_42915934/article/details/125647636
https://www.cnblogs.com/Godzilla-Good-Boy/p/15933488.html
https://blog.csdn.net/weixin_50508111/article/details/121087220
mkdir -p CATKIN_IGNORE 忽略编译
sudo vim /home/wheeltec_client/wheeltec_robot/src/ros_astra_camera/src/astra_driver.cpp:572:
sudo vim /home/wheeltec_client/wheeltec_robot/src/realsense-ros-development/realsense2_camera/src/base_realsense_node.cpp