Skip to content

Johnliu/px4 cpu optimization#348

Open
JohnYanxinLiu wants to merge 10 commits intomainfrom
johnliu/px4_cpu_optimization
Open

Johnliu/px4 cpu optimization#348
JohnYanxinLiu wants to merge 10 commits intomainfrom
johnliu/px4_cpu_optimization

Conversation

@JohnYanxinLiu
Copy link
Copy Markdown
Collaborator

What does this pull request do?

Sets the PX4 IMU INTEGRATION rate setting in simulation. This allows the user to specify the physics step frequency in isaac-sim. The PX4 physics step frequency is now set to 100 Hz by default to drastically speed up Isaac-sim performance. This pull request also freezes the DDS router at v3.4.0 to remain compatible with isaac-sim.

Which issue number does this address?

Add videos and images if possible.

How did you implement it?

Currently, Dockerfile.isaac-ros patches the PX4 repository with a 1-line change in the simulation startup script to read from an environment variable PX4_IMU_INTEG_RATE after cloning to bake the change into the image. PegasusSimulator was adjusted to set the environment variable before launching PX4 in a subprocess.

Testing

How do you run the tests?
Typical test of airstack up, then arming + takeoff, and exploring.
Also, able to run the benchmark suite in PegasusSimulator now.
docker exec isaac-sim bash -c \ "/isaac-sim/python.sh /isaac-sim/AirStack/simulation/isaac-sim/extensions/PegasusSimulator/benchmarking/run_all.py"

What do the tests do?
the benchmarking script will run a benchmark of tests on the system and give an insight to how close to real time one can get on their system.

What are the expected results of the tests?
The lower the physics step frequency specified, the closer to real time you should be able to get. However, from a quick search with CLAUDE, the PX4 EKF works with windows of 10ms, of which 100Hz will result in that minimum 10ms period window. Setting it lower may lead to unintended effects.

Did you update the docs (and where)?

(FYI Docs are updated via mkdocs.yml and markdown files under docs/. It should render at localhost:8000 when you run docker compose up docs.)

@JohnYanxinLiu JohnYanxinLiu requested review from andrewjong, Copilot and krrishj18 and removed request for Copilot April 29, 2026 14:36
@github-actions
Copy link
Copy Markdown

Test Metrics — a427354c2bbad7108e8f4a7d78c1beb74de9a110

test_build_docker

Pass rates

Test Pass Fail Skip Rate (baseline → current)
test_build_gcs 0 → 1 0 → 0 0 → 0 — → 100%
test_build_isaac_sim 0 → 1 0 → 0 0 → 0 — → 100%
test_build_ms_airsim 0 → 1 0 → 0 0 → 0 — → 100%
test_build_robot_desktop 0 → 1 0 → 0 0 → 0 — → 100%

Metrics

Test Metric Baseline Current Change
test_build_robot_desktop duration_s 791.8s new
test_build_gcs duration_s 310.7s new
test_build_isaac_sim duration_s 715.2s new
test_build_ms_airsim duration_s 226.5s new

test_build_packages

Pass rates

Test Pass Fail Skip Rate (baseline → current)
test_colcon_build_gcs 0 → 0 0 → 1 0 → 0 — → 0%
test_colcon_build_ms_airsim 0 → 1 0 → 0 0 → 0 — → 100%
test_colcon_build_robot 0 → 0 0 → 1 0 → 0 — → 0%

Metrics

Test Metric Baseline Current Change
test_colcon_build_robot duration_s 27.64s new
test_colcon_build_gcs duration_s 25.73s new
test_colcon_build_ms_airsim duration_s 12.95s new

docker

Metrics

Test Metric Baseline Current Change
docker.gcs image_size_mb 2024MB new
docker.isaac-sim image_size_mb 1.253e+04MB new
docker.ms-airsim image_size_mb 4008MB new

@github-actions
Copy link
Copy Markdown

Test Metrics — 6f3fc385d7342dec04f9c72b3d233f10f8c42714

test_build_docker

Pass rates

Test Pass Fail Skip Rate (baseline → current)
test_build_gcs 0 → 1 0 → 0 0 → 0 — → 100%
test_build_isaac_sim 0 → 1 0 → 0 0 → 0 — → 100%
test_build_ms_airsim 0 → 1 0 → 0 0 → 0 — → 100%
test_build_robot_desktop 0 → 1 0 → 0 0 → 0 — → 100%

Metrics

Test Metric Baseline Current Change
test_build_robot_desktop duration_s 763.3s new
test_build_gcs duration_s 37.86s new
test_build_isaac_sim duration_s 169.2s new
test_build_ms_airsim duration_s 52.39s new

test_build_packages

Pass rates

Test Pass Fail Skip Rate (baseline → current)
test_colcon_build_gcs 0 → 0 0 → 1 0 → 0 — → 0%
test_colcon_build_ms_airsim 0 → 1 0 → 0 0 → 0 — → 100%
test_colcon_build_robot 0 → 0 0 → 1 0 → 0 — → 0%

Metrics

Test Metric Baseline Current Change
test_colcon_build_robot duration_s 163.7s new
test_colcon_build_gcs duration_s 32.34s new
test_colcon_build_ms_airsim duration_s 12.95s new

docker

Metrics

Test Metric Baseline Current Change
docker.gcs image_size_mb 2024MB new
docker.isaac-sim image_size_mb 1.253e+04MB new
docker.ms-airsim image_size_mb 4008MB new

@github-actions
Copy link
Copy Markdown

Test Metrics — bc8032416cc525b443a16178b1b52c042ebc5cfb

test_build_docker

Pass rates

Test Pass Fail Skip Rate (baseline → current)
test_build_gcs 0 → 1 0 → 0 0 → 0 — → 100%
test_build_isaac_sim 0 → 1 0 → 0 0 → 0 — → 100%
test_build_ms_airsim 0 → 1 0 → 0 0 → 0 — → 100%
test_build_robot_desktop 0 → 1 0 → 0 0 → 0 — → 100%

Metrics

Test Metric Baseline Current Change
test_build_robot_desktop duration_s 568s new
test_build_gcs duration_s 42.73s new
test_build_isaac_sim duration_s 180.3s new
test_build_ms_airsim duration_s 33.37s new

test_build_packages

Pass rates

Test Pass Fail Skip Rate (baseline → current)
test_colcon_build_gcs 0 → 0 0 → 1 0 → 0 — → 0%
test_colcon_build_ms_airsim 0 → 1 0 → 0 0 → 0 — → 100%
test_colcon_build_robot 0 → 0 0 → 1 0 → 0 — → 0%

Metrics

Test Metric Baseline Current Change
test_colcon_build_robot duration_s 124.7s new
test_colcon_build_gcs duration_s 26.52s new
test_colcon_build_ms_airsim duration_s 12.79s new

docker

Metrics

Test Metric Baseline Current Change
docker.gcs image_size_mb 2024MB new
docker.isaac-sim image_size_mb 1.253e+04MB new
docker.ms-airsim image_size_mb 4008MB new

@github-actions
Copy link
Copy Markdown

Test Metrics — 622270d1e90c1bb914c4f04d004374cf618e7f25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants