Turtlebot3/Raspberry4版の製作(2号機)「ros_catkin_ws」->「catkin_ws」で再スタート

2号機はRasbian・Buster/ROS・melodic/raspberryPi4という環境の違いで作業エリアを1号機での「catkin_ws」から「ros_catkin_ws」という名前を使って
いたが弊害が出てきたので(CMakeList.txt エラー)一度基本通り「catkin_ws」に戻して取組直したいと思います。
このことによる弊害が出るかも知れないが勉強の為です。理解できた時にはなんて無駄な事をしていたのかと反省する事となるでしょう。

Turtlebot3 e-Manual 「6.2.1.3:SBCセットアップ」
 http://emanual.robotis.com/docs/en/platform/turtlebot3/raspberry_pi_3_setup/#raspberry-pi-3-setup
Rasbian/buster なのでROSは melodic をインストール(インストール済み)
ROSの依存関係パッケージのインストールから始めます。

 $ cd ~/catkin_ws/src
 $ git clone https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git
 $ git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
 $ git clone https://github.com/ROBOTIS-GIT/turtlebot3.git

問題なく終了しました。
不要パッケージの削除

 $ cd ~/catkin_ws/src/turtlebot3
 $ sudo rm -r turtlebot3_description/ turtlebot3_teleop/ turtlebot3_navigation/ turtlebot3_slam/ turtlebot3_example/

問題なく終了。
依存パッケージのインストール

 $ sudo apt-get install ros-kinetic-rosserial-python ros-kinetic-tf  この kinetic 部分を
 $ sudo apt-get install ros-melodic-rosserial-python ros-melodic-tf melodic に変更

エラー発生:ros-melodic-rosserial-python と ros-melodic-tf が見つからない。

前回これで失敗していました。以前の記事を読み返して再トライします。

<再トライ>
 https://qiita.com/yura/items/cf63ec23a1438d645707
上記のURL:Raspberry Pi 4 で Turtlebot3 を動かす (Raspbian Buster + ROS Melodic)が成功しているので、この記事を参考に進めます。
ただし作業エリアは、「catkin_ws/src」に読み替えて実行。
このディレクトリはビルド用のワークスペースで、ビルドされたパッケージ群は最終的に/opt/ros/melodic 以下にインストールされるので結果
はすでに出来上がっています。

 PC:ssh pi@192.168.1.110
    PW:ja3dxa8823
 R2:$sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
 R2:$sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
 R2:$sudo apt-get update

 R2:$sudo apt install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake
すでに最新版です。OK

 R2:sudo rosdep init  Error:デフォルトのソースリストファイルは既に存在します。
 R2:rosdep update

ここまでOK

 R2:cd ~/catkin_ws
 R2:rosinstall_generator ros_comm navigation turtlebot3 turtlebot3_msgs --rosdistro melodic --deps --wet-only --tar >
    melodic-turtlebot3-wet.rosinstall
 R2:wstool init -j4 src melodic-turtlebot3-wet.rosinstall
 Error:ワークスペース構成ファイル「.rosinstall」が「src」にすでに存在します。

 R2:rosdep install -y --from-paths src --ignore-src --rosdistro melodic -r --os=debian:buster
 Error:次のパッケージ/スタックは、rosdep キーを解決できませんでした。


 R2:sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/melodic -j2
 Error:./src/catkin/bin/catkin_make_isolated:コマンドが見つからない。

1個上のエラーに関しては、まだ「catkin_ws/src/」内には「autorace」関連のソフトをインストールしていない事かも知れない。
また「ros_catkin_ws/src/」内のすべてのファイルを削除する必要があるのか?

e-Manial に戻る。ROSのインストール

 R2:$ sudo apt-get update
 R2:$ sudo apt-get upgrade
 R2:$ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros_melodic_rp3.sh && chmod 755
    ./install_ros_melodic_rp3.sh && bash ./install_ros_melodic_rp3.sh
   Error:raw.githubusercontent.com 接続後、404 Not Found( kinetic -> melodic )の為か?


再度 Raspbian・Buster インストール後のSDカードから始める。<次ページへジャンプ