树莓派安装 ros

参考链接

Install Dependecies and Download the Packages

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 apt-get update
sudo apt-get install -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential  cmake
sudo rosdep init
rosdep update

rosdep init 会报错。原因是网址被墙了 解决的办法是

sudo vi /etc/hosts 
151.101.84.133 raw.githubusercontent.com //最后一行添加
sudo rosdep init
rosdep update

When that’s done let’s create a dedicated catkin workspace for building ROS and move to that directory.

mkdir ~/ros_catkin_ws
cd ~/ros_catkin_ws
rosinstall_generator desktop --rosdistro melodic --deps --wet-only --tar > melodic-desktop-wet.rosinstall

wstool init -j8 src melodic-desktop-wet.rosinstall

If wstool init fails or is interrupted, you can resume the download by running:

wstool update -j4 -t src

Fix the Issues

mkdir -p ~/ros_catkin_ws/external_src
cd ~/ros_catkin_ws/external_src
wget    http://sourceforge.net/projects/assimp/files/assimp-3.1/assimp-3.1.1_no_test_models.zip/download -O assimp-3.1.1_no_test_models.zip
unzip assimp-3.1.1_no_test_models.zip
cd assimp-3.1.1
cmake .
make
sudo make install
cd ..
rosdep install --from-paths src --ignore-src --rosdistro melodic -y

Let’s also install OGRE for rviz

sudo apt-get install  libogre-1.9-dev

Build and Source the Installation

sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/melodic -j2

echo "source /opt/ros/melodic/setup.zsh" >> ~/.zshrc

Install RPLIDAR ROS Package

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容