feat(simulation)!: remove jMAVSim

PX4 SIH with the Hawkeye visualizer replaces jMAVSim, in SITL and as the
display-only viewer for SIH running on hardware. Drop the jMAVSim
submodule, its make targets, px4-rc.jmavsim, the 10017_jmavsim_iris
airframe and the VS Code debug helpers, stop installing Java and ant in
the macOS and Arch setup scripts, and point the remaining mentions at SIH
and Hawkeye.

BREAKING CHANGE: make px4_sitl jmavsim and SYS_AUTOSTART 10017 no longer
exist. Use make px4_sitl_sih sihsim_quadx with Hawkeye instead.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche committed 2026-09-26 14:28:26 -07:00
1 parent a4b722d400
commit a23449cbe5
22 files changed
+12 -261

No files matched your search

-4
View File
@@ -2,10 +2,6 @@
path = src/modules/mavlink/mavlink
url = https://github.com/mavlink/mavlink.git
branch = master
[submodule "Tools/simulation/jmavsim/jMAVSim"]
path = Tools/simulation/jmavsim/jMAVSim
url = https://github.com/PX4/jMAVSim.git
branch = main
[submodule "Tools/simulation/gazebo-classic/sitl_gazebo-classic"]
path = Tools/simulation/gazebo-classic/sitl_gazebo-classic
url = https://github.com/PX4/PX4-SITL_gazebo-classic.git
-17
View File
@@ -49,23 +49,6 @@
"group": "test"
}
},
{
"label": "jmavsim kill",
"type": "shell",
"command": "kill $(ps aux | grep jmavsim | grep -v 'grep' | awk '{print $2}') || true",
"presentation": {
"echo": true,
"reveal": "never",
"revealProblems": "onProblem",
"focus": false,
"panel": "dedicated",
"showReuseMessage": false,
"clear": false,
"close": true
},
"problemMatcher": [],
"dependsOn":["px4_sitl_cleanup"]
},
{
"label": "gazebo-classic build",
"type": "shell",
@@ -37,7 +37,6 @@ px4_add_romfs_files(
px4-rc.mavlink
px4-rc.simulator
px4-rc.gzsim
px4-rc.jmavsim
px4-rc.mavlinksim
px4-rc.sihsim
px4-rc.rotorpy
@@ -1,31 +0,0 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL jMAVSim
#
# @type Quadrotor Wide
#
# @maintainer Julian Oes <julian@oes.ch>
#
. ${R}etc/init.d/rc.mc_defaults
param set-default CA_AIRFRAME 0
param set-default CA_ROTOR_COUNT 4
param set-default CA_ROTOR0_PX 0.1515
param set-default CA_ROTOR0_PY 0.245
param set-default CA_ROTOR0_KM 0.05
param set-default CA_ROTOR1_PX -0.1515
param set-default CA_ROTOR1_PY -0.1875
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR2_PX 0.1515
param set-default CA_ROTOR2_PY -0.245
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.1515
param set-default CA_ROTOR3_PY 0.1875
param set-default CA_ROTOR3_KM -0.05
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
@@ -133,7 +133,7 @@ param set-default EKF2_ABL_ACCLIM 35.0
param set-default EKF2_ACC_NOISE 1.0 # Better accelerometer trust
param set-default EKF2_ACC_B_NOISE 0.001 # Accel bias damping for frame-paced SITL updates
# X-PLANE SITL NOTE: EKF2_ABL_LIM = 2.5 (vs Gazebo/jMAVSim default 0.4)
# X-PLANE SITL NOTE: EKF2_ABL_LIM = 2.5 (vs Gazebo default 0.4)
# Required because X-Plane sensor updates are frame-paced and can vary with
# rendering load, which can make EKF2 estimate higher acceleration bias.
# This does NOT affect flight performance - only the preflight arming check.
@@ -102,7 +102,6 @@ px4_add_romfs_files(
10015_gazebo-classic_iris
10016_none_iris
10017_jmavsim_iris
10018_gazebo-classic_iris_foggy_lidar
10019_gazebo-classic_omnicopter
10030_gazebo-classic_px4vision
@@ -1,14 +0,0 @@
#!/bin/sh
# shellcheck disable=SC2154
echo "INFO [init] jMAVSim simulator"
if jps | grep -i jmavsim; then
kill "$(jps | grep -i jmavsim | awk '{print $1}')" || true
sleep 1
fi
param set IMU_INTEG_RATE 250
./jmavsim_run.sh -l -r 250 &
simulator_mavlink start -h localhost $((4560+px4_instance))
@@ -23,10 +23,6 @@ elif [ "$PX4_SIMULATOR" = "gz" ] || [ "$(param show -q SIM_GZ_EN)" = "1" ]; then
# Run Gazebo (gz)
. px4-rc.gzsim
elif [ "$PX4_SIM_MODEL" = "jmavsim_iris" ] || [ "$(param show -q SYS_AUTOSTART)" -eq "10017" ]; then
# Run jMAVSim
. px4-rc.jmavsim
elif [ "$PX4_SIMULATOR" = "xplane" ]; then
# Run X-Plane through the mavlink simulator bridge
. px4-rc.mavlinksim
+1 -1
View File
@@ -56,7 +56,7 @@ RUN chmod +x /opt/px4/bin/px4-entrypoint.sh
ENV PX4_SIM_MODEL=sihsim_quadx
ENV HOME=/root
# MAVLink (QGC, MAVSDK), DDS (ROS 2), jMAVSim/viewer display
# MAVLink (QGC, MAVSDK), DDS (ROS 2), Hawkeye viewer display
EXPOSE 14550/udp 14540/udp 19410/udp 8888/udp
WORKDIR /root
+2 -7
View File
@@ -4,9 +4,9 @@
## Tested on Arch 2023-03-01
##
## Installs:
## - Common dependencies and tools for nuttx, jMAVSim
## - Common dependencies and tools for nuttx
## - NuttX toolchain (omit with arg: --no-nuttx)
## - jMAVSim simulator (omit with arg: --no-sim-tools)
## - Simulation dependencies (omit with arg: --no-sim-tools)
## - Gazebo simulator (not by default, use --gazebo)
##
@@ -93,11 +93,6 @@ if [[ $INSTALL_SIM == "true" ]]; then
echo
echo "Installing PX4 simulation dependencies"
# java (jmavsim)
sudo pacman -S --noconfirm --needed \
ant \
;
# Gazebo setup
if [[ $INSTALL_GAZEBO == "true" ]]; then
echo
+1 -9
View File
@@ -6,7 +6,7 @@
## Installs:
## - Common dependencies and tools for building PX4
## - Cross compilers for building hardware targets using NuttX
## - With --sim-tools: Gazebo Harmonic and jMAVSim simulation stack
## - With --sim-tools: Gazebo Harmonic simulation stack
##
## --sim-tools pins the osrf/simulation tap to gz-tap-pin.txt so Gazebo
## installs from bottles even while OSRF has them pulled, and protobuf to
@@ -99,7 +99,6 @@ brew_tap PX4/px4
# Package list. This replaces the px4-dev meta-formula, which is kept
# as a deprecated no-op upstream. See PX4/homebrew-px4 for history.
PX4_BREW_PACKAGES=(
ant
astyle
bash-completion
ccache
@@ -283,13 +282,6 @@ if [[ $INSTALL_SIM == "--sim-tools" ]]; then
# XQuartz is not in the pinned package repos.
env -u HOMEBREW_NO_INSTALL_FROM_API brew install --cask xquartz
fi
# jMAVSim requires a JDK (Java 17 LTS recommended)
if ! brew ls --versions openjdk@17 > /dev/null; then
echo "[macos.sh] Installing OpenJDK 17 (required for jMAVSim)"
brew install openjdk@17
sudo ln -sfn $(brew --prefix openjdk@17)/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk
fi
fi
echo ""
-78
View File
@@ -1,78 +0,0 @@
#!/usr/bin/env bash
set -e
SCRIPT_DIR=$(dirname $(readlink -f "$BASH_SOURCE"))
cd "$SCRIPT_DIR/jMAVSim"
port=4560
extra_args=
baudrate=921600
device=
ip="127.0.0.1"
protocol="tcp"
while getopts "b:d:ui:p:qsr:loat" opt; do
case $opt in
b)
baudrate=$OPTARG
;;
d)
device="$OPTARG"
;;
u)
protocol="udp"
;;
i)
ip="$OPTARG"
;;
p)
port=$OPTARG
;;
q)
extra_args="$extra_args -qgc"
;;
s)
extra_args="$extra_args -sdk"
;;
r)
extra_args="$extra_args -r $OPTARG"
;;
l)
extra_args="$extra_args -lockstep"
;;
o)
extra_args="$extra_args -disponly"
;;
a)
extra_args="$extra_args -fw" # aircraft model
;;
t)
extra_args="$extra_args -ts" # tailsitter model
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done
if [ "$device" == "" ]; then
if [ "$protocol" == "tcp" ]; then
device="-tcp $ip:$port"
else
device="-udp $port"
fi
else
device="-serial $device $baudrate"
fi
if [ "$HEADLESS" = "1" ]; then
extra_args="$extra_args -no-gui"
fi
ant create_run_jar copy_res
cd out/production
java --add-exports java.base/java.lang=ALL-UNNAMED --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.desktop/sun.java2d=ALL-UNNAMED \
-XX:GCTimeRatio=20 -Djava.ext.dirs= -jar jmavsim_run.jar $device $extra_args
@@ -312,7 +312,7 @@ void send_actuator_data()
actuator_sent_counter++;
if (_debug) { PX4_INFO("Successful write of actuator back to jMAVSim: %d at %llu", writeRetval, hrt_absolute_time()); }
if (_debug) { PX4_INFO("Successful write of actuator back to the simulator: %d at %llu", writeRetval, hrt_absolute_time()); }
first_sent = true;
@@ -327,7 +327,7 @@ void send_actuator_data()
actuator_sent_counter++;
if (_debug) { PX4_INFO("Successful write of actuator back to jMAVSim: %d at %llu", writeRetval, hrt_absolute_time()); }
if (_debug) { PX4_INFO("Successful write of actuator back to the simulator: %d at %llu", writeRetval, hrt_absolute_time()); }
send_esc_status(hil_act_control);
}
@@ -88,7 +88,7 @@ mavlink stream -u 14556 -s HEARTBEAT -r 10
# start the slow normal mode for voxl-mavlink-server to forward to GCS
mavlink start -x -u 14558 -o 14559 -r 100000 -n lo
# Start the jmavsim visualization stream. Change -t ip address to your desired endpoint
# Start the SIH visualization stream for Hawkeye (run `hawkeye -udp 14560` on the endpoint). Change -t ip address to your desired endpoint
# TODO: Should go through voxl-mavlink-server, not just direct like this
# mavlink start -x -u 14560 -o 14560 -r 4000000 -t 192.168.101.1 -m minimal
# mavlink stream -u 14560 -s HIL_STATE_QUATERNION -r 200
+1 -1
View File
@@ -33,7 +33,7 @@
# mavsdk_tests is a black-box MAVLink integration-test driver that talks to a
# running PX4 over UDP. It does not depend on any specific simulator backend
# (sitl_gazebo-classic, gz, sih, jmavsim, ...) — it just needs a PX4 binary
# (sitl_gazebo-classic, gz, sih, ...): it just needs a PX4 binary
# to be running. Defined here at the top level rather than under any sitl
# backend file so the dependency graph is honest.
include(ExternalProject)
-41
View File
@@ -131,47 +131,6 @@
]
}
},
{
"name": "SITL (jmavsim_iris SYS_AUTOSTART=10017)",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
"args": [
"${workspaceFolder}/ROMFS/px4fmu_common"
],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}/rootfs",
"environment": [
{
"name": "PX4_SYS_AUTOSTART",
"value": "10017"
}
],
"postDebugTask": "jmavsim kill",
"linux": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "PX4 ignore wq signals",
"text": "handle SIGCONT nostop noprint nopass",
"ignoreFailures": true
}
]
},
"osx": {
"MIMode": "lldb",
"setupCommands": [
{
"text": "pro hand -p true -s false -n false SIGCONT",
}
]
}
},
{
"name": "SITL (shell)",
"type": "cppdbg",
-2
View File
@@ -4,8 +4,6 @@
. px4-alias.sh
# HITL configuration
# connect to it with jMAVSim:
# ./Tools/simulation/jmavsim/jmavsim_run.sh -q -i <IP> -p 14577 -r 250
param select parameters.bson
param import
+2 -2
View File
@@ -67,9 +67,9 @@ param save
reboot
```
New terminal:
New terminal (visualization, see [Hawkeye](https://docs.px4.io/main/en/sim_hawkeye/)):
```bash
./Tools/simulation/jmavsim/jmavsim_run.sh -u -p 13337 -o
hawkeye -udp 13337
```
@@ -58,7 +58,6 @@ px4_add_module(
include(sitl_targets_flightgear.cmake)
include(sitl_targets_gazebo-classic.cmake)
include(sitl_targets_jmavsim.cmake)
include(sitl_targets_jsbsim.cmake)
include(sitl_targets_xplane.cmake)
@@ -37,7 +37,7 @@
* @file SimulatorMavlink.hpp
*
* This module interfaces via MAVLink to a software in the loop simulator (SITL)
* such as jMAVSim or Gazebo.
* such as Gazebo Classic or X-Plane.
*/
#pragma once
@@ -1,41 +0,0 @@
find_program(JAVA_ANT_PATH "ant")
find_package(Java)
if(JAVA_ANT_PATH AND Java_JAVAC_EXECUTABLE AND Java_JAVA_EXECUTABLE)
px4_add_git_submodule(TARGET git_jmavsim PATH "${PX4_SOURCE_DIR}/Tools/simulation/jmavsim/jMAVSim")
add_custom_target(jmavsim_run_symlink
COMMAND ${CMAKE_COMMAND} -E create_symlink ${PX4_SOURCE_DIR}/Tools/simulation/jmavsim/jmavsim_run.sh ${PX4_BINARY_DIR}/rootfs/jmavsim_run.sh
BYPRODUCTS ${PX4_BINARY_DIR}/rootfs/jmavsim_run.sh
)
# build_jmavsim
add_custom_command(
OUTPUT ${PX4_SOURCE_DIR}/Tools/simulation/jmavsim/jMAVSim/out/production/jmavsim_run.jar
COMMAND ${JAVA_ANT_PATH} create_run_jar copy_res
WORKING_DIRECTORY ${PX4_SOURCE_DIR}/Tools/simulation/jmavsim/jMAVSim/
USES_TERMINAL
DEPENDS git_jmavsim jmavsim_run_symlink
COMMENT "building jMAVSim"
)
add_custom_target(build_jmavsim
DEPENDS
${PX4_SOURCE_DIR}/Tools/simulation/jmavsim/jMAVSim/out/production/jmavsim_run.jar
jmavsim_run_symlink
)
# launch helper
add_custom_target(jmavsim_iris
COMMAND ${CMAKE_COMMAND} -E env PX4_SYS_AUTOSTART=10017 $<TARGET_FILE:px4>
WORKING_DIRECTORY ${SITL_WORKING_DIR}
USES_TERMINAL
DEPENDS
px4 git_jmavsim build_jmavsim jmavsim_run_symlink
${PX4_SOURCE_DIR}/ROMFS/px4fmu_common/init.d-posix/airframes/10017_jmavsim_iris
COMMENT "launching px4 jmavsim_iris (SYS_AUTOSTART=10017)"
)
add_custom_target(jmavsim DEPENDS jmavsim_iris) # alias
endif()