I'm trying to launch PX4 sitl with a custom simulator via mavros and connect via QGC all on the same linux machine.
I tried the following:
run px4 in ROS wrapper
run mavros node with fcu_url = udp://:14540@localhost:14557 and gcs_url = udp://@
run my own custom mavros node to which I send and receive sim data (HIL messages) and connect it using mavconninterface to px4 using tcp-l://:4560@localhost:4560.
I can send and receive the simulator data using my own custom mavros node via mavlink to PX4. However when I run QGC it doesn't load my parameters or vehicle. Although the vehicle seems to be connected.
Then I tried to run it as follows:
run px4 using make px4_sitl none_xxxx
run mavros node with fcu_url = udp://:14550@localhost:14556 and gcs_url = ""
run gcs_bridge with gcs_url = "udp://@localhost"
run my own mavros node using tcp-l://:4560@localhost:4560
Still, I can't seem to get QGC to work. I tried to set up the connection in QGC, but doesn't work. How can I connect this setup to QGC? I know I could also use other simulators (gazebo), but that is not the point as I try to connect a custom one. Thank you for helping!
auto-starting new master
process[master]: started with pid [31567]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 371bf72a-eb50-11e9-ae93-80ce62115750
process[rosout-1]: started with pid [31578]
started core service [/rosout]
process[sitl-2]: started with pid [31586]
INFO [px4] Creating symlink /home/anne/ROVER/catkin_ws/src/px4/ROMFS/px4fmu_common -> /home/anne/.ros/etc
0 WARNING: setRealtimeSched failed (not run as root?)
Issue details
I'm trying to launch PX4 sitl with a custom simulator via mavros and connect via QGC all on the same linux machine.
I tried the following:
I can send and receive the simulator data using my own custom mavros node via mavlink to PX4. However when I run QGC it doesn't load my parameters or vehicle. Although the vehicle seems to be connected.
Then I tried to run it as follows:
Still, I can't seem to get QGC to work. I tried to set up the connection in QGC, but doesn't work. How can I connect this setup to QGC? I know I could also use other simulators (gazebo), but that is not the point as I try to connect a custom one. Thank you for helping!
MAVROS version and platform
Mavros: v0.31.0 ROS: melodic Ubuntu: 18.04
Autopilot type and version
PX4: Version: v1.9.2
Node logs
SUMMARY
CLEAR PARAMETERS
PARAMETERS
NODES / mavros (mavros/mavros_node) sitl (px4/px4) sim_interface (mavros/sim_interface_node)
auto-starting new master process[master]: started with pid [31567] ROS_MASTER_URI=http://localhost:11311
setting /run_id to 371bf72a-eb50-11e9-ae93-80ce62115750 process[rosout-1]: started with pid [31578] started core service [/rosout] process[sitl-2]: started with pid [31586] INFO [px4] Creating symlink /home/anne/ROVER/catkin_ws/src/px4/ROMFS/px4fmu_common -> /home/anne/.ros/etc 0 WARNING: setRealtimeSched failed (not run as root?)
| \ \ \ / / / | | |/ / \ V / / /| | | / / \ / /_| | | | / /^\ \ __ | _| \/ \/ |/
px4 starting.
INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0 process[mavros-3]: started with pid [31599] process[sim_interface-4]: started with pid [31608] SYS_AUTOSTART: curr: 0 -> new: 1060 BAT_N_CELLS: curr: 0 -> new: 3 CAL_ACC0_ID: curr: 0 -> new: 1311244 CAL_ACC_PRIME: curr: 0 -> new: 1311244 CAL_GYRO0_ID: curr: 0 -> new: 2294028 CAL_GYRO_PRIME: curr: 0 -> new: 2294028 CAL_MAG0_ID: curr: 0 -> new: 197388 CAL_MAG_PRIME: curr: 0 -> new: 197388 CAL_BARO_PRIME: curr: 0 -> new: 6620172 COM_DISARM_LAND: curr: 2.0000 -> new: 0.1000 COM_OBL_ACT: curr: 0 -> new: 2 COM_OF_LOSS_T: curr: 0.0000 -> new: 5.0000 COM_RC_IN_MODE: curr: 0 -> new: 1 EKF2_ANGERR_INIT: curr: 0.1000 -> new: 0.0100 EKF2_GBIAS_INIT: curr: 0.1000 -> new: 0.0100 EKF2_REQ_GPS_H: curr: 10.0000 -> new: 0.5000 MC_PITCH_P: curr: 6.5000 -> new: 6.0000 MC_PITCHRATE_P: curr: 0.1500 -> new: 0.2000 MC_ROLL_P: curr: 6.5000 -> new: 6.0000 MC_ROLLRATE_P: curr: 0.1500 -> new: 0.2000 MPC_HOLD_MAX_Z: curr: 0.6000 -> new: 2.0000 MPC_Z_VEL_I: curr: 0.1000 -> new: 0.1500 [ INFO] [1570706538.143968686]: FCU URL: udp://:14540@127.0.0.1:14557 MPC_Z_VEL_P: curr: 0.2000 -> new: 0.6000 [ INFO] [1570706538.146229611]: udp0: Bind address: 0.0.0.0:14540 [ INFO] [1570706538.146305234]: udp0: Remote address: 127.0.0.1:14557 [ INFO] [1570706538.146559305]: GCS URL: udp://@ [ INFO] [1570706538.146656926]: udp1: Bind address: 0.0.0.0:14555 MPC_XY_P: curr: 0.9500 -> new: 0.8000 MPC_XY_VEL_P: curr: 0.0900 -> new: 0.2000 MPC_XY_VEL_D: curr: 0.0100 -> new: 0.0160 MPC_JERK_MIN: curr: 8.0000 -> new: 10.0000 MPC_ACC_HOR_MAX: curr: 5.0000 -> new: 3.0000 [ INFO] [1570706538.157136292]: Plugin 3dr_radio loaded NAV_ACC_RAD: curr: 10.0000 -> new: 2.0000 [ INFO] [1570706538.159003540]: Plugin 3dr_radio initialized [ INFO] [1570706538.159123018]: Plugin actuator_control loaded NAV_DLL_ACT: curr: 0 -> new: 2 RTL_DESCEND_ALT: curr: 30.0000 -> new: 5.0000 [ INFO] [1570706538.161606157]: Plugin actuator_control initialized RTL_LAND_DELAY: curr: -1.0000 -> new: 5.0000 RTL_RETURN_ALT: curr: 60.0000 -> new: 30.0000 [ INFO] [1570706538.165552945]: Plugin adsb loaded SDLOG_MODE: curr: 0 -> new: 1 [ INFO] [1570706538.169544739]: Plugin adsb initialized [ INFO] [1570706538.169716950]: Plugin altitude loaded SDLOG_PROFILE: curr: 3 -> new: 131 [ INFO] [1570706538.170536908]: Plugin altitude initialized [ INFO] [1570706538.170646270]: Plugin cam_imu_sync loaded [ INFO] [1570706538.171191157]: Plugin cam_imu_sync initialized [ INFO] [1570706538.171338328]: Plugin command loaded SDLOG_DIRS_MAX: curr: 0 -> new: 7 [ INFO] [1570706538.175822729]: Plugin command initialized [ INFO] [1570706538.175968276]: Plugin companion_process_status loaded SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000 [ INFO] [1570706538.177529866]: Plugin companion_process_status initialized [ INFO] [1570706538.177647770]: Plugin debug_value loaded SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010 TRIG_INTERFACE: curr: 4 -> new: 3 [ INFO] [1570706538.180919024]: Plugin debug_value initialized [ INFO] [1570706538.180956912]: Plugin distance_sensor blacklisted [ INFO] [1570706538.181109363]: Plugin fake_gps loaded MIS_LTRMIN_ALT: curr: -1.0000 -> new: 0.0100 MIS_TAKEOFF_ALT: curr: 2.5000 -> new: 0.0100 [ INFO] [1570706538.190236616]: Plugin fake_gps initialized [ INFO] [1570706538.190447972]: Plugin ftp loaded
Diagnostics
header: seq: 221 stamp: secs: 1570706676 nsecs: 836563777 frame_id: '' status:
hardware_id: "udp://:14540@127.0.0.1:14557" values:
level: 0 name: "mavros: Battery" message: "Normal" hardware_id: "udp://:14540@127.0.0.1:14557" values:
Check ID