# external position with PX4

**URL:** <https://discuss.px4.io/t/external-position-with-px4/12205>\
**Category:** PX4 Autopilot\
**Created:** [July 30, 2019, 7:26am UTC](https://discuss.px4.io/t/external-position-with-px4/12205 "2019-07-30T07:26:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pil\_Eun\_Kim](https://discuss.px4.io/user_avatar/discuss.px4.io/pil_eun_kim/32/4307_2.png) [@Pil\_Eun\_Kim](https://discuss.px4.io/u/Pil_Eun_Kim)\
**Post date:** [July 30, 2019, 7:26am UTC](https://discuss.px4.io/t/external-position-with-px4/12205/1 "2019-07-30T07:26:03Z")

</div>

Hey guys

I am a newbie in Pixhawk and Ardupilot.  
In these days, I tried to apply 3d mapping on a drone using small lidar.  
But I stuck at some point and want to get some help from you guys expert in the drone.  
I am working on an autonomous indoor drone for 3D mapping with small lidar and Pixhawk in offboard mode with PX4 firmware.  
As you know, GPS is not working for an indoor environment.  
So, I made the internal sensors such as GPS, magnetic, and compass to disable and tried to use external position estimation by using small lidar and hector slam algorithm instead of internal sensors.  
Also, there is a Raspberry Pi as a companion computer to process lidar data and compute localization, which communicates with Pixhawk via Mavros.  
The localization (current position) data is published in “/mavros/local\_position/pose”. I wrote a code to send the desired position to pixhawk, which is published in “/mavros/setposition/local”.  
I launched all the required software and tested whether the drone took off and moved to the desired position autonomously.  
I verified the sensor and localization data was good. Also, there was no problem in the communication between Pixhawk and Raspberry Pi and the drone flight mode was changed to offboard mode, however, it didn’t take off.  
In my opinion, the way I publish the localization data could make this problem. However, I have no idea to solve it.  
Please let me know if there is something wrong in my way or if you have any idea.  
Thanks for your time to read it.

---

<div class="post-metadata">

**Author:** ![hsu-ret](https://discuss.px4.io/letter_avatar_proxy/v4/letter/h/258eb7/32.png) [@hsu-ret](https://discuss.px4.io/u/hsu-ret)\
**Post date:** [July 30, 2019, 8:05am UTC](https://discuss.px4.io/t/external-position-with-px4/12205/2 "2019-07-30T08:05:29Z")

</div>

I think it woul help if you share some more Information like Code or logs…

Right now I would guess you maybe forgot to implement an arm command to your offboard Code?  
Have you tried a Manual takeoff and for example trying to enter POSCTL mode?

---

<div class="post-metadata">

**Author:** ![Jaeyoung-Lim](https://discuss.px4.io/user_avatar/discuss.px4.io/jaeyoung-lim/32/10829_2.png) [@Jaeyoung-Lim](https://discuss.px4.io/u/Jaeyoung-Lim)\
**Post date:** [July 30, 2019, 9:02am UTC](https://discuss.px4.io/t/external-position-with-px4/12205/3 "2019-07-30T09:02:09Z")

</div>

@Pil_Eun_Kim What is your `EKF2_AID_MASK`?

---

<div class="post-metadata">

**Author:** ![Pil\_Eun\_Kim](https://discuss.px4.io/user_avatar/discuss.px4.io/pil_eun_kim/32/4307_2.png) [@Pil\_Eun\_Kim](https://discuss.px4.io/u/Pil_Eun_Kim)\
**Post date:** [August 2, 2019, 8:59pm UTC](https://discuss.px4.io/t/external-position-with-px4/12205/4 "2019-08-02T20:59:40Z")

</div>

@hsu-ret Thanks for you comment.  
I implemented the command to enter offboard mode and arming.  
Also, I verified it armed and entered offboard mode.  
What is POSCTL mode?

I used the same code for offboard code in the tutorial -\> [https://dev.px4.io/v1.9.0/en/ros/mavros\_offboard.html](https://dev.px4.io/v1.9.0/en/ros/mavros_offboard.html)  
I attached my log as following for reference.

* * *

SUMMARY

========

CLEAR PARAMETERS

- /mavros/

PARAMETERS

- /hector\_mapping/advertise\_map\_service: True

- /hector\_mapping/base\_frame: base\_link

- /hector\_mapping/laser\_z\_max\_value: 1.0

- /hector\_mapping/laser\_z\_min\_value: -1.0

- /hector\_mapping/map\_frame: map

- /hector\_mapping/map\_multi\_res\_levels: 2

- /hector\_mapping/map\_resolution: 0.1

- /hector\_mapping/map\_size: 2048

- /hector\_mapping/map\_start\_x: 0.5

- /hector\_mapping/map\_start\_y: 0.5

- /hector\_mapping/map\_update\_angle\_thresh: 0.06

- /hector\_mapping/map\_update\_distance\_thresh: 0.4

- /hector\_mapping/odom\_frame: base\_link

- /hector\_mapping/pub\_map\_odom\_transform: True

- /hector\_mapping/scan\_subscriber\_queue\_size: 5

- /hector\_mapping/scan\_topic: scan

- /hector\_mapping/tf\_map\_scanmatch\_transform\_frame\_name: scanmatcher\_frame

- /hector\_mapping/update\_factor\_free: 0.4

- /hector\_mapping/update\_factor\_occupied: 0.9

- /hector\_mapping/use\_tf\_pose\_start\_estimate: False

- /hector\_mapping/use\_tf\_scan\_transformation: True

- /imu\_attitude\_to\_tf\_node/base\_frame: base\_footprint

- /imu\_attitude\_to\_tf\_node/base\_stabilized\_frame: base\_stabilized

- /mavros/cmd/use\_comp\_id\_system\_control: False

- /mavros/conn/heartbeat\_rate: 1.0

- /mavros/conn/system\_time\_rate: 1.0

- /mavros/conn/timeout: 10.0

- /mavros/conn/timesync\_rate: 10.0

- /mavros/distance\_sensor/hrlv\_ez4\_pub/field\_of\_view: 0.0

- /mavros/distance\_sensor/hrlv\_ez4\_pub/frame\_id: hrlv\_ez4\_sonar

- /mavros/distance\_sensor/hrlv\_ez4\_pub/id: 0

- /mavros/distance\_sensor/hrlv\_ez4\_pub/orientation: PITCH\_270

- /mavros/distance\_sensor/hrlv\_ez4\_pub/send\_tf: True

- /mavros/distance\_sensor/hrlv\_ez4\_pub/sensor\_position/x: 0.0

- /mavros/distance\_sensor/hrlv\_ez4\_pub/sensor\_position/y: 0.0

- /mavros/distance\_sensor/hrlv\_ez4\_pub/sensor\_position/z: -0.1

- /mavros/distance\_sensor/laser\_1\_sub/id: 3

- /mavros/distance\_sensor/laser\_1\_sub/orientation: PITCH\_270

- /mavros/distance\_sensor/laser\_1\_sub/subscriber: True

- /mavros/distance\_sensor/lidarlite\_pub/field\_of\_view: 0.0

- /mavros/distance\_sensor/lidarlite\_pub/frame\_id: lidarlite\_laser

- /mavros/distance\_sensor/lidarlite\_pub/id: 1

- /mavros/distance\_sensor/lidarlite\_pub/orientation: PITCH\_270

- /mavros/distance\_sensor/lidarlite\_pub/send\_tf: True

- /mavros/distance\_sensor/lidarlite\_pub/sensor\_position/x: 0.0

- /mavros/distance\_sensor/lidarlite\_pub/sensor\_position/y: 0.0

- /mavros/distance\_sensor/lidarlite\_pub/sensor\_position/z: -0.1

- /mavros/distance\_sensor/sonar\_1\_sub/id: 2

- /mavros/distance\_sensor/sonar\_1\_sub/orientation: PITCH\_270

- /mavros/distance\_sensor/sonar\_1\_sub/subscriber: True

- /mavros/fake\_gps/eph: 2.0

- /mavros/fake\_gps/epv: 2.0

- /mavros/fake\_gps/fix\_type: 3

- /mavros/fake\_gps/geo\_origin/alt: 408.0

- /mavros/fake\_gps/geo\_origin/lat: 47.3667

- /mavros/fake\_gps/geo\_origin/lon: 8.55

- /mavros/fake\_gps/gps\_rate: 5.0

- /mavros/fake\_gps/mocap\_transform: True

- /mavros/fake\_gps/satellites\_visible: 5

- /mavros/fake\_gps/tf/child\_frame\_id: fix

- /mavros/fake\_gps/tf/frame\_id: map

- /mavros/fake\_gps/tf/listen: False

- /mavros/fake\_gps/tf/rate\_limit: 10.0

- /mavros/fake\_gps/tf/send: False

- /mavros/fake\_gps/use\_mocap: True

- /mavros/fake\_gps/use\_vision: False

- /mavros/fcu\_protocol: v2.0

- /mavros/fcu\_url: /dev/ttyUSB2:57600

- /mavros/gcs\_url:

- /mavros/global\_position/child\_frame\_id: base\_link

- /mavros/global\_position/frame\_id: map

- /mavros/global\_position/gps\_uere: 1.0

- /mavros/global\_position/rot\_covariance: 99999.0

- /mavros/global\_position/tf/child\_frame\_id: base\_link

- /mavros/global\_position/tf/frame\_id: map

- /mavros/global\_position/tf/global\_frame\_id: earth

- /mavros/global\_position/tf/send: False

- /mavros/global\_position/use\_relative\_alt: True

- /mavros/image/frame\_id: px4flow

- /mavros/imu/angular\_velocity\_stdev: 0.000349065850399

- /mavros/imu/frame\_id: base\_link

- /mavros/imu/linear\_acceleration\_stdev: 0.0003

- /mavros/imu/magnetic\_stdev: 0.0

- /mavros/imu/orientation\_stdev: 1.0

- /mavros/local\_position/frame\_id: map

- /mavros/local\_position/tf/child\_frame\_id: base\_link

- /mavros/local\_position/tf/frame\_id: map

- /mavros/local\_position/tf/send: False

- /mavros/local\_position/tf/send\_fcu: False

- /mavros/mission/pull\_after\_gcs: True

- /mavros/mocap/use\_pose: True

- /mavros/mocap/use\_tf: False

- /mavros/odometry/in/child\_frame\_id: base\_link

- /mavros/odometry/in/frame\_id: odom

- /mavros/odometry/in/frame\_tf/body\_frame\_orientation: flu

- /mavros/odometry/in/frame\_tf/local\_frame: local\_origin\_ned

- /mavros/odometry/out/frame\_tf/body\_frame\_orientation: frd

- /mavros/odometry/out/frame\_tf/local\_frame: vision\_ned

- /mavros/plugin\_blacklist: [‘safety\_area’, '…

- /mavros/plugin\_whitelist: []

- /mavros/px4flow/frame\_id: px4flow

- /mavros/px4flow/ranger\_fov: 0.118682389136

- /mavros/px4flow/ranger\_max\_range: 5.0

- /mavros/px4flow/ranger\_min\_range: 0.3

- /mavros/safety\_area/p1/x: 1.0

- /mavros/safety\_area/p1/y: 1.0

- /mavros/safety\_area/p1/z: 1.0

- /mavros/safety\_area/p2/x: -1.0

- /mavros/safety\_area/p2/y: -1.0

- /mavros/safety\_area/p2/z: -1.0

- /mavros/setpoint\_accel/send\_force: False

- /mavros/setpoint\_attitude/reverse\_thrust: False

- /mavros/setpoint\_attitude/tf/child\_frame\_id: target\_attitude

- /mavros/setpoint\_attitude/tf/frame\_id: map

- /mavros/setpoint\_attitude/tf/listen: False

- /mavros/setpoint\_attitude/tf/rate\_limit: 50.0

- /mavros/setpoint\_attitude/use\_quaternion: False

- /mavros/setpoint\_position/mav\_frame: LOCAL\_NED

- /mavros/setpoint\_position/tf/child\_frame\_id: target\_position

- /mavros/setpoint\_position/tf/frame\_id: map

- /mavros/setpoint\_position/tf/listen: False

- /mavros/setpoint\_position/tf/rate\_limit: 50.0

- /mavros/setpoint\_raw/thrust\_scaling: 1.0

- /mavros/setpoint\_velocity/mav\_frame: LOCAL\_NED

- /mavros/startup\_px4\_usb\_quirk: True

- /mavros/sys/disable\_diag: False

- /mavros/sys/min\_voltage: 10.0

- /mavros/target\_component\_id: 1

- /mavros/target\_system\_id: 1

- /mavros/tdr\_radio/low\_rssi: 40

- /mavros/time/time\_ref\_source: fcu

- /mavros/time/timesync\_avg\_alpha: 0.6

- /mavros/time/timesync\_mode: MAVLINK

- /mavros/vibration/frame\_id: base\_link

- /mavros/vision\_pose/tf/child\_frame\_id: vision\_estimate

- /mavros/vision\_pose/tf/frame\_id: map

- /mavros/vision\_pose/tf/listen: False

- /mavros/vision\_pose/tf/rate\_limit: 10.0

- /mavros/vision\_speed/listen\_twist: True

- /mavros/vision\_speed/twist\_cov: True

- /mavros/wheel\_odometry/child\_frame\_id: base\_link

- /mavros/wheel\_odometry/count: 2

- /mavros/wheel\_odometry/frame\_id: map

- /mavros/wheel\_odometry/send\_raw: True

- /mavros/wheel\_odometry/send\_twist: False

- /mavros/wheel\_odometry/tf/child\_frame\_id: base\_link

- /mavros/wheel\_odometry/tf/frame\_id: map

- /mavros/wheel\_odometry/tf/send: True

- /mavros/wheel\_odometry/use\_rpm: False

- /mavros/wheel\_odometry/vel\_error: 0.1

- /mavros/wheel\_odometry/wheel0/radius: 0.05

- /mavros/wheel\_odometry/wheel0/x: 0.0

- /mavros/wheel\_odometry/wheel0/y: -0.15

- /mavros/wheel\_odometry/wheel1/radius: 0.05

- /mavros/wheel\_odometry/wheel1/x: 0.0

- /mavros/wheel\_odometry/wheel1/y: 0.15

- /rosdistro: kinetic

- /rosversion: 1.12.14

- /rplidarNode/angle\_compensate: True

- /rplidarNode/frame\_id: laser

- /rplidarNode/inverted: False

- /rplidarNode/scan\_mode: Sensitivity

- /rplidarNode/scan\_name: /scan

- /rplidarNode/serial\_baudrate: 256000

- /rplidarNode/serial\_port: /dev/ttyUSB0

- /rplidarNode\_v/angle\_compensate: True

- /rplidarNode\_v/frame\_id: laser\_v

- /rplidarNode\_v/inverted: False

- /rplidarNode\_v/scan\_mode: Sensitivity

- /rplidarNode\_v/scan\_name: /scan\_v

- /rplidarNode\_v/serial\_baudrate: 256000

- /rplidarNode\_v/serial\_port: /dev/ttyUSB1

NODES

/

base\_to\_laser\_broadcaster (tf/static\_transform\_publisher)

generate\_topics (rplidar\_ros/generate\_topics.py)

hector\_mapping (hector\_mapping/hector\_mapping)

imu\_attitude\_to\_tf\_node (hector\_imu\_attitude\_to\_tf/imu\_attitude\_to\_tf\_node)

laser\_broadcaster1 (tf/static\_transform\_publisher)

laser\_broadcaster2 (tf/static\_transform\_publisher)

laser\_broadcaster3 (tf/static\_transform\_publisher)

mavros (mavros/mavros\_node)

rplidarNode (rplidar\_ros/rplidarNode)

rplidarNode\_v (rplidar\_ros/rplidarNode)

auto-starting new master

process[master]: started with pid [1971]

ROS\_MASTER\_URI=http://localhost:11311

setting /run\_id to 176f6190-b564-11e9-8580-b827eb162589

process[rosout-1]: started with pid [1984]

started core service [/rosout]

process[rplidarNode-2]: started with pid [2002]

process[rplidarNode\_v-3]: started with pid [2003]

process[hector\_mapping-4]: started with pid [2015]

process[base\_to\_laser\_broadcaster-5]: started with pid [2032]

process[mavros-6]: started with pid [2042]

[INFO] [1564777716.331294931]: RPLIDAR running on ROS package rplidar\_ros. SDK Version:1.10.0

process[generate\_topics-7]: started with pid [2053]

process[laser\_broadcaster1-8]: started with pid [2068]

[INFO] [1564777716.451790689]: RPLIDAR running on ROS package rplidar\_ros. SDK Version:1.10.0

process[laser\_broadcaster2-9]: started with pid [2087]

process[laser\_broadcaster3-10]: started with pid [2094]

process[imu\_attitude\_to\_tf\_node-11]: started with pid [2109]

RPLIDAR S/N: F98D9AF2C1EA9FC0BEEB9CF3765E3200

[INFO] [1564777716.854759330]: Firmware Ver: 1.25

[INFO] [1564777716.854902250]: Hardware Rev: 6

[INFO] [1564777716.857746649]: RPLidar health status : 0

RPLIDAR S/N: 92889AF0C5E29DD2B6E39DF5115B3116

[INFO] [1564777716.973520876]: Firmware Ver: 1.27

[INFO] [1564777716.973674734]: Hardware Rev: 6

[INFO] [1564777716.976645959]: RPLidar health status : 0

HectorSM map lvl 0: cellLength: 0.1 res x:2048 res y: 2048

HectorSM map lvl 1: cellLength: 0.2 res x:1024 res y: 1024

[INFO] [1564777717.454586623]: HectorSM p\_base\_frame\_: base\_link

[INFO] [1564777717.455374559]: HectorSM p\_map\_frame\_: map

[INFO] [1564777717.455520969]: HectorSM p\_odom\_frame\_: base\_link

[INFO] [1564777717.455601075]: HectorSM p\_scan\_topic\_: scan

[INFO] [1564777717.455817383]: HectorSM p\_use\_tf\_scan\_transformation\_: true

[INFO] [1564777717.455902697]: HectorSM p\_pub\_map\_odom\_transform\_: true

[INFO] [1564777717.455978428]: HectorSM p\_scan\_subscriber\_queue\_size\_: 5

[INFO] [1564777717.456065930]: HectorSM p\_map\_pub\_period\_: 2.000000

[INFO] [1564777717.456138693]: HectorSM p\_update\_factor\_free\_: 0.400000

[INFO] [1564777717.456218122]: HectorSM p\_update\_factor\_occupied\_: 0.900000

[INFO] [1564777717.456310207]: HectorSM p\_map\_update\_distance\_threshold\_: 0.400000

[INFO] [1564777717.456391459]: HectorSM p\_map\_update\_angle\_threshold\_: 0.060000

[INFO] [1564777717.456460784]: HectorSM p\_laser\_z\_min\_value\_: -1.000000

[INFO] [1564777717.456527609]: HectorSM p\_laser\_z\_max\_value\_: 1.000000

[INFO] [1564777717.581874642]: current scan mode: Sensitivity, max\_distance: 25.0 m, Point number: 15.9K , angle\_compensate: 2

[INFO] [1564777717.696761363]: current scan mode: Sensitivity, max\_distance: 25.0 m, Point number: 15.9K , angle\_compensate: 2

[INFO] [1564777718.063548227]: FCU URL: /dev/ttyUSB2:57600

[INFO] [1564777718.084321837]: serial0: device: /dev/ttyUSB2 @ 57600 bps

[INFO] [1564777718.089434509]: GCS bridge disabled

[INFO] [1564777718.312595041]: Plugin 3dr\_radio loaded

[INFO] [1564777718.326447969]: Plugin 3dr\_radio initialized

[INFO] [1564777718.327004336]: Plugin actuator\_control loaded

[INFO] [1564777718.369016621]: Plugin actuator\_control initialized

[INFO] [1564777718.449981432]: Plugin adsb loaded

[INFO] [1564777718.493387864]: Plugin adsb initialized

[INFO] [1564777718.494143246]: Plugin altitude loaded

[INFO] [1564777718.502350157]: Plugin altitude initialized

[INFO] [1564777718.503397212]: Plugin cam\_imu\_sync loaded

[INFO] [1564777718.510859366]: Plugin cam\_imu\_sync initialized

[INFO] [1564777718.511683135]: Plugin command loaded

[INFO] [1564777718.582857977]: Plugin command initialized

[INFO] [1564777718.585145166]: Plugin companion\_process\_status loaded

[INFO] [1564777718.616295634]: Plugin companion\_process\_status initialized

[INFO] [1564777718.617271386]: Plugin debug\_value loaded

[INFO] [1564777718.678060568]: Plugin debug\_value initialized

[INFO] [1564777718.678908401]: Plugin distance\_sensor blacklisted

[INFO] [1564777718.679926185]: Plugin fake\_gps loaded

[INFO] [1564777718.850327671]: Plugin fake\_gps initialized

[INFO] [1564777718.852614026]: Plugin ftp loaded

[INFO] [1564777718.934649122]: Plugin ftp initialized

[INFO] [1564777718.935725814]: Plugin global\_position loaded

[INFO] [1564777719.109563676]: Plugin global\_position initialized

[INFO] [1564777719.110373225]: Plugin gps\_rtk loaded

[INFO] [1564777719.136194104]: Plugin gps\_rtk initialized

[INFO] [1564777719.137760857]: Plugin hil loaded

[INFO] [1564777719.302694162]: Plugin hil initialized

[INFO] [1564777719.304475294]: Plugin home\_position loaded

[INFO] [1564777719.354373055]: Plugin home\_position initialized

[INFO] [1564777719.355765794]: Plugin imu loaded

[INFO] [1564777719.454997814]: Plugin imu initialized

[INFO] [1564777719.455970752]: Plugin local\_position loaded

[INFO] [1564777719.532553629]: Plugin local\_position initialized

[INFO] [1564777719.533376668]: Plugin log\_transfer loaded

[INFO] [1564777719.579582785]: Plugin log\_transfer initialized

[INFO] [1564777719.580640413]: Plugin manual\_control loaded

[INFO] [1564777719.642596355]: Plugin manual\_control initialized

[INFO] [1564777719.643338402]: Plugin mocap\_pose\_estimate loaded

[INFO] [1564777719.709174533]: Plugin mocap\_pose\_estimate initialized

[INFO] [1564777719.709785640]: Plugin obstacle\_distance loaded

[INFO] [1564777719.741933950]: Plugin obstacle\_distance initialized

[INFO] [1564777719.743230020]: Plugin odom loaded

[INFO] [1564777719.839791512]: Plugin odom initialized

[INFO] [1564777719.840578404]: Plugin param loaded

[INFO] [1564777719.890238868]: Plugin param initialized

[INFO] [1564777719.891066699]: Plugin px4flow loaded

[INFO] [1564777719.992525903]: Plugin px4flow initialized

[INFO] [1564777719.992890286]: Plugin rangefinder blacklisted

[INFO] [1564777719.995770870]: Plugin rc\_io loaded

[INFO] [1564777720.045710284]: Plugin rc\_io initialized

[INFO] [1564777720.045947736]: Plugin safety\_area blacklisted

[INFO] [1564777720.046728690]: Plugin setpoint\_accel loaded

[INFO] [1564777720.092944848]: Plugin setpoint\_accel initialized

[INFO] [1564777720.093976068]: Plugin setpoint\_attitude loaded

[INFO] [1564777720.227219692]: Plugin setpoint\_attitude initialized

[INFO] [1564777720.229520312]: Plugin setpoint\_position loaded

[INFO] [1564777720.424783701]: Plugin setpoint\_position initialized

[INFO] [1564777720.426114875]: Plugin setpoint\_raw loaded

[INFO] [1564777720.562319550]: Plugin setpoint\_raw initialized

[INFO] [1564777720.564479490]: Plugin setpoint\_velocity loaded

[INFO] [1564777720.646402111]: Plugin setpoint\_velocity initialized

[INFO] [1564777720.647419528]: Plugin sys\_status loaded

[INFO] [1564777720.764236825]: Plugin sys\_status initialized

[INFO] [1564777720.765705710]: Plugin sys\_time loaded

[INFO] [1564777720.847508381]: TM: Timesync mode: MAVLINK

[INFO] [1564777720.876621219]: Plugin sys\_time initialized

[INFO] [1564777720.878774128]: Plugin trajectory loaded

[INFO] [1564777720.988444091]: Plugin trajectory initialized

[INFO] [1564777720.989691044]: Plugin vfr\_hud loaded

[INFO] [1564777720.999390201]: Plugin vfr\_hud initialized

[INFO] [1564777720.999591299]: Plugin vibration blacklisted

[INFO] [1564777721.000640383]: Plugin vision\_pose\_estimate loaded

[INFO] [1564777721.152630702]: Plugin vision\_pose\_estimate initialized

[INFO] [1564777721.154552561]: Plugin vision\_speed\_estimate loaded

[INFO] [1564777721.227410789]: Plugin vision\_speed\_estimate initialized

[INFO] [1564777721.228701282]: Plugin waypoint loaded

[INFO] [1564777721.305171714]: Plugin waypoint initialized

[INFO] [1564777721.305574326]: Plugin wheel\_odometry blacklisted

[INFO] [1564777721.307387278]: Plugin wind\_estimation loaded

[INFO] [1564777721.312024450]: Plugin wind\_estimation initialized

[INFO] [1564777721.312452792]: Autostarting mavlink via USB on PX4

[INFO] [1564777721.312875665]: Built-in SIMD instructions: None

[INFO] [1564777721.313282079]: Built-in MAVLink package version: 2019.3.3

[INFO] [1564777721.313584585]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta

[INFO] [1564777721.313841673]: MAVROS started. MY ID 1.240, TARGET ID 1.1

[INFO] [1564777721.436847898]: IMU: Attitude quaternion IMU detected!

[INFO] [1564777721.457883043]: IMU: High resolution IMU detected!

[INFO] [1564777721.476037872]: RC\_CHANNELS message detected!

[ERROR] [1564777721.710320199]: FCU: Onboard controller lost

[WARN] [1564777721.732713079]: TM : RTT too high for timesync: 16.41 ms.

[INFO] [1564777722.139020787]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot

[INFO] [1564777722.213430985]: FCU: Onboard controller regained

[INFO] [1564777722.221339409]: IMU: Attitude quaternion IMU detected!

[INFO] [1564777722.234291675]: IMU: High resolution IMU detected!

[WARN] [1564777722.327128508]: TM : RTT too high for timesync: 11.04 ms.

[INFO] [1564777722.443569571]: RC\_CHANNELS message detected!

[WARN] [1564777722.933251543]: TM : RTT too high for timesync: 17.00 ms.

[INFO] [1564777723.200125309]: VER: 1.1: Capabilities 0x000000000000e4ef

[INFO] [1564777723.200563181]: VER: 1.1: Flight software: 010902ff (106905871d000000)

[INFO] [1564777723.200824436]: VER: 1.1: Middleware software: 010902ff (106905871d000000)

[INFO] [1564777723.201011835]: VER: 1.1: OS software: 071c00ff (423371c7d4012e72)

[INFO] [1564777723.201193608]: VER: 1.1: Board hardware: 00000011

[INFO] [1564777723.201361528]: VER: 1.1: VID/PID: 26ac:0011

[INFO] [1564777723.201527416]: VER: 1.1: UID: 3335510638343732

[WARN] [1564777723.204398559]: CMD: Unexpected command 520, result 0

[WARN] [1564777723.527365019]: TM : RTT too high for timesync: 11.17 ms.

[WARN] [1564777724.149974523]: TM : RTT too high for timesync: 34.19 ms.

[WARN] [1564777724.738090529]: TM : RTT too high for timesync: 22.04 ms.

[WARN] [1564777725.379486330]: TM : RTT too high for timesync: 63.87 ms.

[WARN] [1564777725.928656016]: TM : RTT too high for timesync: 12.08 ms.

[WARN] [1564777726.528229138]: TM : RTT too high for timesync: 12.01 ms.

[WARN] [1564777727.156721526]: TM : RTT too high for timesync: 40.19 ms.

[WARN] [1564777727.738050643]: TM : RTT too high for timesync: 22.27 ms.

[WARN] [1564777728.332099863]: TM : RTT too high for timesync: 15.87 ms.

[WARN] [1564777728.933144007]: TM : RTT too high for timesync: 16.89 ms.

[WARN] [1564777729.530796138]: TM : RTT too high for timesync: 15.25 ms.

[WARN] [1564777730.154745805]: TM : RTT too high for timesync: 38.63 ms.

[WARN] [1564777730.733345897]: TM : RTT too high for timesync: 17.19 ms.

[WARN] [1564777731.330074658]: TM : RTT too high for timesync: 14.52 ms.

[WARN] [1564777731.966062648]: TM : RTT too high for timesync: 49.84 ms.

[INFO] [1564777732.139770927]: HP: requesting home position

[WARN] [1564777733.026929053]: TM : RTT too high for timesync: 111.00 ms.

[WARN] [1564777734.021552461]: TM : RTT too high for timesync: 105.67 ms.

[WARN] [1564777735.031873464]: TM : RTT too high for timesync: 114.68 ms.

[INFO] [1564777737.249826672]: WP: mission received

[WARN] [1564777737.522706357]: TM : RTT too high for timesync: 106.21 ms.

[WARN] [1564777738.145270151]: TM : RTT too high for timesync: 28.77 ms.

[WARN] [1564777738.731590850]: TM : RTT too high for timesync: 15.96 ms.

[WARN] [1564777739.042888617]: PR: request param #13 timeout, retries left 2, and 177 params still missing

[WARN] [1564777739.330204517]: TM : RTT too high for timesync: 14.15 ms.

[WARN] [1564777739.946897559]: TM : RTT too high for timesync: 31.09 ms.

[WARN] [1564777740.536754090]: TM : RTT too high for timesync: 20.52 ms.

[WARN] [1564777741.154421381]: TM : RTT too high for timesync: 38.48 ms.

[WARN] [1564777741.727545304]: TM : RTT too high for timesync: 11.37 ms.

[INFO] [1564777742.140364424]: HP: requesting home position

[WARN] [1564777742.347694568]: TM : RTT too high for timesync: 32.05 ms.

[WARN] [1564777742.934898580]: TM : RTT too high for timesync: 18.67 ms.

[WARN] [1564777743.571477814]: TM : RTT too high for timesync: 55.63 ms.

[WARN] [1564777744.147792904]: TM : RTT too high for timesync: 32.28 ms.

[WARN] [1564777744.728674973]: TM : RTT too high for timesync: 12.50 ms.

[WARN] [1564777745.327254738]: TM : RTT too high for timesync: 11.14 ms.

[WARN] [1564777745.934633996]: TM : RTT too high for timesync: 18.28 ms.

[WARN] [1564777746.541795979]: TM : RTT too high for timesync: 25.27 ms.

[WARN] [1564777747.146358785]: TM : RTT too high for timesync: 30.10 ms.

[WARN] [1564777747.726981656]: TM : RTT too high for timesync: 10.82 ms.

[WARN] [1564777748.332054905]: TM : RTT too high for timesync: 15.06 ms.

[WARN] [1564777748.935562149]: TM : RTT too high for timesync: 19.49 ms.

[WARN] [1564777749.531848215]: TM : RTT too high for timesync: 15.40 ms.

[WARN] [1564777750.181364973]: TM : RTT too high for timesync: 65.36 ms.

[WARN] [1564777750.727390238]: TM : RTT too high for timesync: 10.99 ms.

[WARN] [1564777751.095472874]: CMD: Unexpected command 176, result 0

[WARN] [1564777751.328212739]: TM : RTT too high for timesync: 11.88 ms.

[WARN] [1564777751.927529040]: TM : RTT too high for timesync: 11.30 ms.

[INFO] [1564777752.139976950]: HP: requesting home position

[WARN] [1564777752.532233389]: TM : RTT too high for timesync: 16.36 ms.

[WARN] [1564777753.155866029]: TM : RTT too high for timesync: 39.79 ms.

[WARN] [1564777753.734142181]: TM : RTT too high for timesync: 17.75 ms.

[WARN] [1564777754.332607341]: TM : RTT too high for timesync: 16.62 ms.

[WARN] [1564777754.927848392]: TM : RTT too high for timesync: 11.95 ms.

[WARN] [1564777755.531788293]: TM : RTT too high for timesync: 15.51 ms.

[WARN] [1564777756.146914958]: TM : RTT too high for timesync: 30.55 ms.

[INFO] [1564777756.173599699]: FCU: ARMED by Arm/Disarm component command

[INFO] [1564777756.637693602]: FCU: [logger] file: /fs/microsd/log/2019-08-02/20\_06\_2

[WARN] [1564777756.778048364]: TM : RTT too high for timesync: 61.71 ms.

[WARN] [1564777757.334000274]: TM : RTT too high for timesync: 16.45 ms.

[WARN] [1564777757.928861761]: TM : RTT too high for timesync: 12.77 ms.

[WARN] [1564777758.528735748]: TM : RTT too high for timesync: 12.30 ms.

[WARN] [1564777759.154511837]: TM : RTT too high for timesync: 38.25 ms.

[WARN] [1564777759.745152765]: TM : RTT too high for timesync: 28.81 ms.

[WARN] [1564777760.331361619]: TM : RTT too high for timesync: 12.37 ms.

[WARN] [1564777760.938155896]: TM : RTT too high for timesync: 22.30 ms.

[WARN] [1564777761.221918763]: CMD: Unexpected command 176, result 0

[WARN] [1564777761.532104007]: TM : RTT too high for timesync: 15.59 ms.

[INFO] [1564777762.139514454]: HP: requesting home position

[WARN] [1564777762.152448926]: TM : RTT too high for timesync: 36.21 ms.

[WARN] [1564777762.737239105]: TM : RTT too high for timesync: 21.00 ms.

[WARN] [1564777763.360307428]: TM : RTT too high for timesync: 42.71 ms.

[WARN] [1564777763.973852601]: TM : RTT too high for timesync: 57.47 ms.

[WARN] [1564777764.530050982]: TM : RTT too high for timesync: 14.20 ms.

[WARN] [1564777765.145395639]: TM : RTT too high for timesync: 29.09 ms.

[WARN] [1564777765.728605983]: TM : RTT too high for timesync: 12.59 ms.

[WARN] [1564777766.335902680]: TM : RTT too high for timesync: 19.87 ms.

[WARN] [1564777766.928646255]: TM : RTT too high for timesync: 12.81 ms.

[WARN] [1564777767.528712243]: TM : RTT too high for timesync: 12.58 ms.

[WARN] [1564777768.145697547]: TM : RTT too high for timesync: 29.59 ms.

[WARN] [1564777768.738904571]: TM : RTT too high for timesync: 15.52 ms.

[WARN] [1564777769.350098265]: TM : RTT too high for timesync: 32.85 ms.

[WARN] [1564777769.955618332]: TM : RTT too high for timesync: 39.56 ms.

[WARN] [1564777770.567320807]: TM : RTT too high for timesync: 50.91 ms.

[WARN] [1564777771.145633059]: TM : RTT too high for timesync: 29.71 ms.

[WARN] [1564777771.321845291]: CMD: Unexpected command 176, result 0

[WARN] [1564777771.727419658]: TM : RTT too high for timesync: 11.87 ms.

[INFO] [1564777772.141098803]: HP: requesting home position

[WARN] [1564777772.329776893]: TM : RTT too high for timesync: 10.94 ms.

[WARN] [1564777772.931911664]: TM : RTT too high for timesync: 15.46 ms.

[WARN] [1564777773.534309102]: TM : RTT too high for timesync: 18.79 ms.

^C[imu\_attitude\_to\_tf\_node-11] killing on exit

[laser\_broadcaster3-10] killing on exit

[mavros-6] killing on exit

[laser\_broadcaster1-8] killing on exit

[laser\_broadcaster2-9] killing on exit

[base\_to\_laser\_broadcaster-5] killing on exit

[hector\_mapping-4] killing on exit

[rplidarNode\_v-3] killing on exit

[generate\_topics-7] killing on exit

[rplidarNode-2] killing on exit

Debug: mavconn: serial0: recv: v2.0 OK Message-Id: 30 [28 bytes] IDs: 1.1 Seq: 219

[rosout-1] killing on exit

[master] killing on exit

shutting down processing monitor…

… shutting down processing monitor complete

done

---

<div class="post-metadata">

**Author:** ![Pil\_Eun\_Kim](https://discuss.px4.io/user_avatar/discuss.px4.io/pil_eun_kim/32/4307_2.png) [@Pil\_Eun\_Kim](https://discuss.px4.io/u/Pil_Eun_Kim)\
**Post date:** [August 2, 2019, 9:07pm UTC](https://discuss.px4.io/t/external-position-with-px4/12205/5 "2019-08-02T21:07:37Z")

</div>

@Jaeyoung-Lim Thanks for your comment.  
EKF2\_AID\_MASK is 0 for my system, which means “No GPS”.  
This is because I want to use an external position system not GPS.  
I wonder whether PX4 receive data from companion computer through Mavros or not.  
If it is possible, what Mavros topic should I have to use?

---

<div class="post-metadata">

**Author:** ![Jaeyoung-Lim](https://discuss.px4.io/user_avatar/discuss.px4.io/jaeyoung-lim/32/10829_2.png) [@Jaeyoung-Lim](https://discuss.px4.io/u/Jaeyoung-Lim)\
**Post date:** [August 3, 2019, 12:39am UTC](https://discuss.px4.io/t/external-position-with-px4/12205/6 "2019-08-03T00:39:18Z")

</div>

@Pil_Eun_Kim You will need to configure your `EKF2_AID_MASK` properly in order to fuse your external vision estimates to the EKF. I don’t remember from the top of my head, but it should be something like 24.

For the topics, you can look at the [mavros\_extras](http://wiki.ros.org/mavros_extras) wiki

---

<div class="post-metadata">

**Author:** ![hsu-ret](https://discuss.px4.io/letter_avatar_proxy/v4/letter/h/258eb7/32.png) [@hsu-ret](https://discuss.px4.io/u/hsu-ret)\
**Post date:** [August 5, 2019, 7:30am UTC](https://discuss.px4.io/t/external-position-with-px4/12205/7 "2019-08-05T07:30:33Z")

</div>

yeah EKF\_AID\_MASK=24 means Vision\_estimation for Position and orientation… this should work with your Hector\_slam I guess… what kind of rostopic is the slam output?  
Is it a **geometry\_msg/pose\_stamped**? Than you should be fine if you publish your slam on **mavros/Vision\_pose/pose** - the internal EKF2 will handle the Position estimation based upon this and will gibe you an **OUTPUT on mavros/local\_position/pose** --\> please check if this pose is what you would expect based on your slam algorithm.

When this estimation is correct you can take of and switch to POSCTL=PositionMode  
and test how it behaves… if everything is working as it should you can gon on with your offboard Mission.  
Than you would need to publish your target location via **/mavros/setposition/local**.  
I would suggest to search Abit in the Forum About how to set up the slam and have a look on the wiki here [https://dev.px4.io/master/en/ros/external\_position\_estimation.html](https://dev.px4.io/master/en/ros/external_position_estimation.html)

**POSCTL** (Position Control)

- **Fixed wing aircraft:** Neutral inputs (centered RC sticks) give level flight and it will crab against the wind if needed to maintain a straight line.
- **Multirotors** Roll controls left-right speed, pitch controls front-back speed over ground. Yaw controls yaw rate as in MANUAL mode. Throttle controls climb/descent rate as in ALTCTL mode. This means that the x, y, z position of the vehicle is held steady by the autopilot against any wind disturbances, when the roll, pitch and throttle sticks are centered.
