text: (window.webpackJsonp=window.webpackJsonp||[]).push([[652],{1237:function(t,s,a){t.exports=a.p+"assets/img/architecture.94eff761.png"},2405:function(t,s,a){"use strict";a.r(s);var n=a(19),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,n=t._self._c||s;return n("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[n("h1",{attrs:{id:"rtps-dds-인터페이스-px4-고속-rtps-dds-브리지"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#rtps-dds-인터페이스-px4-고속-rtps-dds-브리지"}},[t._v("#")]),t._v(" RTPS/DDS 인터페이스: PX4-고속 RTPS(DDS) 브리지")]),t._v(" "),n("p",[n("em",[t._v("microRTPS Bridge")]),t._v("라고 하는 "),n("em",[t._v("PX4-Fast RTPS(DDS) Bridge")]),t._v("는 PX4 Autopilot에 RTPS(Real Time Publish Subscribe) 인터페이스를 추가합니다. 다양한 PX4 Autopilot 내부 구성요소와 (오프보드) "),n("em",[t._v("Fast DDS")]),t._v(" 애플리케이션 간의 "),n("RouterLink",{attrs:{to:"/ko/middleware/uorb.html"}},[t._v("uORB 메시지")]),t._v(" 교환을 실시간으로 가능하게 합니다.")],1),t._v(" "),n("p",[t._v("이를 통하여 DDS 도메인(ROS 노드 포함)에서 실행되고 연결된 애플리케이션과 통합되어 센서 데이터, 명령 및 기타 차량 정보를 쉽게 공유할 수 있습니다.")]),t._v(" "),n("p",[t._v("다음 가이드는 RTPS/DDS 브리지 아키텍처를 설명하고, PX4 Autopilot에서 원격 측정 업데이트를 구독하기 위하여 간단한 "),n("em",[t._v("Fast DDS")]),t._v(" 애플리케이션을 작성하는 방법을 설명합니다.")]),t._v(" "),n("div",{staticClass:"custom-block note"},[n("p",{staticClass:"custom-block-title"},[t._v("RTPS는 OMG(Object Management Group) DDS(Data Distribution Service) 표준의 기본 프로토콜입니다. 발행/구독 패턴을 사용하여 확장 가능하고, 실시간 및 고성능의 상호 운용 데이터 통신이 목표입니다.")]),t._v(" "),n("p",[n("em",[t._v("Fast DDS")]),t._v("는 최신 버전의 RTPS 프로토콜/DDS 미들웨어를 가볍게 구현한 것입니다.  이전에는 "),n("em",[t._v("Fast RTPS")]),t._v("라는 이름이 붙었습니다.")])]),t._v(" "),n("h2",{attrs:{id:"rtps는-언제-사용해야-합니까"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#rtps는-언제-사용해야-합니까"}},[t._v("#")]),t._v(" RTPS는 언제 사용해야 합니까?")]),t._v(" "),n("p",[t._v("RTPS는 비행 콘트롤러와 오프보드 부품간에 중요한 정보를 실시간 및 안정적으로 공유하는 경우에 사용합니다. It is instrumental in cases where offboard software needs to become a "),n("em",[t._v("peer")]),t._v(" of software components running in PX4 (sending and receiving uORB topics).")]),t._v(" "),n("p",[t._v("사용 사례에는 컴퓨터 비전 로봇 라이브러리와의 통신과 액추에이터와 센서간의 실시간 데이터가 차량 제어 등이 있습니다.")]),t._v(" "),n("p",[n("em",[t._v("Fast DDS")]),t._v("는 MAVLink를 대체하는 것이 아닙니다. "),n("RouterLink",{attrs:{to:"/ko/middleware/mavlink.html"}},[t._v("MAVLink")]),t._v("는 지상국, 짐벌, 카메라 및 기타 오프보드 부품과 통신에 가장 적합한 프로토콜입니다("),n("em",[t._v("Fast DDS")]),t._v("는 더 높은 주파수에서 일부 주변 장치와 작업할 수 있는 기회를 제공할 수 있지만).")],1),t._v(" "),n("div",{staticClass:"custom-block tip"},[n("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),n("p",[t._v("링크의 추가 제약이 있는 느린 통신환경(예: 무선 원격 측정)에서 Fast RTPS(DDS)를 사용할 수 있습니다. 원격 분석 채널에 쉽게 과부하가 걸릴 수 있다는 점을 염두에 두십시오.")])]),t._v(" "),n("h2",{attrs:{id:"아키텍쳐-개요"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#아키텍쳐-개요"}},[t._v("#")]),t._v(" 아키텍쳐 개요")]),t._v(" "),n("h3",{attrs:{id:"micrortps-브리지"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#micrortps-브리지"}},[t._v("#")]),t._v(" microRTPS 브리지")]),t._v(" "),n("p",[n("em",[t._v("microRTPS")]),t._v(" 브리지는 PX4와 DDS 참여 애플리케이션 간에 메시지를 교환하여, 각 시스템에서 사용하는 "),n("RouterLink",{attrs:{to:"/ko/middleware/uorb.html"}},[t._v("uORB")]),t._v("와 RTPS/DDS 메시지를 원활하게 변환합니다.")],1),t._v(" "),n("p",[n("img",{attrs:{src:a(1237),alt:"기본 예제 흐름"}})]),t._v(" "),n("p",[t._v("아키텍처의 핵심 요소는 위의 다이어그램에 표시된 클라이언트와 에이전트 프로세스입니다.")]),t._v(" "),n("h4",{attrs:{id:"micrortps-클라이언트"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#micrortps-클라이언트"}},[t._v("#")]),t._v(" microRTPS 클라이언트")]),t._v(" "),n("p",[n("em",[t._v("클라이언트")]),t._v("는 비행 콘트롤러에서 실행되는 PX4 자동항법장치의 미들웨어 데몬 프로세스입니다. 이 클라이언트는 다른 PX4 자동항법장치 구성 요소에서 게시한 uORB 주제를 구독하고, 모든 업데이트를 "),n("em",[t._v("에이전트")]),t._v("(UART 또는 UDP 포트를 통해)에 보내고, "),n("em",[t._v("에이전트")]),t._v(" 및 PX4 자동항법장치에 uORB 메시지로 게시합니다.")]),t._v(" "),n("h4",{attrs:{id:"micrortps-에이전트"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#micrortps-에이전트"}},[t._v("#")]),t._v(" microRTPS 에이전트")]),t._v(" "),n("p",[n("em",[t._v("에이전트")]),t._v("는 오프보드 컴퓨터(비행 콘트롤러 외부)의 데몬 프로세스로 실행됩니다. This agent watches for uORB update messages from the "),n("em",[t._v("Client")]),t._v(' and (re)publishes them over RTPS, and also subscribes to "uORB" RTPS/DDS messages from other DDS-participant applications and forwards them to the '),n("em",[t._v("Client")]),t._v(".")]),t._v(" "),n("h4",{attrs:{id:"micrortps-에이전트-클라이언트-통신"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#micrortps-에이전트-클라이언트-통신"}},[t._v("#")]),t._v(" microRTPS 에이전트/클라이언트 통신")]),t._v(" "),n("p",[n("em",[t._v("에이전트")]),t._v("와 "),n("em",[t._v("클라이언트")]),t._v("는 직렬 통신(UART) 또는 UDP 네트워크로 연결되며, uORB 정보는 전송전에 "),n("a",{attrs:{href:"https://en.wikipedia.org/wiki/Common_Data_Representation",target:"_blank",rel:"noopener noreferrer"}},[t._v("CDR 직렬화"),n("OutboundLink")],1),t._v("됩니다("),n("em",[t._v("CDR 직렬화")]),t._v("는 서로 다른 플랫폼 간에 직렬 데이터 교환을 위한 공통 형식입니다.)")]),t._v(" "),n("p",[n("em",[t._v("에이전트")]),t._v("와 모든 "),n("em",[t._v("Fast DDS")]),t._v(" 애플리케이션은 UDP로 연결되며, 동일한 기기 또는 다른 기기에 있을 수 있습니다. 일반적인 설정에서는 "),n("em",[t._v("클라이언트")]),t._v("에 연결된 동일 시스템(예: 개발 컴퓨터, Linux 보조 컴퓨터 또는 컴퓨팅 보드)에 있습니다. 이것은 Wi-Fi 링크 또는 USB로 가능합니다.")]),t._v(" "),n("h2",{attrs:{id:"코드-생성"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#코드-생성"}},[t._v("#")]),t._v(" 코드 생성")]),t._v(" "),n("h3",{attrs:{id:"종속성"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#종속성"}},[t._v("#")]),t._v(" 종속성")]),t._v(" "),n("p",[t._v("필요 코드를 생성하고 다음 단계를 진행하기 위하여 Fast DDS 2.0.0 이상 및 Fast-RTPS-Gen 1.0.4(이후 아님!)를 설치합니다. "),n("RouterLink",{attrs:{to:"/ko/dev_setup/fast-dds-installation.html"}},[t._v("설치 가이드를 참고하십시오.")])],1),t._v(" "),n("div",{staticClass:"custom-block note"},[n("p",{staticClass:"custom-block-title"},[t._v("RTPS는 ROS 2(Robot Operating System)의 미들웨어로 채택되었습니다.")]),t._v(" "),n("p",[t._v("ROS 2 애플리케이션과 개발 워크플로에서의 자세한 사용 방법은 "),n("RouterLink",{attrs:{to:"/ko/ros/ros2_comm.html"}},[t._v("PX4-ROS 2 브리지")]),t._v("를 참고하십시오.")],1)]),t._v(" "),n("h3",{attrs:{id:"fast-rtps-dds-애플리케이션-ros-독립"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#fast-rtps-dds-애플리케이션-ros-독립"}},[t._v("#")]),t._v(" Fast RTPS(DDS) 애플리케이션(ROS 독립)")]),t._v(" "),n("p",[t._v("브리지를 생성, 구축 및 사용하는 데 필요한 코드는 PX4-Autopilot이 컴파일시에 자동으로 생성됩니다.")]),t._v(" "),n("p",[n("em",[t._v("클라이언트")]),t._v(" 애플리케이션도 일반 빌드 프로세스의 일부로 컴파일되고, 펌웨어에 빌드됩니다. "),n("em",[t._v("에이전트")]),t._v("는 대상 컴퓨터에서 수동으로 컴파일하여야 합니다.")]),t._v(" "),n("div",{staticClass:"custom-block tip"},[n("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),n("p",[t._v("대부분의 사용자는 그렇게 할 필요가 없습니다. 그래도, 브리지는 "),n("RouterLink",{attrs:{to:"/ko/middleware/micrortps_manual_code_generation.html"}},[t._v("수동으로 생성")]),t._v("할 수 있으므로 빌드 프로세스에 대한 보다 자세한 개요를 제공하고 문제 해결에 유용합니다.")],1)]),t._v(" "),n("h2",{attrs:{id:"지원-uorb-메시지"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#지원-uorb-메시지"}},[t._v("#")]),t._v(" 지원 uORB 메시지")]),t._v(" "),n("p",[t._v("생성된 브리지 코드는 ROS 애플리케이션을 배포 여부에 상관없이 RTPS를 통하여 uORB 주제의 지정된 하위 집합을 게시/구독할 수 있도록 합니다.")]),t._v(" "),n("p",[n("em",[t._v("자동 코드 생성")]),t._v("의 경우 "),n("strong",[t._v("uorb_rtps_message_ids.yaml")]),t._v("이라는 PX4 "),n("strong",[t._v("PX4-Autopilot/msg/tools/")]),t._v(" 디렉토리에 "),n("em",[t._v("yaml")]),t._v(" 정의 파일이 있습니다. 이 파일은 RTPS와 함께 사용할 uORB 메시지 세트, 메시지를 보내거나 받을지 또는 둘 다 할지 여부와 DDS/RTPS 미들웨어에서 사용할 메시지의 RTPS ID를 정의합니다.")]),t._v(" "),n("div",{staticClass:"custom-block note"},[n("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),n("p",[t._v("모든 RTPS 메시지는 이 파일에 ID 설정이 "),n("strong",[t._v("필요")]),t._v("합니다.")])]),t._v(" "),n("div",{staticClass:"language-yaml extra-class"},[n("pre",{pre:!0,attrs:{class:"language-yaml"}},[n("code",[n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("rtps")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n  "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("msg")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" actuator_armed\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("id")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n  "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("msg")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" actuator_control\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("id")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n  "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("...")]),t._v("\n  "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("msg")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" airspeed\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("id")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("send")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n  "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("msg")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" battery_status\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("id")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("send")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n  "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("msg")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" camera_capture\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("id")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v("\n  "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("msg")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" camera_trigger\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("id")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("receive")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n  "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("...")]),t._v("\n  "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("msg")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" sensor_baro\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("id")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("63")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("receive")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("send")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n")])])]),n("p",[n("a",{attrs:{id:"client_firmware"}})]),t._v(" "),n("h2",{attrs:{id:"클라이언트-px4-px4-autopilot"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#클라이언트-px4-px4-autopilot"}},[t._v("#")]),t._v(" 클라이언트 (PX4/PX4-Autopilot)")]),t._v(" "),n("p",[n("em",[t._v("클라이언트")]),t._v(" 소스 코드는 일반 빌드 프로세스의 일부로 생성, 컴파일 및 PX4 Autopilot 펌웨어에 빌드됩니다.")]),t._v(" "),n("p",[t._v("NuttX/Pixhawk 비행 콘트롤러용 PX4 Autopilot 펌웨어를 빌드하려면 구성 대상에서 "),n("code",[t._v("_rtps")]),t._v(" 기능을 사용하십시오.")]),t._v(" "),n("p",[t._v("예를 들어, RTPS를 px4_fmu-v4에 빌드하려면:")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v(" px4_fmu-v4_rtps\n")])])]),n("p",[t._v("SITL 대상 펌웨어를 빌드하려면:")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v(" px4_sitl_rtps\n")])])]),n("p",[n("em",[t._v("클라이언트")]),t._v(" 애플리케이션은 "),n("RouterLink",{attrs:{to:"/ko/debug/system_console.html"}},[t._v("NuttShell/System Console")]),t._v("에서 실행할 수 있습니다. 명령어 구문은 다음과 같습니다(가변 인수를 지정할 수 있음).")],1),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" micrortps_client start"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v("stop"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v("status "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("options"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n  -t "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("transport"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("          "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("UART"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v("UDP"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" Default UART\n  -d "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("device"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("             UART device. Default /dev/ttyACM0\n  -l "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("loops"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("              How many iterations will this program have. -1 "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" infinite. Default -1.\n  -w "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("sleep_time_ms"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("      Time "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" ms "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("which")]),t._v(" each iteration sleep. Default 1ms\n  -b "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("baudrate"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("           UART device baudrate. Default "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("460800")]),t._v("\n  -p "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("poll_ms"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("            Time "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" ms to poll over UART. Default 1ms\n  -r "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("reception port"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("     UDP port "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" receiving. Default "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("\n  -s "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("sending port"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("       UDP port "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" sending. Default "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("\n  -i "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ip_address"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("         Select IP address "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("remote"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" values: "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("x.x.x.x"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(". Default: "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.0")]),t._v(".0.1\n")])])]),n("div",{staticClass:"custom-block note"},[n("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),n("p",[t._v("기본적으로 "),n("em",[t._v("클라이언트")]),t._v("는 데몬으로 실행되지만, 자동으로 시작되지 않으며 수동으로 실행하여야 합니다.")]),t._v(" "),n("p",[t._v("PX4 Autopilot 펌웨어 초기화 코드는 향후 영구 데몬 프로세스로 "),n("em",[t._v("클라이언트")]),t._v("를 자동으로 시작할 수 있습니다.")])]),t._v(" "),n("p",[t._v("예를 들어, UDP로 에이전트에 연결하는 SITL로 "),n("em",[t._v("클라이언트")]),t._v(" 데몬을 실행하려면 다음 명령어를 실행하십시오.")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[t._v("micrortps_client start -t UDP\n")])])]),n("h2",{attrs:{id:"offboard-fast-dds-인터페이스의-에이전트-ros-독립"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#offboard-fast-dds-인터페이스의-에이전트-ros-독립"}},[t._v("#")]),t._v(" Offboard Fast DDS 인터페이스의 에이전트(ROS 독립)")]),t._v(" "),n("p",[t._v("연결된 PX4 Autopilot 펌웨어를 빌드할 때 "),n("em",[t._v("에이전트")]),t._v(" 코드가 자동으로 "),n("em",[t._v("생성")]),t._v("되며, 소스 코드 폴더는 다음과 같습니다: "),n("code",[t._v("build/<target-platform>/src/modules/ micrortps_bridge/micrortps_client/micrortps_agent/")])]),t._v(" "),n("p",[n("em",[t._v("에이전트")]),t._v(" 애플리케이션을 빌드합니다.")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" build/"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("target-platform"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("/src/modules/micrortps_bridge/micrortps_client/micrortps_agent\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" build "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" build\ncmake "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v("\n")])])]),n("p",[n("em",[t._v("에이전트")]),t._v("의 명령 구문은 다음과 같습니다.")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[t._v("$ ./micrortps_agent "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("options"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n  -t "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("transport"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("          "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("UART"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v("UDP"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" Default UART.\n  -d "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("device"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("             UART device. Default /dev/ttyACM0.\n  -w "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("sleep_time_us"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("      Time "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" us "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("which")]),t._v(" each iteration sleep. Default 1ms.\n  -b "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("baudrate"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("           UART device baudrate. Default "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("460800")]),t._v(".\n  -p "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("poll_ms"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("            Time "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" ms to poll over UART. Default 1ms.\n  -r "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("reception port"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("     UDP port "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" receiving. Default "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v(".\n  -s "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("sending port"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("       UDP port "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" sending. Default "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v(".\n  -n "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("set namespace"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v("      Set a namespace "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" the micrortps_agent.\n")])])]),n("p",[n("em",[t._v("에이전트")]),t._v("를 시작하려면 "),n("em",[t._v("클라이언트")]),t._v("에 대한 연결을 지정하기 위한 적절한 옵션과 함께 "),n("code",[t._v("micrortps_agent")]),t._v("를 실행하십시오(기본 옵션은 Linux 기기에서 UART 포트를 통한 "),n("em",[t._v("클라이언트")]),t._v(").")]),t._v(" "),n("p",[t._v("예를 들어, UDP로 "),n("em",[t._v("micrortps_agent")]),t._v("를 시작하려면 다음을 실행합니다.")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[t._v("./micrortps_agent -t UDP\n")])])]),n("h2",{attrs:{id:"fast-dds-리스너-애플리케이션-생성"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#fast-dds-리스너-애플리케이션-생성"}},[t._v("#")]),t._v(" Fast DDS 리스너 애플리케이션 생성")]),t._v(" "),n("p",[n("em",[t._v("클라이언트")]),t._v("(비행 콘트롤러)와 "),n("em",[t._v("에이전트")]),t._v("(오프보드 컴퓨터)가 실행되고 연결되면, "),n("em",[t._v("Fast DDS")]),t._v(" 애플리케이션이 게시하고 RTPS를 사용하여 PX4 Autopilot에서 uORB 주제를 구독하십시오.")]),t._v(" "),n("p",[t._v("이 예는 "),n("code",[t._v("sensor_combined")]),t._v(" 주제를 구독하고 PX4 Autopilot에서 게시된 업데이트를 인쇄하는 "),n("em",[t._v("Fast DDS")]),t._v(' "리스너" 애플리케이션을 만드는 방법을 보여줍니다. 연결된 RTPS 애플리케이션은 '),n("em",[t._v("에이전트")]),t._v("와 동일한 네트워크상의 모든 컴퓨터에서 실행할 수 있습니다. 이 예에서 "),n("em",[t._v("에이전트")]),t._v("와 "),n("em",[t._v("리스너 애플리케이션")]),t._v("은 같은 컴퓨터에 있습니다.")]),t._v(" "),n("p",[n("em",[t._v("fastrtpsgen")]),t._v(" 스크립트를 사용하여, IDL 메시지 파일에서 간단한 RTPS 애플리케이션을 생성할 수 있습니다.")]),t._v(" "),n("div",{staticClass:"custom-block note"},[n("p",{staticClass:"custom-block-title"},[t._v("RTPS")]),t._v(" "),n("p",[t._v("메시지는 IDL 파일에 정의되고, "),n("em",[t._v("fastrtpsgen")]),t._v("을 사용하여 C++로 컴파일됩니다.")]),t._v(" "),n("p",[t._v("브리지 코드 빌드시에 송수신 uORB 메시지의 IDL 파일이 생성되며, 이러한 IDL 파일은 PX4 자동조종장치 통신용 Fast DDS 애플리케이션을 생성에 필요합니다.")]),t._v(" "),n("p",[t._v("빌드 대상은 다음 디렉토리에서 찾을 수 있습니다: "),n("strong",[t._v("build/BUILDPLATFORM/src/modules/micrortps_bridge/micrortps_agent/idl/*.idl")]),t._v(".")])]),t._v(" "),n("p",[t._v("다음 명령을 입력하여 애플리케이션을 생성합니다.")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" /path/to/PX4/PX4-Autopilot\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" build/px4_sitl_rtps/src/modules/micrortps_bridge\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" micrortps_listener\n"),n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" micrortps_listener\nfastrtpsgen -example x64Linux2.6gcc "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v("/micrortps_agent/idl/sensor_combined.idl\n")])])]),n("p",[t._v("This creates a basic subscriber and publisher, and a main-application that you can run.")]),t._v(" "),n("p",[t._v("Linux에서 애플리케이션을 빌드하고 실행합니다.")]),t._v(" "),n("ul",[n("li",[n("code",[t._v("init()")]),t._v(": To change the subscription topic name (by default, the micrortps agent publishes the data on the named topic: "),n("code",[t._v("fmu/sensor_combined/out")]),t._v("),")]),t._v(" "),n("li",[n("code",[t._v("onNewDataMessage()")]),t._v(": To print the received sensor combined data.")])]),t._v(" "),n("div",{staticClass:"language-cpp extra-class"},[n("pre",{pre:!0,attrs:{class:"language-cpp"}},[n("code",[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("bool")]),t._v(" sensor_combinedSubscriber"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("init")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Subscriber"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" sub"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Create RTPSParticipant")]),t._v("\n\n    ParticipantAttributes PParam"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n    PParam"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rtps"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("setName")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Participant_subscriber"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//You can put the name you want")]),t._v("\n    mp_participant "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Domain")]),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("createParticipant")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("PParam"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("mp_participant "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("nullptr")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n        "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n    "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Register the type")]),t._v("\n\n    "),n("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Domain")]),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("registerType")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("mp_participant"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token generic-function"}},[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("static_cast")]),n("span",{pre:!0,attrs:{class:"token generic class-name"}},[n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("TopicDataType"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")])])]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("myType"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n    "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Create Subscriber")]),t._v("\n\n    SubscriberAttributes Rparam"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n    Rparam"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("topic"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("topicKind "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" NO_KEY"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n    Rparam"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("topic"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("topicDataType "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" myType"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("getName")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("//Must be registered before the creation of the subscriber")]),t._v("\n    Rparam"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("topic"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("topicName "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"fmu/sensor_combined/out"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n    mp_subscriber "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Domain")]),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("createSubscriber")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("mp_participant"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("Rparam"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token generic-function"}},[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("static_cast")]),n("span",{pre:!0,attrs:{class:"token generic class-name"}},[n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("SubscriberListener"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")])])]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("m_listener"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("mp_subscriber "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("nullptr")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n        "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),n("div",{staticClass:"language-cpp extra-class"},[n("pre",{pre:!0,attrs:{class:"language-cpp"}},[n("code",[n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("void")]),t._v(" sensor_combinedSubscriber"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),n("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("SubListener")]),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("onNewDataMessage")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Subscriber"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" sub"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Take data")]),t._v("\n    sensor_combined_ st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n    "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sub"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("takeNextData")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&")]),t._v("m_info"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n        "),n("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("m_info"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("sampleKind "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" ALIVE"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n        "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n            "),n("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Print your structure data here.")]),t._v("\n            "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("++")]),t._v("n_msg"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n"')]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Sample received, count="')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" n_msg "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"============================="')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"gyro_rad: "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("gyro_rad")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("at")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('", "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("gyro_rad")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("at")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('", "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("gyro_rad")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("at")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"gyro_integral_dt: "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("gyro_integral_dt")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"accelerometer_timestamp_relative: "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("accelerometer_timestamp_relative")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"accelerometer_m_s2: "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("accelerometer_m_s2")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("at")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('", "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("accelerometer_m_s2")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("at")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('", "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("accelerometer_m_s2")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("at")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"accelerometer_integral_dt: "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("accelerometer_integral_dt")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"magnetometer_timestamp_relative: "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("magnetometer_timestamp_relative")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"magnetometer_ga: "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("magnetometer_ga")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("at")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('", "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("magnetometer_ga")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("at")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('", "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("magnetometer_ga")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("at")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"baro_timestamp_relative: "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("baro_timestamp_relative")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"baro_alt_meter: "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("baro_alt_meter")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n            std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("cout "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token string"}},[t._v('"baro_temp_celcius: "')]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" st"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("baro_temp_celcius")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),t._v(" std"),n("span",{pre:!0,attrs:{class:"token double-colon punctuation"}},[t._v("::")]),t._v("endl"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n        "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n    "),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),n("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),n("p",[t._v("이제 출력되는 센서 정보를 조회할 수 있습니다.")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[t._v("Sample received, "),n("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("count")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("10119")]),t._v("\nReceived sensor_combined data\n"),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("\ngyro_rad: -0.0103228, "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0140477")]),t._v(", "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.000319406")]),t._v("\ngyro_integral_dt: "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.004")]),t._v("\naccelerometer_timestamp_relative: "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\naccelerometer_m_s2: -2.82708, -6.34799, -7.41101\naccelerometer_integral_dt: "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.004")]),t._v("\nmagnetometer_timestamp_relative: -10210\nmagnetometer_ga: "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.60171")]),t._v(", "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0405879")]),t._v(", -0.040995\nbaro_timestamp_relative: -17469\nbaro_alt_meter: "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("368.647")]),t._v("\nbaro_temp_celcius: "),n("span",{pre:!0,attrs:{class:"token number"}},[t._v("43.93")]),t._v("\n")])])]),n("p",[t._v("Now you should see the sensor information being printed out:")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[t._v("mavlink stop-all\n")])])]),n("div",{staticClass:"custom-block note"},[n("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),n("p",[t._v("Make sure the "),n("em",[t._v("Client")]),t._v(" is running, if the "),n("em",[t._v("Listener application")]),t._v(" does not print anything.")])]),t._v(" "),n("h2",{attrs:{id:"실제-하드웨어로-브리지-설정"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#실제-하드웨어로-브리지-설정"}},[t._v("#")]),t._v(" 실제 하드웨어로 브리지 설정")]),t._v(" "),n("p",[t._v("This section is work-in-progress.")]),t._v(" "),n("h2",{attrs:{id:"문제-해결"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#문제-해결"}},[t._v("#")]),t._v(" 문제 해결")]),t._v(" "),n("h3",{attrs:{id:"클라이언트가-선택한-uart-포트가-사용-중이라고-보고함"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#클라이언트가-선택한-uart-포트가-사용-중이라고-보고함"}},[t._v("#")]),t._v(" 클라이언트가 선택한 UART 포트가 사용 중이라고 보고함")]),t._v(" "),n("p",[t._v("If the selected UART port is busy, it's possible that the MAVLink application is already being used. If both MAVLink and RTPS connections are required you will have to either move the connection to use another port or using the available protocol splitter for PX4 and companion computers.")]),t._v(" "),n("div",{staticClass:"custom-block tip"},[n("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),n("p",[t._v("A quick/temporary fix to allow bridge testing during development is to stop MAVLink from "),n("em",[t._v("NuttShell")]),t._v(":")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("FASTRTPSGEN_DIR")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("/path/to/fastrtps/install/folder/bin\n")])])])]),t._v(" "),n("h3",{attrs:{id:"에이전트가-빌드되지-않음-fastrtpsgen을-찾을-수-없습니다"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#에이전트가-빌드되지-않음-fastrtpsgen을-찾을-수-없습니다"}},[t._v("#")]),t._v(" 에이전트가 빌드되지 않음/fastrtpsgen을 찾을 수 없습니다.")]),t._v(" "),n("p",[t._v("기본 경로에 Fast DDS를 설치하지 않은 경우에는 "),n("em",[t._v("make")]),t._v("를 실행하기 전에 "),n("code",[t._v("FASTRTPSGEN_DIR")]),t._v(" 환경 변수를 설정하여 설치 디렉토리를 지정하여야 합니다.")]),t._v(" "),n("p",[t._v("Linux/Mac 환경에서는 다음과 같이 설정합니다.")]),t._v(" "),n("p",[t._v("On Linux/Mac this is done as shown below:")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[n("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("FASTRTPSGEN_DIR")]),n("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("/path/to/fastrtps/install/folder/bin\n")])])]),n("div",{staticClass:"custom-block note"},[n("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),n("p",[t._v("This should not be a problem if "),n("RouterLink",{attrs:{to:"/ko/dev_setup/fast-dds-installation.html"}},[t._v("Fast DDS is installed in the default location")]),t._v(".")],1)]),t._v(" "),n("h3",{attrs:{id:"보조-컴퓨터의-uart-활성화"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#보조-컴퓨터의-uart-활성화"}},[t._v("#")]),t._v(" 보조 컴퓨터의 UART 활성화")]),t._v(" "),n("p",[t._v("For UART transport on a Raspberry Pi or any other companion computer you will have to enable the serial port:")]),t._v(" "),n("ol",[n("li",[n("p",[n("code",[t._v("userid")]),t._v("(기본값은 라즈베리파이의 경우 pi)가 "),n("code",[t._v("dialout")]),t._v(" 그룹의 구성원인지 확인합니다.")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("groups")]),t._v(" pi\n"),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("usermod")]),t._v(" -a -G dialout pi\n")])])])]),t._v(" "),n("li",[n("p",[t._v("특히 라즈베피파이에서는 사용중인 GPIO 직렬 콘솔을 중지하여야 합니다.")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" raspi-config\n")])])]),n("p",[t._v("표시된 메뉴에서 "),n("strong",[t._v("인터페이스 옵션 > 직렬")]),t._v("로 이동합니다. *시리얼을 통해 로그인 셸에 액세스하시겠습니까?*에 대해 "),n("strong",[t._v("아니요")]),t._v("를 선택합니다. 확인후 재부팅하십시오.")])]),t._v(" "),n("li",[n("p",[t._v("커널에서 UART를 확인합니다.")]),t._v(" "),n("div",{staticClass:"language-sh extra-class"},[n("pre",{pre:!0,attrs:{class:"language-sh"}},[n("code",[n("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),n("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" /boot/config.txt\n")])])]),n("p",[n("code",[t._v("enable_uart")]),t._v(" 값이 1로 설정되어 있는지 확인합니다.")]),t._v(" "),n("div",{staticClass:"language- extra-class"},[n("pre",{pre:!0,attrs:{class:"language-text"}},[n("code",[t._v(" enable_uart=1\n")])])])])]),t._v(" "),n("h2",{attrs:{id:"유용한-리소스"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#유용한-리소스"}},[t._v("#")]),t._v(" 유용한 리소스")]),t._v(" "),n("ul",[n("li",[n("RouterLink",{attrs:{to:"/ko/dev_setup/fast-dds-installation.html"}},[t._v("Fast DDS Installation")])],1),t._v(" "),n("li",[n("RouterLink",{attrs:{to:"/ko/middleware/micrortps_manual_code_generation.html"}},[t._v("Manually Generate Client and Agent Code")])],1)])])}),[],!1,null,null,null);s.default=e.exports}}]);