RK3566 configuration
The FS150 onboard computer is an RK3566 (Ubuntu 20.04 arm64 / ROS Noetic). Run the one-line script below to install and configure the onboard environment.
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 --lang enInstallation steps
The setup process consists of five steps. You can select them from the menu after running the command above, or run each step directly.
1. Install base environment
Configure system package sources and install ROS components, build toolchains, and algorithm libraries:
- Package sources: Switch Ubuntu Ports and ROS sources to the Tsinghua mirror, import the signing key, and add the XGC2 repository (
https://xgc2.apt.xiaokang.ink). - ROS and system dependencies: Install
ros-noetic-ros-base,ros-noetic-mavros,ros-noetic-mavros-extras(including theegm96-5Geoid dataset),ros-noetic-vrpn-client-ros,chronytime synchronization, and core libraries such as Eigen, Boost, OpenCV, PCL, Protobuf, and gRPC. - Platform packages and toolchains: Install
xgc2-acados,libxgc2-math-dev,libxgc2-state-machine-dev,libxgc2-hover-thrust-dev,libxgc2-xrpc-dev, along with Go 1.26.5, uv (Python 3.12), CMake 3.22.6, and the Pythoneclipse-zenohSDK.
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 baseline apply --user "$(id -un)"2. Install onboard communication services
Install xgc2-fs150 and xgc2-fs150-mavlink-router, generating /etc/xgc2/fs150-mavlink-router/router.conf:
- Connect to the PX4 flight controller over
/dev/ttyS7at921600baud. - Expose local UDP
127.0.0.1:14561(for onboard MAVROS and parameter tools), remote UDP0.0.0.0:14560(for the ground station), and TCP port5760.
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 install-services3. Enable and start services
Enable xgc2-fs150-mavlink-router.service at boot, start it immediately, and inspect its running status:
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 enable-services
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 start-services
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 status-services4. Configure onboard network
Write the field Wi-Fi profile and /24 static IPv4 address (default gateway and DNS 192.168.51.1), disable auto-connect on older Wi-Fi profiles, and activate the connection:
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 configure-network -- --lan-address 192.168.51.XX --wifi-ssid <SSID> --wifi-password <PASS>
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 apply-network5. Configure PX4 parameters and message rates
Verify or write the PX4 parameters required for indoor motion-capture flight, and configure flight-controller source rates and remote router output limits separately:
- PX4 parameters: Verify or write
SER_TEL1_BAUD=921600,EKF2_AID_MASK=24,EKF2_HGT_MODE=3,EKF2_EV_DELAY=50,COM_ARM_WO_GPS=1, and related parameters over127.0.0.1:14561. - Flight-controller source rates (
apply-fc-extras-rates): Independently set the source rates forATTITUDE(30),ATTITUDE_QUATERNION(31), andLOCAL_POSITION_NED(32) on the flight-controller UART (default/dev/ttyS1) in/fs/microsd/etc/extras.txt(unselected streams remain unchanged; takes effect on the next flight-controller reboot). - Remote output rate limits (
configure-remote-mavlink-rates): Cap the maximum forwarding rates of those three messages on remote UDP14560without lowering local127.0.0.1:14561source rates (saved to/etc/xgc2/fs150-mavlink-router/config.d/telemetry-rates.conf; passunlimitedto remove a limit).
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 check-px4-params
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 apply-px4-params --no-reboot
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 configure-remote-mavlink-rates -- --attitude-rate 15 --attitude-quaternion-rate 15 --local-position-rate 15
curl -fsSL https://xgc2.xiaokang.ink/scripts/setup.sh | bash -s -- fs150 apply-fc-extras-rates -- --device /dev/ttyS1 --attitude-rate 50 --attitude-quaternion-rate 50 --local-position-rate 30