Skip to content

Commit

Permalink
add setup.bash
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuyaOguma18 committed Feb 16, 2025
1 parent 45bb9cd commit 38ef6cc
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ ROS 2インストール手順は[こちら](https://docs.ros.org/en/jazzy/Instal

```bash
git clone https://github.com/KazuyaOguma18/mofpy_ros2.git
cd mofpy_ros2
sudo apt install just python3-rosdep
just deps
bash ./setup.bash
just build
```

Expand Down Expand Up @@ -58,7 +56,7 @@ moveit_setup_assistantで生成されたMoveItの設定ファイルをMoveItPy
## Supported Joypads

- [x] DualShock (PS4)
- [] DualSense (PS5) comming soon ...
- [ ] DualSense (PS5) comming soon ...

## Supported Actions

Expand Down
31 changes: 31 additions & 0 deletions setup.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

set -ex

# ROS環境をセットアップ
# 既にインストールされていたら実行しない
if command -v ros2 >/dev/null 2>&1; then
echo "ROS2 command found. Skipping ROS installation"
else
echo "ROS2 not found. Install ROS ..."
sudo apt update
sudo apt upgrade -y
sudo apt install software-properties-common curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list >/dev/null
sudo apt update
sudo apt install ros-jazzy-desktop
echo "source /opt/ros/jazzy/setup.bash" >>~/.bashrc
fi

# aptでインストール可能なパッケージをインストール
sudo apt install python3-colcon-mixin mold ccache cpplint clang-format cmake-format doxygen python3-rosdep yamllint npm just pipx
colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
colcon mixin update default

# pipxでインストール可能なパッケージをインストール
pipx install rosdoc2 pre-commit
pipx inject rosdoc2 sphinxcontrib-mermaid

# 依存関係の解消
just deps

0 comments on commit 38ef6cc

Please sign in to comment.