コンテンツにスキップ

1 ノートPCのセットアップ

概要

Raspberry Pi Catでナビゲーションを行うための ノートPCの環境構築手順について説明します。

前提

Linux(Ubuntu)のネイティブの環境が必要です。 (Windows上で動くUbuntuはWSL環境です。余程の物好きでない限りWSL環境でセットアップするのは止めましょう。) そのため、基本的にはデュアルブートを行うことになります。
こちらには、デュアルブートの手順の概略のみ掲載しますが、セットアップを進める際にはご自身で調べてください。

  • BitLockerの解除
  • Secure Bootの解除
  • SSDの容量の確保
  • インストールメディアの作成

必要な物

Software Version
Linux Ubuntu 22.04
Hardware
ノートPC

環境構築手順

0. GitのインストールとGitHubの鍵登録

  • Gitのインストール

    sudo apt update
    sudo apt install -y git
    git --version
    # git version 2.x.x のように出力さればインストール成功
    

  • 初期設定

    git config --global user.name "<Your Name>" # <Your Name>はあなたの名前に置き換えて実行
    git config --global user.email "<youremail@example.com>" # 同様
    git config --list # 設定を確認するコマンド
    

  • GitHubでの鍵の登録

1. ROS 2のインストール

  • ROS 2のインストールをする場合

    bash <(curl -s https://raw.githubusercontent.com/uhobeike/ros2_humble_install_script/main/install_desktop.sh)
    source $HOME/.bashrc
    

  • ROS 2の設定のみ済んでいない場合(ほとんどの人はできてないと思うので実行推奨)

    bash <(curl -s https://raw.githubusercontent.com/uhobeike/ros2_humble_install_script/main/ros2_setting.sh)
    

2. ワークスペースの構築

  • 必要なパッケージのインストール

    sudo apt install -y git python3-vcstool xterm
    

  • 学校で初めてsshでgit cloneする場合は以下を実行してください

    curl -s https://raw.githubusercontent.com/uhobeike/ssh_config_cit/master/config >> ~/.ssh/config
    

  • 関連するパッケージのインストール

    git clone git@github.com:CIT-Autonomous-Robot-Lab/raspicat2.git $HOME/raspicat2
    grep -q "source $HOME/raspicat2/install/setup.bash" ~/.bashrc || echo "source $HOME/raspicat2/install/setup.bash" >> ~/.bashrc
    grep -q "export RASPICAT2_WS=$HOME/raspicat2" ~/.bashrc || echo "export RASPICAT2_WS=$HOME/raspicat2" >> ~/.bashrc
    source $HOME/.bashrc
    cd $RASPICAT2_WS && mkdir src
    vcs import src < raspicat-pc.repos --debug
    rosdep update
    rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
    colcon build --symlink-install
    source $HOME/.bashrc
    

3. 時刻同期のための設定(PC側)

colcon_cd raspicat_setup_scripts
./time_synchronization/scripts/setup_remote_pc.sh

次のページへ進む