실습 환경 구성


로봇 시뮬레이션 환경 구성 및 설치

  1. 환경 구성을 위해 필요한 요소 설치

    sudo apt update && sudo apt install -y \\
      build-essential \\
      cmake \\
      git \\
      libbullet-dev \\
      python3-colcon-common-extensions \\
      python3-flake8 \\
      python3-pip \\
      python3-pytest-cov \\
      python3-rosdep \\
      python3-setuptools \\
      python3-vcstool \\
      openssh-server \\
      wget
    
  2. 워크스페이스를 구성하고 필요한 리소스들을 가져오기

    mkdir -p ~/nav2_ws/src
    cd ~/nav2_ws/
    wget <https://raw.githubusercontent.com/Adlink-ROS/neuronbot2_ros2.repos/humble/neuronbot2_ros2.repos>
    vcs import src < neuronbot2_ros2.repos
    
  3. 워크스페이스 안의 모든 의존성 패키지 설치

    cd ~/nav2_ws/
    rosdep update
    rosdep install --from-paths src --ignore-src -r -y --rosdistro humble
    
  4. 워크스페이스 내 패키지들을 빌드

    cd ~/nav2_ws/
    colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
    
    source ~/nav2_ws/install/local_setup.bash # 또는 새 터미널 열기
    

시뮬레이션 환경 열기 및 간단한 제어

ros2 launch neuronbot2_gazebo neuronbot2_world.launch.py
  1. 아래 명령어를 통해 로봇 제어 가능
ros2 run teleop_twist_keyboard teleop_twist_keyboard

image.png

SLAM Demo

  1. 아래 SLAM 기법들 중 하나를 선택하여 런치 파일을 실행

  2. teleop_twist_keyboard 노드를 통해 지도 완성

    ros2 run teleop_twist_keyboard teleop_twist_keyboard
    

image.png

  1. 작성한 지도를 저장