//ROS2설치 (나의 ROS2환경설치 부분을 들어가도 됨)
$ wget <https://raw.githubusercontent.com/knowledge-intelligence/KIMe-Tutorials/master/install_ros2_humble.sh> && chmod 755 ./install_ros2_humble.sh && ./install_ros2_humble.sh
> 한번에 설치하는 구문임(갓강사님)
//Doker설치
$ wget <https://raw.githubusercontent.com/knowledge-intelligence/KIMe-Tutorials/master/install_docker.sh> && chmod 755 ./install_docker.sh && ./install_docker.sh
> 한번에 설치하는 구문임(갓강사님)
//issac Sim 설치
> <https://developer.nvidia.com/omniverse#section-getting-started>
여기에 들어가서 omniverse-launcher-linux.AppImage 라는 이미지파일을 다운
(만약 이름이 다르다면 아래 구문을 알잘딱으로 고칠것)
$ chmod +x omniverse-launcher-linux.AppImage
$ ./omniverse-launcher-linux.AppImage
(만약 fuse or fuze를 sudo install 해주면 됩니다)
> 이후에 로그인하면 준비 완료
설치이후, Lancher를 실행하고 [Exchange] → [ISAAC SIM]을 검색하여 다운


(만약 NVIDIA의 그래픽카드가 자신의 컴퓨터에 없다면 이용이 불가하니 이점 참고하자)
(만약 NVIDIA의 그래픽카드가 있지만, 드라이버가 없어 그래픽 연동이 안된다면 알아서 고쳐)
설치가 완료 실행하면 아래와 같이 세팅한다

ROS Bridge Extension과 Use internal ROS2 버전을 알맞게 설정하여 시작한다.
(Headless는 GUI없이 돌리는 경우를 의미)
이후부터는 나는 GPU가 없어서 ㄲㅡㅌ…..(SIBAL)

https://github.com/knowledge-intelligence/KIMe-Tutorials/blob/main/ROS2_Nav2/ReadMe_Nav2_Sim_Step1.md
Note* 전체 코드 다운 받는 부분
//워크스페이스 제작구문
$ mkdir -p ~/turtlebot3_ws/src/
$ cd ~/turtlebot3_ws/src/
$ git clone -b humble-devel <https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git>
$ git clone -b humble-devel <https://github.com/ROBOTIS-GIT/turtlebot3.git>
$ git clone -b humble-devel <https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git>
//빌드구문
$ cd ~/turtlebot3_ws && colcon build --symlink-install
------------------------------------
Note* Gazebo 설치하기
$ sudo apt update && sudo apt install -y wget lsb-release gnupg
$ sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] <https://packages.osrfoundation.org/gazebo/ubuntu-stable> $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list'
$ wget <https://packages.osrfoundation.org/gazebo.key> -O - | sudo apt-key add -
$ sudo apt install -y gz-fortress
$ sudo apt install -y ros-humble-gazebo-ros-pkgs
------------------------------------
//단독실행하는 경우
$ gazebo
//ros2와 연동하여 이동할 경우
$ ros2 launch gazebo_ros gazebo.launch.py
Note* 확인용 터틀봇 설치
$ sudo apt install -y ros-humble-turtlebot3-gazebo
------------------------------------
//터틀봇만 구현
$ export TURTLEBOT3_MODEL=burger
$ ros2 launch turtlebot3_gazebo empty_world.launch.py
//터틀봇&옥타곤 구조 구현
$ export TURTLEBOT3_MODEL=waffle
$ ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
-----------------------------------
Note* 입력용 키보드 노드 실행
$ source ~/turtlebot3_ws/install/setup.bash
$ export TURTLEBOT3_MODEL=waffle_pi
$ ros2 run turtlebot3_teleop teleop_keyboard
-----------------------------------
Note* SLAM 설치하기
$ sudo apt install ros-humble-cartographer ros-humble-cartographer-ros ros-humble-cartographer-ros-msgs
Note* SLAM map 패키지(맵 저장) 설치하기
$ sudo apt install ros-humble-nav2-map-server
//Rviz상에서 SLAM을 실행하는 노드
$ ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=True
//Rviz상에서 움직인 영역을 저장하는 노드
$ ros2 run nav2_map_server map_saver_cli -f ~/map
Note* 자동네비게이션관련 패키지 설치하기
$ sudo apt install ros-humble-rmw-cyclonedds-cpp
$ sudo apt install ros-humble-nav2-bringup
//저장한 map을 Rviz에서 불러와서 주행하는 노드 (map.yaml파일은 글로벌 기준 정의로 된 구조)
$ ros2 launch turtlebot3_navigation2 navigation2.launch.py use_sim_time:=True map:=$HOME/map.yaml
NavigationSystem

