I installed PX4 and Qgroundcontrol on my ubuntu 22.04. I use ROS2 humble
I can run a PX4 simulation (with make px4_sitl gazebo
) and Qgroundcontrol but I’m unable to connect both together. Indeed I tried to create a new Comm link with these options:
Name: px4
Automatically Connect on Start
Type: TCP
Server Address: 127.0.0.1
Port: 4560
All tools are on my machine, it’s why I did put 127.0.0.1 (aka localhost)
And I use TCP cause apparently PX4 use this protocol, this is my logs when I run my PX4 simulation:
______ __ __ ___
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/
px4 starting.
INFO [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
INFO [init] found model autostart file as SYS_AUTOSTART=10015
INFO [param] selected parameter default file parameters.bson
INFO [param] selected parameter backup file parameters_backup.bson
SYS_AUTOCONFIG: curr: 0 -> new: 1
SYS_AUTOSTART: curr: 0 -> new: 10015
CAL_ACC0_ID: curr: 0 -> new: 1310988
CAL_GYRO0_ID: curr: 0 -> new: 1310988
CAL_ACC1_ID: curr: 0 -> new: 1310996
CAL_GYRO1_ID: curr: 0 -> new: 1310996
CAL_ACC2_ID: curr: 0 -> new: 1311004
CAL_GYRO2_ID: curr: 0 -> new: 1311004
CAL_MAG0_ID: curr: 0 -> new: 197388
CAL_MAG0_PRIO: curr: -1 -> new: 50
CAL_MAG1_ID: curr: 0 -> new: 197644
CAL_MAG1_PRIO: curr: -1 -> new: 50
SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
INFO [dataman] data manager file './dataman' size is 7868392 bytes
INFO [init] PX4_SIM_HOSTNAME: localhost
INFO [simulator_mavlink] Waiting for simulator to accept connection on TCP port 4560
Gazebo multi-robot simulator, version 11.10.2
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 132.207.153.244
[Msg] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
So when I launch QgroundControl, I have this message: “Error on link px4. Error on socket: Connection refused”
And this is logs:
./QGroundControl.AppImage
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Settings location "/home/user/.config/QGroundControl.org/QGroundControl.ini" Is writable?: true
Filter rules "*Log.debug=false\nGStreamerAPILog.debug=true\nqt.qml.connections=false"
System reported locale: QLocale(French, Latin, France) ; Name "fr_FR" ; Preffered (used in maps): "fr-FR"
LocalizationLog: Qt lib localization for "fr_FR" is not present
"FactMetaData::createFromJsonObject _parseEnum for gridLines failed. Enum strings/values count mismatch - strings:values 1:2"
VideoReceiverLog: Stop called on empty URI
VideoReceiverLog: Stop called on empty URI
MAVLinkLogManagerLog: MAVLink logs directory: "/home/user/Documents/QGroundControl/Logs"
qt.network.ssl: QSslSocket: cannot resolve EVP_PKEY_base_id
qt.network.ssl: QSslSocket: cannot resolve SSL_get_peer_certificate
Ignoring ssl certificates due to OpenSSL version mismatch
Map Cache in: "/home/user/.cache/QGCMapCache300" / "qgcMapCache.db"
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate
setCurrentPlanViewSeqNum
setCurrentPlanViewSeqNum
qt.network.ssl: QSslSocket: cannot call unresolved function EVP_PKEY_base_id
qt.positioning.geoclue2: Unable to start the client: "org.freedesktop.DBus.Error.AccessDenied" "Geolocation disabled for UID 1000"
QGCPositionManager error 0
"v4.3.0"
Apparently, there is no easy way to change the protocol/port used by PX4 so the only solution was to do the right Comm link in Qgroundcontrol but it doesn’t work for me. So I don’t have any idea, maybe an other person had this error and know the answer