1. Terminator설치하기
ROS2설치에 앞서, WSL설치 이후 가장먼저 진행하기를 추천하는 'terminator'설치이다.
그 이유는 실제 ubuntu의 경우 Ctrl+Alt+T 를 이용해 터미널 창을 열 수 있다. 물론 실제 ubuntu에서도 편의를 위해 많은 사람들이 terminator를 사용하곤 한다. 하지만, 미세한 속도차이를 느낀 이후 부터는 어느 시점부턴 가 중요한 프로세스는 기본 터미널을 더 선호하게 되었다.
각설하고, 이걸 그럼에도 왜 추천하느냐 하면, window에서는 이 터미널창을 여는 단축키가 없기 때문에(혹시 있을 수도 있음) terminator 없이 작업하기 매우 불편했다. 따라서 설치하고, terminator를 이용해 Ctrl+Shift+E/O/T 등의 단축키를 활용할 수 있도록 하자.
설치방법.
$ sudo apt update #WSL 첫 설치 이후에는반드시 해줘야 함
$ sudo apt install terminator
sudo apt update #WSL 첫 설치 이후에는반드시 해줘야 함
sudo apt install terminator
사용방법.
window 명령 프롬프트로 ubuntu22.04를 실행 후
terminator
(terminator를 실행한 프롬프트를 닫으면 다꺼지니 주의 바람)
이후 열린 terminator창에서 작업 추천.
2. ROS2 install
이후 설치는 실제 ubuntu환경과 동일하게 아래 링크를 따라 설치하면 된다.
Just Like That!!!
https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#install-ros-2-packages
위 사이트 들어가서 따라하기 어렵다! 귀찮다! 하시는 분들은 아래 내용 전체 복사&붙여넣기.
locale # check for UTF-8
sudo apt update && sudo apt install locales -y
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install software-properties-common -y
sudo add-apt-repository universe
sudo apt update && sudo apt install 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 $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update
sudo apt upgrade -y
sudo apt install ros-humble-desktop -y
sudo apt install -y python3-colcon-common-extensions python3-rosdep2 python3-vcstool
# bashrc에 ros2 경로 추가 = terminal에서 ROS를 인식하게 됌
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
Try some examples의 'talker', 'listener'가 잘 작동한다면 성공!!
분량조절 실패...
다음 장에 바로 'doosan-robot2'라는 doosan robotics의 ROS2패키지를 테스트 해볼지. 'gazebo'실습을 해볼지 고민중이다.
(필자는 둘 다 해보는 중인데 진행이 잘 된다면 doosan-robot2를 먼저 하고싶지만, 막혀있는 부분이 있어 해결중...)
'ROS2 > doosan-robot2' 카테고리의 다른 글
5. doosan-robot2 - 2, 예제 확인 및 (docker)trouble shooting (0) | 2025.03.05 |
---|---|
4. doosan-robot2 (ROS2 pkg) -1, build (with, Docker install) (0) | 2025.02.27 |
2. Window11에 Ubuntu22.04사용하기 (0) | 2025.01.26 |
1. ROS2 시작하기(In Window) (0) | 2025.01.25 |