Skip to content

sim: fake IMU data in simulator#37037

Closed
Mifrill wants to merge 6 commits intocommaai:masterfrom
Mifrill:support/issues#33721
Closed

sim: fake IMU data in simulator#37037
Mifrill wants to merge 6 commits intocommaai:masterfrom
Mifrill:support/issues#33721

Conversation

@Mifrill
Copy link
Copy Markdown

@Mifrill Mifrill commented Jan 28, 2026

Description

Adds IMU (accelerometer and gyroscope) data generation to the MetaDrive simulator and creates a test to validate the data flow. This addresses issue #33721 by providing fake IMU sensor data that can be used for testing and development.

The fix consists of two commits:

  1. sim: fake IMU data in simulator - Added IMU data generation in MetaDrive world that creates realistic accelerometer and gyroscope readings using mathematical functions
  2. test: add test for sim IMU data - Created test to validate IMU data is properly generated and flows through the messaging system

Verification

  • Verified IMU services (accelerometer and gyroscope) are available in the messaging system
  • Confirmed the MetaDrive bridge can create and initialize with IMU data generation
  • Test infrastructure is working - messaging setup and service discovery functions correctly
  • The test validates that IMU data is generated with proper variance (>1e-3) to ensure non-static readings
  • Used the current accelerometer and gyroscope services (not deprecated sensorEvents)

Technical Details

  • IMU data is generated using mathematical functions to simulate realistic sensor readings
  • Data flows through the standard openpilot messaging system using Cap'n Proto
  • Test validates both data presence and statistical properties

@github-actions github-actions Bot added simulation running openpilot in environments like CARLA tools labels Jan 28, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@Mifrill Mifrill marked this pull request as draft January 28, 2026 16:04
@Mifrill
Copy link
Copy Markdown
Author

Mifrill commented Jan 28, 2026

📝 TODO: Sync with #33836

&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
if: false # FIXME: Started to timeout recently
if: true
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mifrill Mifrill force-pushed the support/issues#33721 branch from cae61cc to 63ac40c Compare January 28, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

simulation running openpilot in environments like CARLA tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants