본문 바로가기
  • 경제적 자유를 얻는 그날까지
엔지니어링/드론

Docker를 이용한 PX4 개발 환경 구축하기(px4-dev-ros-melodic)

by 베니스상인 2022. 8. 18.

PX4 개발환경을 갖추기 위해서는 Ubuntu, ROS, catkin tools, 컴파일러등 설치할 것들이 매우 많다. 필자는 이전에 Ubuntu 18.04에서 개발환경을 갖추고 사용하여 왔지만  Docker를  대부분의 과정들이 Docker의 이미지 형태로 만들어져 있기 때문에 소스코드만 컴파일하면 된다. 매우 사용하기 편리하며, 필요에 따라서 저장한 코드를 다시 Docker환경에서 작업할 수도 있다. 

 

따라서 오늘은 복잡한 PX4 개발환경을 Docker를 이용하여 쉽게 구축하는 방법을 다루고자 한다. 

 

 

 

 

1. Docker 설치는 아래 참고한다.

먼저, Ubuntu환경에서 Docker가 PC에 설치되어 있어야 한다. 설치하는 방법은 아래 링크를 참조하면 된다.

 

https://swiftcam.tistory.com/404

 

Docker의 개념, 설치 및 사용방법

1. Docker 의 개념 Image 환경을 구성하기 위한 Instruction이 들어가 있는 저장소 Container Image의 Instruction을 이용하여 만들어진 환경 하나의 Image를 이용하여 여러 종류의 Container를 만들어낼 수 있음..

swiftcam.tistory.com

 

 

 

2. PX4 이미지를 다운로드 한다.

사용자의 개발환경에 따라 여러가지 이미지를 만들어 놓았으니 필요한 이미지를 다운받아서 사용하면 된다. 필자는 Ubuntu 18.04의 ROS Melodic 버전에서 개발환경을 갖추기 위해 px4-dev-ros-melodic 버전을 다운로드한다.

 https://hub.docker.com/r/px4io/px4-dev-ros-melodic

 

Docker Hub

 

hub.docker.com

 

 

 

swift@Swift:~/Desktop$ docker pull px4io/px4-dev-ros-melodic

 

 

 

 

 

3.  도커 실행파일을 구성한다. 

  • 앞서 다운로드한 이미지를 불러서 실행
  • xhost를 사용하여 화면을 연결
  • catkin_ws/src 폴더를 공유
  • udp 포트를 공유
#!/bin/bash
#set -x

# sudo usermod -aG docker $USER
# newgrp docker

USER_UID=$(id -u)
TAG='px4-ros-melodic-dev'
#IMAGE='ubuntu:18.04'
IMAGE='px4io/px4-dev-ros-melodic:latest'
TTY='--device=/dev/ttyACM0'

#xhost +$(hostname -I | cut -d' ' -f1)

xhost +local:docker

echo "IMAGE=" $IMAGE
echo "TAG=" $TAG
echo "USER_UID=" $USER_UID
echo "USER=" $USER
echo "IPADDR=" $(hostname -I | cut -d' ' -f1)
echo "TTY=" $TTY


ENV_PARAMS=()
OTHER_PARAMS=()
args=("$@")
for ((a=0; a<"${#args[@]}"; ++a)); do
    case ${args[a]} in
        #-e) ENV_PARAMS+=("${args[a+1]}"); unset args[a+1]; ;;
        -e) ENV_PARAMS+=("${args[a]} ${args[a+1]}"); ((++a)); ;;
        --env=*) ENV_PARAMS+=("${args[a]}"); ;;
        *) OTHER_PARAMS+=("${args[a]}"); ;;
    esac
done


#    -- gpus all osrf/ros:melodic-desktop-full nvidia-smi \


docker run -it \
    --init \
    --ipc=host \
    --shm-size=8G \
    --privileged \
    --net=host \
    --rm \
    -e DISPLAY=$DISPLAY \
    -e XDG_RUNTIME_DIR=/run/user/$USER_UID \
    -e QT_GRAPHICSSYSTEM=native \
    -e CONTAINER_NAME=$TAG \
    -e USER=$USER \
    --env=UDEV=1 \
    --env=LIBUSB_DEBUG=1 \
    --env="DISPLAY" \
    --env="QT_X11_NO_MITSHM=1" \
    ${ENV_PARAMS[@]} \
    -v /run/user/$USER_UID:/run/user/$USER_UID \
    -v /dev:/dev \
    -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
    -v /home/$USER/workspace:/workspace \
    -v /home/$USER/catkin_ws:/root/catkin_ws \
    -p 14570:14570/udp \
    --name=$TAG \
    $IMAGE \
    ${OTHER_PARAMS[@]}  \
    /bin/bash  
export containerId=$(docker ps -l -q)

 

스크립트를 실행하여 컨테이너로 진입한다.

swift@Swift:~/workspace/docker$ ./run-px4-ros-meldoic.sh 
non-network local connections being added to access control list
IMAGE= px4io/px4-dev-ros-melodic:latest
TAG= px4-ros-melodic-dev
USER_UID= 1000
USER= swift
IPADDR= 122.43.177.200
TTY= --device=/dev/ttyACM0
WARNING: Published ports are discarded when using host network mode
root@Swift:/#

 

4.  도커에서 컴파일 수행

 

git으로 소스코드를 다운받거나 기존에 다운받은 소스가 있다면 다운로드 과정은 스킵하고 컴파일한다.

# 소스코드 다운로드 및 관련 dependancy 설치
cd $HOME/catkin_ws/src
#git clone https://github.com/PX4/PX4-Autopilot.git --recursive

cd PX4-Autopilot
make px4_sitl_default gazebo

 

 

root@Swift:~/catkin_ws/src/PX4-Autopilot# make px4_sitl_default gazebo
[0/11] git submodule Tools/sitl_gazebo
[6/11] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- cmake build type: RelWithDebInfo
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/lib/ccache/cc
-- Check for working C compiler: /usr/lib/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib/ccache/c++
-- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX17
-- Performing Test COMPILER_SUPPORTS_CXX17 - Success
-- Performing Test COMPILER_SUPPORTS_CXX14
-- Performing Test COMPILER_SUPPORTS_CXX14 - Success
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Using C++17 standard
-- ccache enabled via symlink (/usr/lib/ccache/c++ -> /usr/bin/ccache)
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'bullet>=2.82'
--   Found bullet, version 2.87
-- Found Simbody: /usr/include/simbody  
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   thread
--   system
--   filesystem
--   program_options
--   regex
--   iostreams
--   date_time
--   chrono
--   atomic
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0") 
-- Boost version: 1.65.1
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread (found suitable version "3.0.0", minimum required is "2.3.0") 
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.2.5
-- Found ZeroMQ: TRUE (Required is at least version "4") 
-- Checking for module 'uuid'
--   Found uuid, version 2.31.1
-- Found UUID: TRUE  
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 6.0.0
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE  
-- FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
-- Checking for module 'gts'
--   Found gts, version 0.7.6
-- Found GTS: TRUE  
-- Checking for module 'libswscale'
--   Found libswscale, version 4.8.100
-- Found SWSCALE: TRUE  
-- Checking for module 'libavdevice >= 56.4.100'
--   Found libavdevice , version 57.10.100
-- Found AVDEVICE: TRUE (Required is at least version "56.4.100") 
-- Checking for module 'libavformat'
--   Found libavformat, version 57.83.100
-- Found AVFORMAT: TRUE  
-- Checking for module 'libavcodec'
--   Found libavcodec, version 57.107.100
-- Found AVCODEC: TRUE  
-- Checking for module 'libavutil'
--   Found libavutil, version 55.78.100
-- Found AVUTIL: TRUE  
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.58.0") 
-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.7.4
-- Found JSONCPP: TRUE  
-- Checking for module 'yaml-0.1'
--   Found yaml-0.1, version 0.1.7
-- Found YAML: TRUE  
-- Checking for module 'libzip'
--   Found libzip, version 1.1.2
-- Found ZIP: TRUE  
-- Checking for one of the modules 'glib-2.0'
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "3") 
-- Found OpenCV: /usr (found version "3.2.0") 
-- Found TinyXML: /usr/lib/x86_64-linux-gnu/libtinyxml.so  
-- Checking for module 'gstreamer-1.0 >= 1.0'
--   Found gstreamer-1.0 , version 1.14.5
-- Checking for module 'gstreamer-base-1.0 >= 1.0'
--   Found gstreamer-base-1.0 , version 1.14.5
-- Checking for module 'gstreamer-app-1.0 >= 1.0'
--   Found gstreamer-app-1.0 , version 1.14.5
-- Found GStreamer: GSTREAMER_INCLUDE_DIRS;GSTREAMER_LIBRARIES;GSTREAMER_VERSION;GSTREAMER_BASE_INCLUDE_DIRS;GSTREAMER_BASE_LIBRARIES (Required is at least version "1.0") 
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- Found MAVLink: /root/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default/mavlink (found version "2.0") 
-- catkin DISABLED
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread;-lpthread (found version "3.0.0") 
-- Checking for module 'protobuf'
--   Found protobuf, version 3.0.0
-- Gazebo version: 9.19
-- Found GStreamer: adding gst_camera_plugin
-- Found GStreamer: adding gst_video_stream_widget
-- Configuring done
-- Generating done
-- Build files have been written to: /root/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default/build_gazebo
[7/11] Performing build step for 'sitl_gazebo'
[2/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/px4flow/px4flow.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/px4flow/px4flow.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/px4flow/px4flow.sdf
[3/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/sf10a/sf10a.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/sf10a/sf10a.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/sf10a/sf10a.sdf
[4/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/r200/r200.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/r200/r200.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/r200/r200.sdf
[7/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/plane/plane.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/plane/plane.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/plane/plane.sdf
[8/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/r1_rover/r1_rover.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/r1_rover/r1_rover.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/r1_rover/r1_rover.sdf
[13/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/tiltrotor/tiltrotor.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/tiltrotor/tiltrotor.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/tiltrotor/tiltrotor.sdf
[14/130] Generating /root/catkin_ws/src/PX4-Autopilo...ebo/models/standard_vtol_drop/standard_vtol_drop.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol_drop/standard_vtol_drop.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol_drop/standard_vtol_drop.sdf
[15/130] Generating /root/catkin_ws/src/PX4-Autopilo...ols/sitl_gazebo/models/typhoon_h480/typhoon_h480.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/typhoon_h480/typhoon_h480.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/typhoon_h480/typhoon_h480.sdf
[20/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/tailsitter/tailsitter.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/tailsitter/tailsitter.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/tailsitter/tailsitter.sdf
[21/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/rover/rover.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/rover/rover.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/rover/rover.sdf
[22/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/boat/boat.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/boat/boat.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/boat/boat.sdf
[23/130] Generating /root/catkin_ws/src/PX4-Autopilo...Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf
[24/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/c920/c920.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/c920/c920.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/c920/c920.sdf
[25/130] Generating /root/catkin_ws/src/PX4-Autopilo...s/sitl_gazebo/models/standard_vtol/standard_vtol.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol/standard_vtol.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/standard_vtol/standard_vtol.sdf
[26/130] Generating /root/catkin_ws/src/PX4-Autopilo...ols/sitl_gazebo/models/depth_camera/depth_camera.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/depth_camera/depth_camera.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/depth_camera/depth_camera.sdf
[27/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/cloudship/cloudship.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/cloudship/cloudship.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/cloudship/cloudship.sdf
[28/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf
[32/130] Generating /root/catkin_ws/src/PX4-Autopilo...Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf
[33/130] Generating /root/catkin_ws/src/PX4-Autopilo...s/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf
[34/130] Generating /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf
/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf.jinja -> /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf
[130/130] Linking CXX shared library libgazebo_user_camera_plugin.so
[10/11] cd /root/catkin_ws/src/PX4-Autopilot/build/p...t/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default
SITL ARGS
sitl_bin: /root/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default/bin/px4
debugger: none
program: gazebo
model: none
world: none
src_path: /root/catkin_ws/src/PX4-Autopilot
build_path: /root/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default
empty model, setting iris as default
GAZEBO_PLUGIN_PATH :/root/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default/build_gazebo
GAZEBO_MODEL_PATH :/root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models
LD_LIBRARY_PATH /opt/ros/melodic/lib:/root/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default/build_gazebo
empty world, setting empty.world as default
Using: /root/catkin_ws/src/PX4-Autopilot/Tools/sitl_gazebo/models/iris/iris.sdf
SITL COMMAND: "/root/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default/bin/px4" "/root/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default"/etc -s etc/init.d-posix/rcS -t "/root/catkin_ws/src/PX4-Autopilot"/test_data
Creating symlink /root/catkin_ws/src/PX4-Autopilot/build/px4_sitl_default/etc -> /root/catkin_ws/src/PX4-Autopilot/buil

_____  __   __    ___ 
| ___ \ \ \ / /   /   |
| |_/ /  \ V /   / /| |
|  __/   /   \  / /_| |
| |     / /^\ \ \___  |
\_|     \/   \/     |_/

px4 starting.

INFO  [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
INFO  [init] found model autostart file as SYS_AUTOSTART=10016
INFO  [param] selected parameter default file eeprom/parameters_10016
[param] parameter file not found, creating eeprom/parameters_10016
  SYS_AUTOCONFIG: curr: 0 -> new: 1
  SYS_AUTOSTART: curr: 0 -> new: 10016
  CAL_ACC0_ID: curr: 0 -> new: 1310988
  CAL_GYRO0_ID: curr: 0 -> new: 1310988
  CAL_ACC1_ID: curr: 0 -> new: 1310996
  CAL_GYRO1_ID: curr: 0 -> new: 1310996
  CAL_ACC2_ID: curr: 0 -> new: 1311004
  CAL_GYRO2_ID: curr: 0 -> new: 1311004
  CAL_MAG0_ID: curr: 0 -> new: 197388
  CAL_MAG1_ID: curr: 0 -> new: 197644
* SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
* SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
Gazebo multi-robot simulator, version 9.19.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

* IMU_INTEG_RATE: curr: 200 -> new: 250
[Msg] Waiting for master.
INFO  [dataman] data manager file './dataman' size is 7866640 bytes
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 122.43.177.200
[Wrn] [GuiIface.cc:298] Couldn't locate specified .ini. Creating file at "/root/.gazebo/gui.ini"
PX4 SIM HOST: localhost
INFO  [simulator] Waiting for simulator to accept connection on TCP port 4560
INFO  [simulator] Simulator connected on TCP port 4560.
INFO  [commander] LED: open /dev/led0 failed (22)
* PWM_AUX_OUT: curr: 0 -> new: 1234
* PWM_MAIN_OUT: curr: 0 -> new: 1234
INFO  [init] Mixer: etc/mixers/quad_x.main.mix on /dev/pwm_output0
INFO  [init] setting PWM_AUX_OUT none
INFO  [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
INFO  [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO  [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
INFO  [mavlink] mode: Gimbal, data rate: 400000 B/s on udp port 13030 remote port 13280
INFO  [logger] logger started (mode=all)
INFO  [logger] Start file log (type: full)
INFO  [logger] [logger] ./log/2022-08-17/15_51_11.ulg	
INFO  [logger] Opened full log file: ./log/2022-08-17/15_51_11.ulg
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [px4] Startup script returned successfully
pxh> [Wrn] [GuiIface.cc:120] QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
INFO  [tone_alarm] home set
INFO  [tone_alarm] notify negative

 

 

 

컴파일이 정상적으로 완료되면 도커환경에서 Gazebo가 실행된다.

 

 

정말 신세계이다. Docker는 쉽게 개발환경을 구축할 수 있게 해준다. 

 

 

 

 

 

728x90

댓글