본문 바로가기
ROS Project🦾

ROS2 개발 툴 설치 & Bashrc 편집 [1]

by 우직한 사람 2023. 8. 15.
반응형

ROS2 개발 툴 설치

//docker 컨테이너 생성하기
docker run -it --privileged -d --name <원하는_이름> -e DISPLAY=:0 -v /tmp/.X11-unix:/tmp/.X11-unix arm64v8/ros:noetic



 apt update && sudo apt install -y \
  build-essential \
  cmake \
  git \
  python3-colcon-common-extensions \
  python3-pip \
  python-rosdep \
  python3-vcstool \
  wget
  
  python3 -m pip install -U \
  argcomplete \
  flake8 \
  flake8-blind-except \
  flake8-builtins \
  flake8-class-newline \
  flake8-comprehensions \
  flake8-deprecated \
  flake8-docstrings \
  flake8-import-order \
  flake8-quotes \
  pytest-repeat \
  pytest-rerunfailures \
  pytest \
  pytest-cov \
  pytest-runner \
  setuptools
  
  
  # install Fast-RTPS dependencies
 apt install --no-install-recommends -y \
  libasio-dev \
  libtinyxml2-dev
# install Cyclone DDS dependencies
 apt install --no-install-recommends -y \
  libcunit1-dev

 

 

bashrc 편집

source /opt/ros/humble/setup.bash
echo 'ros2 humble is activated!'

source ~/robot_ws/install/local_setup.bash
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash 
source /usr/share/vcstool-completion/vcs.bash
source /usr/share/vcstool-completion/vcs.bash 
source /usr/share/colcon_cd/function/colcon_cd.sh 
export _colcon_cd_root=~/robot_ws





alias sb='source ~/.bashrc'
alias eb='nano ~/.bashrc'
alias cs='cd ~/robot_ws/src'
alias rt='ros2 topic list'
alias re='ro2 topic echo'
alias killgazebo='killall -9 gazebo & killall -9 gzserver & killall -9 gzclient'
alias cw='cd ~/robot_ws'
alias testpub='ros2 run demo_nodes_cpp talker'
alias testsub='ros2 run demo_nodes_cpp listener'
alias testpubimg='ros2 run image_tools cam2image'
alias testsubimg='ros2 run image_tools showimage'
반응형