external position with PX4

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.

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?

@Pil_Eun_Kim What is your EKF2_AID_MASK?

@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
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

@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?

@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 wiki

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

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.