Einführung
Als ich neulich an einem Diplom arbeitete, musste ich ein Ubuntu-Image für einen Single-Board-Player erstellen, auf dem ROS ( Robot Operating System - ein Roboter-Betriebssystem ) bereits installiert war . Kurz gesagt, das Diplom ist der Verwaltung einer Gruppe von Robotern gewidmet. Roboter sind mit zwei Rädern und drei Entfernungsmessern ausgestattet. Diese ganze Sache wird von ROS verwaltet, das sich auf dem ODROID-C2-Board dreht.

Marienkäfer-Roboter. Entschuldigung für die schlechte Qualität des Fotos
ROS , , ROS. , , .
.
- , (Distroshare Ubuntu Imager, linux live kit, linux respin, systemback .)
- , (yocto, linux from scratch)
- (liveCD customization , )
, live- ODROID . - . , .. .
chroot (chroot — change root, ) , . Ubuntu .
:
- ( SD- balenaEtcher) Ubuntu 18.04.
- , – Ubuntu 18.04.3 mate desktop .
- , – ODROID-C2.
Ubuntu ODROID
unxz –kv < >
,
mkdir mnt
,
file < >
ext2, ext3 ext4. ( ):

. parted.
sudo mount -o loop,offset=$((264192*512)) < > mnt/
264192 ( ), — 512 , , .
cd mnt/
sudo chroot ~/livecd/mnt/ bin/sh
~/livecd/mnt —
bin/sh — ( bin/bash)
.
ROS
ROS (ROS Melodic) .
sudo apt-get update
:
Err:6 http://deb.odroid.in/c2 bionic InRelease
The following signatures were invalid: EXPKEYSIG 5360FB9DAB19BAC9 Mauro Ribeiro (mdrjr) <mauro.ribeiro@hardkernel.com>
, . :
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AB19BAC9
ROS
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 update
ROS
, desktop ROS, :
sudo apt install ros-melodic-ros-base
apt search ros-melodic
1. :
dpkg: error: failed to write status database record about 'iputils-ping' to '/var/lib/dpkg/status': No space left on device
apt:
sudo apt-get clean; sudo apt-get autoclean
2. (source) :
source /opt/ros/melodic/setup.bash
, .. bash, .
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo apt install python-rosdep
sudo rosdep init
rosdep update
, , root , ROS .
roscore sudo :
Traceback (most recent call last): File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 230, in main write_pid_file(options.pid_fn, options.core, options.port) File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 106, in write_pid_file with open(pid_fn, "w") as f: IOError: [Errno 13] Permission denied: '/home/user/.ros/roscore-11311.pid'
, ROS. :
sudo rosdep fix-permissions
rviz rqt
sudo apt-get install ros-melodic-rqt ros-melodic-rviz
- chroot:
exit
cd ..
sudo umount mnt/
xz –ckv1 < >
Alle! Jetzt können Sie mit balenaEtcher das System-Image auf eine SD-Karte schreiben, es in ODROID-C2 einlegen und Ubuntu mit ROS installiert haben!
Verweise:
- Dieses Video hat mir sehr geholfen, wie man unter Linux kommt und warum es so sein sollte: