px4ctrl_client is a lightweight desktop GCS for px4ctrl.
- Mission commands:
ARM,ENTER_OFFBOARD,TAKEOFF,LAND,FORCE_HOVER,FORCE_DISARM,ALLOW_CMD_CTRL. - Hover target editing and publish (
CHANGE_HOVER_POS). - Online safety update (
SET_SAFETY_LIMITS). - Status panel with highlighted
OffboardandArmedstates. - XY position trace with optional geofence box overlay.
- X/Y/Z and control command time-series plots with axis ticks and second-based time axis.
- Keyboard piloting with configurable velocity.
- Colored logs by log level (
trace/debug/info/warn/error/critical).
- C++20 compiler
spdlogOpenGLglfw3pkg-configzenoh-c
git clone https://github.com/Luxru/px4ctrl_client.git
cd px4ctrl_client
git submodule update --init --recursive
mkdir -p build
cd build
cmake ..
make -j4./px4client -c ../config/zenoh.jsonDefault config file:
config/zenoh.json
Example:
{
"backend": "zenoh",
"server_topic": "px4s",
"client_topic": "px4c",
"log_topic": "px4log",
"zenoh": {
"mode": "peer",
"connect": "",
"listen": "",
"multicast_scouting": true,
"scouting_timeout_ms": 1000
},
"keyboard": {
"vel_xy": 1.0,
"vel_z": 0.2,
"vel_yaw": 2.0
}
}Notes:
listendefault is empty to reduce local port conflicts.connectcan stay empty when scouting is enabled in the same network.telemetry_hzcan be configured in the same JSON (default:200).
Keyboard listener is per drone card and must be activated from the UI.
Keys:
W/S/A/D: move hover target in XY.R/F: move up/down.Q/E: yaw increase/decrease.C: toggle BODY/WORLD control frame.Space: sendFORCE_HOVER.J: sendFORCE_DISARM.L: sendLAND.
Velocity sources:
- Initial values from
config/zenoh.json -> keyboard. - Runtime adjustment from ImGui panel.
Safety panel supports:
Enable GeofenceGeofence Min/MaxEnable Attitude FenceMax Roll Deg,Max Pitch Deg,Max Yaw Deg
Limit rule:
-1means unlimited.- Otherwise each limit must be in
(0, 180].
When server-side guard.use_rc = true:
- Client will still show telemetry/logs normally.
- ARM/DISARM/OFFBOARD related commands can be rejected by server policy.
- Server expects RC/PX4 mode switching for those operations.
Failed to open zenoh session:- Check
zenohcinstallation and runtime library path. - Try
listen: ""and keep onlyconnector scouting.
- Check
- No telemetry displayed:
- Verify topic names and that server/client use the same transport JSON fields.
- Unexpected decode/ABI issues:
- Ensure client and server are built from matching message struct versions.
Xu Lu - lux@cqu.edu.cn