启智CV机器人,ROS,ubuntu 20.04 【最后一步有问题】

资料:
https://wiki.ros.org/kinetic/Installation/Ubuntu
https://blog.csdn.net/qq_44339029/article/details/120579608

装VM。

装ubuntu20.04 desktop.iso系统。

装vm工具:

cpp 复制代码
sudo apt update
sudo dpkg --configure -a
sudo apt-get autoremove open-vm-tools
sudo apt-get install open-vm-tools -y 
sudo apt-get install open-vm-tools-desktop -y

重启虚拟机。

断网修复:

cpp 复制代码
sudo rmmod e1000
sudo rmmod e1000e
sudo rmmod igb

sudo modprobe e1000
sudo modprobe e1000e
sudo modprobe igb

sudo dhclient ens33

sudo apt-get update && sudo apt-get upgrade
sudo apt-get purge network-manager
sudo apt-get install network-manager

进root:

cpp 复制代码
sudo -i
cpp 复制代码
apt install vim -y

增加ros软件源:

cpp 复制代码
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'

更换秘钥:

cpp 复制代码
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

更新软件源:

cpp 复制代码
sudo apt update

安装ros:

cpp 复制代码
sudo apt install ros-noetic-desktop-full -y

完成后是这样:

cpp 复制代码
sudo apt install python3-rosdep2
cpp 复制代码
vim /etc/hosts

通过IPAddress.com首页,输入raw.githubusercontent.com查询到最新的真实IP地址

cpp 复制代码
185.199.108.133 raw.githubusercontent.com
cpp 复制代码
rosdep init
cpp 复制代码
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc

source ~/.bashrc

安装rosinstall

cpp 复制代码
sudo apt install python3-rosinstall python3-rosinstall-generator python3-wstool -y

可以看到:

验证ROS是否安装成功

cpp 复制代码
sudo apt install python3-roslaunch
sudo apt install ros-noetic-desktop-full


roscore

正常会出现:

这样就是不正常:

做实验:

cpp 复制代码
cd ~
sudo apt install python3-catkin-tools python3-osrf-pycommon
source /opt/ros/noetic/setup.bash
mkdir -p /root/catkin_ws/src

cd /root/catkin_ws/src # 很重要!
catkin_create_pkg ad_sensor_package roscpp std_msgs

cd /root/catkin_ws
catkin_make

一定要注意我的执行顺序,最后一句catkin_make构建工作空间后是这样:

获取源码:

cpp 复制代码
cd ~/catkin_ws/src/
git clone https://github.com/6-robot/wpb_cv.git
git clone https://github.com/orbbec/ros_astra_camera.git
# git clone https://github.com/orbbec/ros_astra_launch.git # 要权限!!??
git clone https://github.com/tfoote/ros_astra_launch.git
git clone https://github.com/ros-drivers/rgbd_launch.git

修改settings.yam:

cpp 复制代码
cd /root/catkin_ws/src/wpb_cv/wpb_cv_bringup/config

再次构建:

cpp 复制代码
apt install python3-rosdep2 --fix-missing
sudo apt install ros-noetic-rostest
sudo apt-get install ros-noetic-tf

sudo apt-get install ros-noetic-joy -y
sudo apt-get install ros-noetic-hector-mapping -y
sudo apt-get install ros-noetic-gmapping -y
sudo apt-get install ros-noetic-navigation -y
sudo apt-get install ros-noetic-sound-play -y
sudo apt-get install ros-noetic-astra-camera -y
sudo apt-get install ros-noetic-astra-launch -y
sudo apt-get install ros-noetic-depthimage-to-laserscan -y
sudo apt-get install ros-noetic-libuvc -y

cd /root/catkin_ws
catkin_make

启动节点:

cpp 复制代码
roslaunch wpb_cv_bringup minimal.launch
相关推荐
txz203517 小时前
2,使用功能包组织C++节点
开发语言·c++·ros
dragen_light4 天前
2.ROS2-Packages
ros
dragen_light4 天前
1.ROS2-Install
c++·python·ros
dragen_light4 天前
3.ROS2-Nodes
ros
dragen_light4 天前
4.ROS2-Language Libraries
ros
kobesdu7 天前
开源3D激光SLAM算法的异同点、优劣势与适配场景总结
算法·3d·机器人·ros
佳木逢钺7 天前
Kalibr 完全指南:从原理推导到ROS实战,掌握相机-IMU高精度标定
人工智能·计算机视觉·ros·无人机
kobesdu10 天前
【ROS2实战笔记-6】RobotPerf:机器人计算系统的基准测试方法论
笔记·机器人·ros
MIXLLRED11 天前
随笔——ROS Ubuntu版本变化详解
linux·ubuntu·机器人·ros
sanzk11 天前
astra pro稠密建图
ubuntu·ros·3d相机