【Linux】ROS安装记录

ROS 库需求

尝试实现NDT算法,参考git项目Heych88/ROS_NDT3D

安装

参考官方教程
Ubuntu install of ROS Melodic

Step1.4 Installation failed

安装ros-melodic-desktop-full时出错。

The following packages have unmet dependencies: \n ros-melodic-desktop-full : Depends: ros-melodic-perception but it is not going to be installed \n E: Unable to correct problems, you have held broken packages.

在这里插入图片描述

尝试换源

参考安装ROS Melodic 时出现“The following packages have unmet dependencies: ros-melodic-desktop-full :…“
无效。

尝试aptitude

参考
ROS社区
ROS安装错误记录

sudo apt install aptitude

sudo aptitude install ros-melodic-desktop-full

Installation using aptitude worked.
先装了PCL,出现依赖版本冲突

 Remove the following packages:                                                   
1)     libcurl4-gnutls-dev [7.58.0-2ubuntu3.24 (bionic-security, bionic-updates, now)]
2)     libvtk7-dev [7.1.1+dfsg1-2 (bionic, now)]                                      
3)     libvtk7-java [7.1.1+dfsg1-2 (bionic, now)]                                     
4)     libvtk7-jni [7.1.1+dfsg1-2 (bionic, now)]                                      
5)     libvtk7-qt-dev [7.1.1+dfsg1-2 (bionic, now)] 

选择重装了,未测试PCL是否仍可用。
ROS 安装 vtk6, 测试PCL 可用。

继续安装

sudo apt-get install ros-melodic-rqt*

环境配置

配置shell

参考
Ubuntu install of ROS Melodic
Installing and Configuring Your ROS Environment

Step1.5 Environment setup

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc 

Step1.6 Dependencies for building packages

Initialize rosdep
Before you can use many ROS tools, you will need to initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS. If you have not yet installed rosdep, do so as follows.

sudo apt install python-rosdep
With the following, you can initialize rosdep.
sudo rosdep init
rosdep update

Create a ROS Workspace

catkin 编译安装

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/
$ catkin_make

在这里插入图片描述
按照上图提示执行指令后,将catkin添加到bash配置中,

echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc 

测试

3个终端,小海龟

roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key

在这里插入图片描述
安装成功。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值