Install Gazebo9 from source with DART physics engine

기존에 설치된 것 제거

$ sudo apt-get remove '.gazebo.' '.sdformat.' '.ignition-math.' '.ignition-msgs.' '.ignition-transport.'

의존 패키지 설치

$ wget https://bitbucket.org/osrf/release-tools/raw/default/jenkins-scripts/lib/dependenciesarchive.sh -O /tmp/dependencies.sh 
$ ROSDISTRO=kinetic . /tmp/dependencies.sh
$ sudo apt-get install $(sed 's:\\ ::g' <<< $BASE_DEPENDENCIES) $(sed 's:\\ ::g' <<< $GAZEBO_BASE_DEPENDENCIES)

DART 설치

$ sudo apt-add-repository ppa:dartsim
$ sudo apt-get update
$ sudo apt-get install libdart6-dev
$ sudo apt-get install libdart6-utils-urdf-dev

옵션 패키지

$ sudo apt-get install xsltproc
$ sudo apt-get install ruby-ronn

의존 패키지#2 설치

$ sudo apt install graphviz-dev libignition-fuel-tools-dev libsdformat6-dev libignition-transport4-dev

빌드

$ cd /tmp/gazebo
$ hg pull && hg update gazebo9
$ mkdir build 
$ cd build 
$ cmake ..
$ make -j8
$ sudo make install

Gazebo 실행 테스트

$ gazebo -e dart --verbose

라이브러리 문제가 발생하면?

$ echo '/usr/local/lib' | sudo tee /etc/ld.so.conf.d/gazebo.conf
$ sudo ldconfig

ROS와 연동하기 위한 패키지 설치

$ sudo apt install ros-kinetic-ros-control ros-kinetic-ros-controllers
$ cd ~/catkinws/src 
$ git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git
$ catkin build

테스트

$ roslaunch gazebo_ros empty_world.launch physics:=dart

참고사이트

끝!.

Leave a Reply