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
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
$ 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
安装成功。