๋๋ ์ด๋ฆฐ ๊ณต๊ฐ์ ๋๋ก ์ ๋์๊ณ pixhawk์ led๊ฐ ๋
น์์
๋๋ค.
์ด ์ฝ๋๋ฅผ ์คํํ ํ
roslaunch mavros px4.launch
๊ทธ๋ฆฌ๊ณ ๋์ ๋๋ ๋ฌ๋ฆฐ๋ค
rostopic echo -n1 /diagnostics
๋๋ ๊ทธ๊ฒ์ ๋ฐ๊ฒฌํ๋ค
name: "mavros: GPS"
message: "No satellites"
hardware_id: "/dev/ttyUSB0:57600"
values:
-
key: "Satellites visible"
value: "0"
๊ทธ๋ฌ๋ qgroundcontrol์ ์ฐ๊ฒฐํ๊ณ ํ๋ก๊ทธ๋จ์ ์ข ๋ฃํ์ฌ mavros๋ฅผ ์คํํ๊ณ "/diagnostics"๋ฅผ ๋ค์ ํ์ธํ ํ GPS ์ผ๋ฅผ ์ฐพ์์ต๋๋ค.
level: 0
name: "mavros: GPS"
message: "3D fix"
hardware_id: "/dev/ttyUSB0:57600"
values:
-
key: "Satellites visible"
value: "16"
-
key: "Fix type"
value: "3"
QGC์ ์ฐ๊ฒฐํ์ง ์๊ณ GPS์์ ๊ฐ์ ์ป๊ณ ์ถ์ต๋๋ค. ์ด๋ป๊ฒ ํด์ผ ํ๋์?
๋ง๋ธ๋ก์ค: 0.25.1
ROS: ํค๋คํฑ
์ฐ๋ถํฌ: 16.04
PX4
๋ฒ์ : ์ต์
header:
seq: 327
stamp:
secs: 1527908144
nsecs: 63593259
frame_id: ''
status:
-
level: 0
name: "mavros: FCU connection"
message: "connected"
hardware_id: "/dev/ttyUSB0:57600"
values:
-
key: "Received packets:"
value: "5340"
-
key: "Dropped packets:"
value: "0"
-
key: "Buffer overruns:"
value: "0"
-
key: "Parse errors:"
value: "0"
-
key: "Rx sequence number:"
value: "240"
-
key: "Tx sequence number:"
value: "141"
-
key: "Rx total bytes:"
value: "132922"
-
key: "Tx total bytes:"
value: "133365"
-
key: "Rx speed:"
value: "305.000000"
-
key: "Tx speed:"
value: "320.000000"
-
level: 2
name: "mavros: GPS"
message: "No satellites"
hardware_id: "/dev/ttyUSB0:57600"
values:
-
key: "Satellites visible"
value: "0"
-
key: "Fix type"
value: "0"
-
key: "EPH (m)"
value: "Unknown"
-
key: "EPV (m)"
value: "Unknown"
-
level: 0
name: "mavros: Heartbeat"
message: "Normal"
hardware_id: "/dev/ttyUSB0:57600"
values:
-
key: "Heartbeats since startup"
value: "415"
-
key: "Frequency (Hz)"
value: "0.960080"
-
key: "Vehicle type"
value: "Quadrotor"
-
key: "Autopilot type"
value: "ArduPilotMega / ArduCopter"
-
key: "Mode"
value: "STABILIZE"
-
key: "System status"
value: "Standby"
-
level: 0
name: "mavros: System"
message: "Normal"
hardware_id: "/dev/ttyUSB0:57600"
values:
-
key: "Sensor present"
value: "0x00000000"
-
key: "Sensor enabled"
value: "0x00000000"
-
key: "Sensor helth"
value: "0x00000000"
-
key: "CPU Load (%)"
value: "0.0"
-
key: "Drop rate (%)"
value: "0.0"
-
key: "Errors comm"
value: "0"
-
key: "Errors count #1"
value: "0"
-
key: "Errors count #2"
value: "0"
-
key: "Errors count #3"
value: "0"
-
key: "Errors count #4"
value: "0"
-
level: 2
name: "mavros: Battery"
message: "No data"
hardware_id: "/dev/ttyUSB0:57600"
values:
-
key: "Voltage"
value: "-1.00"
-
key: "Current"
value: "0.0"
-
key: "Remaining"
value: "0.0"
-
level: 2
name: "mavros: Time Sync"
message: "No events recorded."
hardware_id: "/dev/ttyUSB0:57600"
values:
-
key: "Timesyncs since startup"
value: "0"
-
key: "Frequency (Hz)"
value: "0.000000"
-
key: "Last dt (ms)"
value: "3.333722"
-
key: "Mean dt (ms)"
value: "0.000000"
-
key: "Last system time (s)"
value: "916.671332000"
-
key: "Time offset (s)"
value: "1527907227.282750130"
OK. I got messages from 1:1.
---
Received 165 messages, from 1 addresses
sys:comp list of messages
1:1 0, 111
๊ทธ๋ฌ๋ qgroundcontrol์ ์ฐ๊ฒฐํ๊ณ ํ๋ก๊ทธ๋จ์ ์ข ๋ฃํ์ฌ mavros๋ฅผ ์คํํ๊ณ "/diagnostics"๋ฅผ ๋ค์ ํ์ธํ ํ GPS ์ผ๋ฅผ ์ฐพ์์ต๋๋ค.
์ข ์ด์ํ๋ค์. QGC๋ฅผ ์์ํ๊ณ ์ข ๋ฃํ๋ฉด GPS ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ต๋๋ค. ์ฐ์ฐ์ ์ผ์น์ธ ๊ฒ ๊ฐ์ต๋๋ค. ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ค๊ธฐ ์ํด ์ถฉ๋ถํ ์ค๋ ๊ธฐ๋ค๋ฆฌ์ง ์์์ต๋๊น? ๋ํ QGC๋ GCS๋ก์ UDP ์ ๋ฌ์ ํ์ฑํํ์ง ์๋ ํ MAVROS๊ฐ ์ง๋ ฌ ํฌํธ๋ฅผ ์ ์ดํ๋ โโ์๋ ์กฐ์ข ์ฅ์น์์ ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ ธ์ค์ง ์์ต๋๋ค.
๋น์ ์ ์๋ต์ ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค. 10๋ฒ ์ด์ ํ ์คํธ๋ฅผ ํ๊ธฐ ๋๋ฌธ์ ํ์ ํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ ๋งค๋ฒ ๊ฑฐ์ 20๋ถ ์ ๋ ๊ธฐ๋ค๋ฆฌ์ธ์. ํน์ ์ ๊ฐ M8P๋ฅผ ์ฌ์ฉํ๊ณ ์์๋ ๊ฑธ๊น์? ํ์ง๋ง ๋ฒ ์ด์ค(rtk)์ ์ฐ๊ฒฐํ์ง ์์์ต๋๋ค. ๋ฒ ์ด์ค์ ์ฐ๊ฒฐํ์ง ์์ผ๋ฉด ์ผ๋ฐ GPS์ฒ๋ผ ์๋ํฉ๋๊น?
ํ์คํ์ง ์์ง๋ง ์ผ๋ฐ GPS๋ก ํด๋ฐฑํ๋ ๊ฒ์ด ๋
ผ๋ฆฌ์ ์ผ๋ก ๋ณด์
๋๋ค.
๋ ๊ฐ์ง๊ฐ ๊ฐ๋ฅํฉ๋๋ค.
rosrun mavros mavsys rate --all 10
์๋ํ์ญ์์ค. ๋์์ด ๋๋ค๋ฉด ์คํธ๋ฆผ ์๋ ๋งค๊ฐ๋ณ์๋ฅผ ๊ตฌ์ฑํด์ผ ํฉ๋๋ค.@vooon ์ค, ์ผ์ด๊ตฐ์.
์ ๋ง ๊ฐ์ฌํฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
ํ์คํ์ง ์์ง๋ง ์ผ๋ฐ GPS๋ก ํด๋ฐฑํ๋ ๊ฒ์ด ๋ ผ๋ฆฌ์ ์ผ๋ก ๋ณด์ ๋๋ค.
๋ ๊ฐ์ง๊ฐ ๊ฐ๋ฅํฉ๋๋ค.
์ด ๊ฒฝ์ฐ
rosrun mavros mavsys rate --all 10
์๋ํ์ญ์์ค. ๋์์ด ๋๋ค๋ฉด ์คํธ๋ฆผ ์๋ ๋งค๊ฐ๋ณ์๋ฅผ ๊ตฌ์ฑํด์ผ ํฉ๋๋ค.