Raspberry Pi OSにROS Noeticをインストールする
NoeticはPython3しかサポートしてない
code:console
$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
$ sudp apt update
$ sudo apt install -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake
$ sudo rosdep init
$ rosdep update
$ mkdir ~/ros_catkin_ws
$ cd ~/ros_catkin_ws
$ rosinstall_generator desktop --rosdistro noetic --deps --wet-only --tar > noetic-desktop-wet.rosinstall
$ wstool init src noetic-desktop-wet.rosinstall
$ rosdep install --from-paths ./src --ignore-packages-from-source --rosdistro noetic -y
インストールする
code:console
$ sudo src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/noetic -j1 -DPYTHON_EXECUTABLE=/usr/bin/python3
...
<== Finished processing package 184 of 184: 'xacro' --install-layoutがないと言わたら-DSETUPTOOLS_DEB_LAYOUT=OFFを追加する
インストールできたか確認
code:console
$ source /opt/ros/noetic/setup.bash
$ roscd # カレントディレクトリが /opt/ros/noetic になる
$ roscore
... logging to /home/saito/.ros/log/617056cc-63e7-11eb-9353-dca632b47097/roslaunch-smartpi-20930.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
ros_comm version 1.15.9
SUMMARY
========
PARAMETERS
* /rosdistro: noetic
* /rosversion: 1.15.9
NODES
auto-starting new master
setting /run_id to 617056cc-63e7-11eb-9353-dca632b47097