일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- nav2 설치
- ros2 foxy docker
- humble development guides
- first-time robot setup guide
- ros2 환경설정
- 코드업
- CODEUP 6073
- ros2 development guides
- nav2 tutorial
- nav2 튜토리얼
- ros2 튜토리얼
- humble 환경설정
- Nav2 document
- ros2 튜토리얼 환경설정
- nav2 development guides
- nav2 development guides
- error
- ros2 configuring environment
- Python
- nav2 getting started
- docker foxy
- foxy nav2
- Foxy tutorial
- ROS FOXY 튜토리얼
- development guides
- ros2 remapping
- nav2 first-time robot setup guide
- nav2 dev contatiner
- CodeUp
- ros2 foxy tutorial
- Today
- Total
BAN2ARU
[Foxy/Nav2] 튜토리얼 2.Development Guides - 1) Build and Install 본문
Nav2 튜토리얼은 공식 홈페이지를 참조하여 작성함
이전 글 참조
2024.01.27 - [분류 전체보기] - [Foxy/Nav2] 튜토리얼 1. Getting Started
1. Install
Nav2 및 dependency는 binary로 릴리즈된다. 다음과 같이 설치할 수 있다.
source /opt/ros/foxy/setup.bash
sudo apt install \\
ros-$ROS_DISTRO-navigation2 \\
ros-$ROS_DISTRO-nav2-bringup \\
ros-$ROS_DISTRO-turtlebot3*
2. build
Nav2를 빌드할 수 있는 아래와 같은 3가지 방법이 있다.
- Released Distribution Binaries
- Rolling Development Source
- Docker Container Images
첫번째 방법은 안정 버전을 사용하여 빠르게 설치하고 실행하는데 유용하다. 두번째 및 세번째 옵션은 개발자 또는 최신 변경 사항을 테스트하려는 사용자에게 유용하다.
2.1. Released Distribution Binaries
배포된 NAV2를 빌드하려면 우선 ROS2 및 관련 개발 도구를 빌드하거나 설치해야 한다. (colcon, rosdep, vcstool)
환경이 설정 되면 repository를 clone한 후 dependency를 설치한다. 이를 workspace에서 빌드하면 된다.
source /opt/ros/foxy/setup.bash
mkdir -p ~/nav2_ws/src && cd ~/nav2_ws
git clone <https://github.com/ros-planning/navigation2.git> --branch foxy-devel ./src/navigation2
rosdep install -y \\
--from-paths ./src \\
--ignore-src
colcon build \\
--symlink-install
이 후 ~/nav2_ws/install/setup.bash를 sourcing하면 된다.
만약 아래와 같은 ERROR가 발생한다면 Please run 부분을 실행 한 후 다시 진행하면 된다.
sudo rosdep init
rosdep update
2.2. Rolling Development Source
해당 방법은 Relased Distribution Binaries 방법과 유사하며, 여기서는 모든 ROS 기반 패키지에 대한 메인 개발 브랜치를 사용하여 종속성을 소스에서 빌드한다.
source /install/setup.bash
mkdir -p ~/nav2_ws/src && cd ~/nav2_ws
git clone <https://github.com/ros-planning/navigation2.git> --branch foxy-devel ./src/navigation2
vcs import ./src < ./src/navigation2/tools/underlay.repos
rosdep install -y \\
--from-paths ./src \\
--ignore-src
colcon build \\
--symlink-install
이 후 ~/nav2_ws/install/setup.bash를 sourcing하면 된다.
2.3. Docker Container Images
Docker 컨테이너 이미지를 사용하여 Nav2를 빌드할 수 있다. repository에서의 Dockerfile을 사용하여 Nav2를 빌드하고 설치하는 방법이다.
export ROS_DISTRO=foxy
git clone <https://github.com/ros-planning/navigation2.git> --branch main
docker build --tag navigation2:$ROS_DISTRO \\
--build-arg FROM_IMAGE=ros:$ROS_DISTRO \\
--build-arg OVERLAY_MIXINS="release ccache lld" \\
--cache-from ghcr.io/ros-planning/navigation2:main \\
./navigation2
위의 docker build 명령은 지정된 경로를 사용하여 Dockerfile에서 이미지를 빌드하면, 변수를 추가 인수로 사용하여 workspace 빌드를 구성한다. 해당 명령은 Nav2의 container registry에서 최신 cached image를 가져와 빌드 프로세스를 가속화하기 위해 external cache source를 지정한다.
'Study > Nav2' 카테고리의 다른 글
[Foxy/Nav2] 튜토리얼 3. Navigation Concepts - 1) ROS2 (0) | 2024.01.27 |
---|---|
[Foxy/Nav2] 튜토리얼 2.Development Guides - 2) Dev Containers (0) | 2024.01.27 |
[Foxy/Nav2] 튜토리얼 1. Getting Started (0) | 2024.01.27 |
[Foxy/Docker] ubuntu에서 ROS2 foxy docker 환경 구축[docker : nav2] (2) | 2024.01.27 |
[Foxy/Orin] jetson board에서 ROS2 foxy docker 환경 구축[docker : nav2] (0) | 2024.01.27 |