반응형

간만에 git update를 진행하였다. 마지막 업데이트를 한지 약 한달(?)정도 된거 같은데 그 사이에 많은 변화가 있는듯 하다.

$ git pull

remote: Counting objects: 7834, done.

remote: Compressing objects: 100% (358/358), done.

remote: Total 7834 (delta 4175), reused 4368 (delta 4142), pack-reused 3333

Receiving objects: 100% (7834/7834), 1.82 MiB | 20.00 KiB/s, done.

Resolving deltas: 100% (6104/6104), completed with 719 local objects.

From https://github.com/PX4/Firmware

   0b8e88f..680cebc  master                  -> origin/master

   40aa785..29b0043  beta                    -> origin/beta

 * [new branch]      block_cleanup           -> origin/block_cleanup

 * [new branch]      build_misc              -> origin/build_misc

   5c524e1..6c15666  coverity                -> origin/coverity

 + 9c6dbf8...5791463 feature_shell           -> origin/feature_shell  (forced update)

 * [new branch]      fix-image-start-capture -> origin/fix-image-start-capture

 * [new branch]      fmuv5_update_board_config -> origin/fmuv5_update_board_config

 * [new branch]      global_to_local         -> origin/global_to_local

 * [new branch]      iekf-new                -> origin/iekf-new

 * [new branch]      iekf-slim               -> origin/iekf-slim

 * [new branch]      landdetector_additional_state -> origin/landdetector_additional_state

 * [new branch]      master_backport_serial_DMA_buffer_size -> origin/master_backport_serial_DMA_buffer_size

 + ea1ade4...b31871a master_nxphlite         -> origin/master_nxphlite  (forced update)

 * [new branch]      master_pwm_experiment_on_v2 -> origin/master_pwm_experiment_on_v2

 * [new branch]      mavlink_geofence_rebased -> origin/mavlink_geofence_rebased

 * [new branch]      mission_add_lpos        -> origin/mission_add_lpos

 * [new branch]      module_base_class_and_docs -> origin/module_base_class_and_docs

 * [new branch]      ms5525                  -> origin/ms5525

 * [new branch]      nuttx-cmake             -> origin/nuttx-cmake

 * [new branch]      pr-auto_land_velocity_limit -> origin/pr-auto_land_velocity_limit

 + 360d65e...2edca3b pr-ekfEcl               -> origin/pr-ekfEcl  (forced update)

 * [new branch]      pr-mavlink-cleanup      -> origin/pr-mavlink-cleanup

 * [new branch]      pr-mavlink-output-rates -> origin/pr-mavlink-output-rates

 * [new branch]      pr-position_derivative  -> origin/pr-position_derivative

 * [new branch]      pr-px4_auto             -> origin/pr-px4_auto

 * [new branch]      pr-px4_stick_to_setpoint -> origin/pr-px4_stick_to_setpoint

 * [new branch]      pr-rpi-6619-continued   -> origin/pr-rpi-6619-continued

 * [new branch]      pr-takeoff_fix          -> origin/pr-takeoff_fix

 * [new branch]      pr-v4pro-hotfix         -> origin/pr-v4pro-hotfix

 + 00334ad...29b0043 stable                  -> origin/stable  (forced update)

 * [new tag]         v1.6.0                  -> v1.6.0

 * [new tag]         v1.6.0-rc2              -> v1.6.0-rc2

 * [new tag]         v1.6.0-rc3              -> v1.6.0-rc3

 * [new tag]         v1.6.0-rc4              -> v1.6.0-rc4

Updating 0b8e88f..680cebc

Fast-forward



그중에서 aerocore2와 관련된 업데이트가 많이 보인다.

 create mode 100644 nuttx-configs/aerocore2/Kconfig

 create mode 100755 nuttx-configs/aerocore2/include/board.h

 create mode 100644 nuttx-configs/aerocore2/include/nsh_romfsimg.h

 create mode 100644 nuttx-configs/aerocore2/nsh/Make.defs

 create mode 100644 nuttx-configs/aerocore2/nsh/defconfig

 create mode 100755 nuttx-configs/aerocore2/nsh/setenv.sh

 create mode 100644 nuttx-configs/aerocore2/scripts/ld.script

 create mode 100644 nuttx-configs/aerocore2/src/Makefile

 create mode 100644 nuttx-configs/aerocore2/src/empty.c

 create mode 100644 src/drivers/boards/aerocore2/CMakeLists.txt

 create mode 100644 src/drivers/boards/aerocore2/aerocore2_can.c

 create mode 100644 src/drivers/boards/aerocore2/aerocore2_init.c

 create mode 100644 src/drivers/boards/aerocore2/aerocore2_led.c

 create mode 100644 src/drivers/boards/aerocore2/aerocore2_spi.c

 create mode 100644 src/drivers/boards/aerocore2/aerocore2_timer_config.c

 create mode 100644 src/drivers/boards/aerocore2/aerocore2_usb.c

 create mode 100644 src/drivers/boards/aerocore2/board_config.h


어떤 물건인가 해서 검색해보니 다음과 같은 제품이 보인다.

gumstix라는 소형 SOM? 같은 컴퓨팅 모듈을 전문으로 제조/판매하는 회사에서 드론 전용의 컴퓨팅 모듈을 만든거 같다.

그리고 역시 PX4와 함께 공동 개발을 진행하고 있는듯 하다. 아래는 해당 제품의 사진.



센서 사양은 다음과 같다.

ST L3G4200D 3-AXIS GYROSCOPE

MS5611 BAROMETRIC SENSOR

LSM303D 6-AXIS ACCELEROMETER

픽스호크와 크게 다른 부분은 없는듯 하다. MPU IMU센서는 어떤 부품이 들어갔는지는 확인 안됨.


이 외에 NAVIO 관련 부분도 일부 업데이트 되었다. 

 create mode 100644 src/drivers/navio_adc/CMakeLists.txt

 create mode 100644 src/drivers/navio_adc/navio_adc.cpp

 delete mode 100644 src/drivers/navio_gpio/navio_gpio.cpp

 delete mode 100644 src/drivers/navio_gpio/navio_gpio.h


센서와 관련된 업데이트 내용도 보인다. 특히 보쉬의 IMU 센서 관련 부분이 새로 추가된거 같다.


 create mode 100644 src/drivers/bmi055/CMakeLists.txt

 create mode 100644 src/drivers/bmi055/bmi055.hpp

 create mode 100644 src/drivers/bmi055/bmi055_accel.cpp

 create mode 100644 src/drivers/bmi055/bmi055_gyro.cpp

 create mode 100644 src/drivers/bmi055/bmi055_main.cpp

 rename src/drivers/{mpu6500 => bmm150}/CMakeLists.txt (96%)

 create mode 100644 src/drivers/bmm150/bmm150.cpp

 create mode 100644 src/drivers/bmm150/bmm150.hpp

 create mode 100644 src/drivers/bmp280/bmp280_i2c.cpp


관련하여 서브모듈들도 업데이트가 이루어졌다.


$ git submodule update

remote: Counting objects: 101, done.

remote: Total 101 (delta 58), reused 59 (delta 58), pack-reused 42

Receiving objects: 100% (101/101), 21.96 KiB | 0 bytes/s, done.

Resolving deltas: 100% (70/70), completed with 21 local objects.

From https://github.com/PX4/sitl_gazebo

   dab68eb..0b0111d  master     -> origin/master

Submodule path 'Tools/sitl_gazebo': checked out '02060a86652b736ca7dd945a524a8bf84eaf5a05'

remote: Counting objects: 508, done.

remote: Compressing objects: 100% (5/5), done.

remote: Total 508 (delta 443), reused 443 (delta 441), pack-reused 62

Receiving objects: 100% (508/508), 213.60 KiB | 95.00 KiB/s, done.

Resolving deltas: 100% (466/466), completed with 57 local objects.

From https://github.com/mavlink/c_library_v1

   5fb3b88..d4d3a41  master     -> origin/master

Submodule path 'mavlink/include/mavlink/v1.0': checked out 'd3957ad294029bd12318f3de6e1f4b28f4a0d2db'

remote: Counting objects: 532, done.

remote: Total 532 (delta 483), reused 483 (delta 483), pack-reused 49

Receiving objects: 100% (532/532), 225.02 KiB | 121.00 KiB/s, done.

Resolving deltas: 100% (492/492), completed with 66 local objects.

From https://github.com/mavlink/c_library_v2

   fb41138..9e12d05  master     -> origin/master

Submodule path 'mavlink/include/mavlink/v2.0': checked out '2faa6d49834aa203e2a3eeeeed588728fb14c431'

remote: Counting objects: 31, done.

remote: Total 31 (delta 24), reused 24 (delta 24), pack-reused 7

Unpacking objects: 100% (31/31), done.

From https://github.com/PX4/GpsDrivers

   c32a398..2283126  master     -> origin/master

Submodule path 'src/drivers/gps/devices': checked out 'dd275f36cb22a82342bdeadf4f66b4f6af03ef92'

Submodule path 'src/lib/DriverFramework': checked out '87de5cbab3e652b4dfdf2161f2440437b89ee399'

remote: Counting objects: 199, done.

remote: Compressing objects: 100% (2/2), done.

remote: Total 199 (delta 120), reused 120 (delta 120), pack-reused 77

Receiving objects: 100% (199/199), 49.86 KiB | 69.00 KiB/s, done.

Resolving deltas: 100% (155/155), completed with 18 local objects.

From https://github.com/PX4/ecl

   a1a5734..05c3c46  master                  -> origin/master

 * [new branch]      pr-ekfBiasLearnControl  -> origin/pr-ekfBiasLearnControl

 * [new branch]      pr-ekfBufferParam       -> origin/pr-ekfBufferParam

 * [new branch]      pr-ekfDelVelBiasControl -> origin/pr-ekfDelVelBiasControl

 * [new branch]      pr-ekfOutputObserver    -> origin/pr-ekfOutputObserver

 + 172c577...c554d12 pr-rangeAid             -> origin/pr-rangeAid  (forced update)

 * [new branch]      pr-terrainEstimator     -> origin/pr-terrainEstimator

Submodule path 'src/lib/ecl': checked out '05c3c46f839ef0738c2cb0c643dd40a2d6ef01d8



반응형
반응형

맥에 Tensorflow를 설치하는 과정은 아래 홈페이지에 자세히 나와있다.

https://www.tensorflow.org/install/install_mac 


하지만 중간에 안되는 경우도 있고 어떤걸 선택해야 할지 망설여지는 부분이 있어서 여기에 별도로 정리해둔다.

pip 설치방법을 따른다.


먼저 설치하는 시스템은 다음과 같다.

OSX Yosemite 10.10.5 가 설치된 mac mini(late 2014)

Intel i5 2.6 GHz, 8Gb 1600 MHz DDR3 가 탑재됨


먼저 Python 2.7.12 이 설치되었는지 확인한다.
만약 설치되어 있다면 터미널에 python을 입력하면 된다.

안되어 있다면 brew 를 사용하여 설치한다. 


자세한 설치 방법은 아래 링크 참조.

https://brew.sh/index_ko.html


$ sudo easy_install pip


Searching for pip

Best match: pip 8.1.2

Processing pip-8.1.2-py2.7.egg

Adding pip 8.1.2 to easy-install.pth file

Installing pip script to /usr/local/bin

Installing pip2.7 script to /usr/local/bin

Installing pip2 script to /usr/local/bin


Using /Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg

Processing dependencies for pip

Finished processing dependencies for pip


$ sudo easy_install --upgrade six


Searching for six

Reading https://pypi.python.org/simple/six/

Best match: six 1.10.0

Downloading https://pypi.python.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55

Processing six-1.10.0.tar.gz

Writing /tmp/easy_install-RkxZZ9/six-1.10.0/setup.cfg

Running six-1.10.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-RkxZZ9/six-1.10.0/egg-dist-tmp-Ddajal

no previously-included directories found matching 'documentation/_build'

zip_safe flag not set; analyzing archive contents...

six: module references __path__

creating /usr/local/lib/python2.7/site-packages/six-1.10.0-py2.7.egg

Extracting six-1.10.0-py2.7.egg to /usr/local/lib/python2.7/site-packages

Adding six 1.10.0 to easy-install.pth file


Installed /usr/local/lib/python2.7/site-packages/six-1.10.0-py2.7.egg

Processing dependencies for six

Finished processing dependencies for six


pip를 업데이트한다.

$ sudo easy_install --upgrade pip


Searching for pip

Reading https://pypi.python.org/simple/pip/

Best match: pip 9.0.1

Downloading https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9

Processing pip-9.0.1.tar.gz

Writing /tmp/easy_install-x3qv93/pip-9.0.1/setup.cfg

Running pip-9.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-x3qv93/pip-9.0.1/egg-dist-tmp-XABGSr

/usr/local/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'

  warnings.warn(msg)

warning: no previously-included files found matching '.coveragerc'

warning: no previously-included files found matching '.mailmap'

warning: no previously-included files found matching '.travis.yml'

warning: no previously-included files found matching '.landscape.yml'

warning: no previously-included files found matching 'pip/_vendor/Makefile'

warning: no previously-included files found matching 'tox.ini'

warning: no previously-included files found matching 'dev-requirements.txt'

warning: no previously-included files found matching 'appveyor.yml'

no previously-included directories found matching '.github'

no previously-included directories found matching '.travis'

no previously-included directories found matching 'docs/_build'

no previously-included directories found matching 'contrib'

no previously-included directories found matching 'tasks'

no previously-included directories found matching 'tests'

creating /usr/local/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg

Extracting pip-9.0.1-py2.7.egg to /usr/local/lib/python2.7/site-packages

Removing pip 8.1.2 from easy-install.pth file

Adding pip 9.0.1 to easy-install.pth file

Installing pip script to /usr/local/bin

Installing pip2.7 script to /usr/local/bin

Installing pip2 script to /usr/local/bin


Installed /usr/local/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg

Processing dependencies for pip

Finished processing dependencies for pip



Tensor flow 설치하기

$ pip install --upgrade TF_BINARY_URL # Python 2.7

여기서 TF_BINARY_URL은 텐서플로우의 바이너리가 있는 링크이다.

https://www.tensorflow.org/install/install_mac#the_url_of_the_tensorflow_python_package 에서 찾을 수 있다.


Python 2.7 에 GPU가 없는 버전은 다음 위치에 있다.

https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.1.0-py2-none-any.whl

이제 터미널에 다음을 입력한다.

$ sudo pip  install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.1.0-py2-none-any.whl


그럼 다음과 같이 설치를 진행할 것이다.


The directory '/Users/macmini2/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

The directory '/Users/macmini2/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Collecting tensorflow==1.1.0 from https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.1.0-py2-none-any.whl

  Downloading https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.1.0-py2-none-any.whl (30.9MB)

    100% |████████████████████████████████| 30.9MB 39kB/s 

Requirement already up-to-date: six>=1.10.0 in /usr/local/lib/python2.7/site-packages/six-1.10.0-py2.7.egg (from tensorflow==1.1.0)

Collecting werkzeug>=0.11.10 (from tensorflow==1.1.0)

  Downloading Werkzeug-0.12.2-py2.py3-none-any.whl (312kB)

    100% |████████████████████████████████| 317kB 2.4MB/s 

Collecting numpy>=1.11.0 (from tensorflow==1.1.0)

  Downloading numpy-1.12.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (4.4MB)

    100% |████████████████████████████████| 4.4MB 246kB/s 

Collecting mock>=2.0.0 (from tensorflow==1.1.0)

  Downloading mock-2.0.0-py2.py3-none-any.whl (56kB)

    100% |████████████████████████████████| 61kB 7.1MB/s 

Collecting protobuf>=3.2.0 (from tensorflow==1.1.0)

  Downloading protobuf-3.3.0.tar.gz (271kB)

    100% |████████████████████████████████| 276kB 1.4MB/s 

Requirement already up-to-date: wheel in /usr/local/lib/python2.7/site-packages (from tensorflow==1.1.0)

Collecting funcsigs>=1; python_version < "3.3" (from mock>=2.0.0->tensorflow==1.1.0)

  Downloading funcsigs-1.0.2-py2.py3-none-any.whl

Collecting pbr>=0.11 (from mock>=2.0.0->tensorflow==1.1.0)

  Downloading pbr-3.0.1-py2.py3-none-any.whl (99kB)

    100% |████████████████████████████████| 102kB 9.7MB/s 

Collecting setuptools (from protobuf>=3.2.0->tensorflow==1.1.0)

  Downloading setuptools-35.0.2-py2.py3-none-any.whl (390kB)

    100% |████████████████████████████████| 399kB 1.4MB/s 

Collecting packaging>=16.8 (from setuptools->protobuf>=3.2.0->tensorflow==1.1.0)

  Downloading packaging-16.8-py2.py3-none-any.whl

Collecting appdirs>=1.4.0 (from setuptools->protobuf>=3.2.0->tensorflow==1.1.0)

  Downloading appdirs-1.4.3-py2.py3-none-any.whl

Collecting pyparsing (from packaging>=16.8->setuptools->protobuf>=3.2.0->tensorflow==1.1.0)

  Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB)

    100% |████████████████████████████████| 61kB 10.2MB/s 

Installing collected packages: werkzeug, numpy, funcsigs, pbr, mock, pyparsing, packaging, appdirs, setuptools, protobuf, tensorflow

  Found existing installation: setuptools 23.1.0

    Uninstalling setuptools-23.1.0:

      Successfully uninstalled setuptools-23.1.0

  Running setup.py install for protobuf ... done

Successfully installed appdirs-1.4.3 funcsigs-1.0.2 mock-2.0.0 numpy-1.12.1 packaging-16.8 pbr-3.0.1 protobuf-3.3.0 pyparsing-2.2.0 setuptools-35.0.2 tensorflow-1.1.0 werkzeug-0.12.2


이제 Python 을 실행하고 간단히 텐서플로우를 실행해보자.


>>> import tensorflow as tf

>>> hello = tf.constant('Hello, TensorFlow!!')

>>> sess = tf.Session()

2017-05-19 18:44:21.889118: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.

2017-05-19 18:44:21.889137: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.

2017-05-19 18:44:21.889147: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.

2017-05-19 18:44:21.889156: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.

2017-05-19 18:44:21.889165: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.

>>> print(sess.run(hello))

Hello, TensorFlow!!


위와 같이 정상적으로 출력됨을 확인할 수 있다.


반응형
반응형

APM에 Mission Planner가 있다면 PX4에는 QgroundControl(이하 QGC)이라는 GCS 소프트웨어가 있다. 

미션플래너는 윈도우 기반으로 되어있는 반면에 QGC는 QT기반으로 개발되어 윈도우 뿐 아니라 리눅스, mac, 그리고 안드로이드와 IOS같은 모바일 기기에서도 

포팅이 가능한 장점이 있어서 필드에서 사용하기에 유용하다.


맥에서 빌드하는 방법은 간단히 git clone 명령으로 소스를 복사한 다음 qt에서 열어서 빌드하는것으로 끝이다.


안드로이드로 빌드하는것은 상대적으로 복잡한데 일단 다음을 참조한다.



http://doc.qt.io/qt-5/androidgs.html


다음 항목들이 필요하다.

  • The Android SDK Tools
  • The Android NDK
  • Java SE Development Kit (JDK) v6 or later.

  • 안드로이드 studio를 설치하면 sdk 기본 폴더가 /Users/username/Library/Android/sdk  에 만들어졌을 것이다. (여기서 username은 각자의 사용자명)

    이제 스튜디오를 실행하여 설정 항목에서 추가적인 SDK를 설치한다.

    LLDB, NDK등을 추가하여 준다.

    이제  QT5.7.1 의 안드로이드 버전을 다운로드한다.

    qt-opensource-mac-x64-android-ios-5.7.1.dmg

    만약 ios가 필요 없다면 아래 항목을 다운로드 한다.

    qt-opensource-mac-x64-android-5.7.1.dmg


    기존에 5.7.1이 설치되어 있다면 설치 폴더를 5.7.1_android 등으로 변경하여 설치한다.(겹쳐서 설치는 해보지 않음)

    설치가 완료되면 프로젝트의 kit에 안드로이드 항목이 자동으로 추가되어 있는것을 혹인할 수 있다.


    만약 자동으로 Kit이 생서되지 않는다면 다음을 확인한다.


    Projects -> Manage Kits -> 좌측 탭에서 Devices를 선택 후 Android 항목에서 다음과 같이 설정한다.

    Android SDK location과 NDK 경로를 설정해야 Kit가 생성된다.

    그리고 Ant 위치를 지정한다. Ant 가 설치되어있는 경로는 터미널에 다음을 수행한다.

    $ which ant

    /usr/local/bin/ant

    ant 가 설치되어있지 않으면 설치한다.


    이렇게 해서 빌드를 해보면 아마도 gradle 오류가 발생할 것이다.

    이것은 안드로이드 sdk최신판에서 build tool 이 빠지면서(?) 발생하는 문제인데

    아래 링크에서 build tool 을 다운로드 하여 필요한 항목을 android sdk 폴더에 복사한다.


    http://www.techspot.com/downloads/5425-android-sdk.html 


    tools/template 항목을 복사하여 /Users/username/Library/Android/sdk/tools/template 에 복사한다.


    Projects -> Build Settings -> Build Steps -> Build Android APK 의 Advanced Actions 에서 Use Gradle 항목을 Check 한다.

    이렇게 해야 Build.xml 오류를 해결할 수 있다.



    이렇게 하고 build 하면 안드로이드 기기에서 실행할 수 있다.


    반응형

    + Recent posts