실습 환경 구성


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

  1. 환경 구성 요소 설치

    sudo apt install ros-$ROS_DISTRO-navigation2 ros-$ROS_DISTRO-nav2-*
    
  2. 워크스페이스 내에 필요한 Neobotix의 리소스 가져오기

    mkdir ~/nav2_ws/src/neobotix
    cd ~/nav2_ws/src/neobotix
    git clone <https://github.com/neobotix/neo_msgs2.git>
    git clone --branch $ROS_DISTRO <https://github.com/neobotix/neo_local_planner2.git>
    git clone --branch $ROS_DISTRO <https://github.com/neobotix/neo_localization2.git>
    git clone --branch $ROS_DISTRO <https://github.com/neobotix/neo_nav2_bringup.git>
    git clone --branch $ROS_DISTRO <https://github.com/neobotix/neo_simulation2.git>
    
  3. 워크스페이스 내 패키지 빌드

    cd ~/nav2_ws/
    colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
    
    source ~/nav2_ws/install/local_setup.bash # 또는 새 터미널 열기
    
  4. ~/nav2_ws/src/neobotix/neo_simulation2/configs/mpo_700/navigation.yaml 파일의 잘못된 AMCL 설정 수정

  5. ~/nav2_ws/src/neobotix/neo_simulation2/launch/simulation.launch.py 파일에서 aws.world가 강제로 켜지도록 수정

  6. ~/nav2_ws/src/neobotix/neo_simulation2/launch/simulation.launch.py 파일에서 지도 메타 파일인 aws.yaml를 강제로 불러오도록 수정

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

  1. 새 터미널을 열고 시뮬레이션 환경이 잘 열리는지 확인

    export MY_ROBOT=mpo_700
    ros2 launch neo_simulation2 simulation.launch.py
    

    Untitled

  2. 아래 명령어를 통해 로봇 제어

    ros2 run teleop_twist_keyboard teleop_twist_keyboard
    

    holonomic.gif

  3. nav2를 사용하기 위해 아래 런치파일 실행

    ros2 launch neo_simulation2 navigation.launch.py
    
  4. Rviz2 실행을 위해 아래 런치파일 실행

    ros2 launch neo_nav2_bringup rviz_launch.py
    

    Untitled

  5. 2D Pose Estimate 버튼을 통해 초기위치 설정, Nav2 Goal 버튼으로 목적지 설정해 테스트 진행

    neo_nav2.gif