Skip to content

Commit 62529d6

Browse files
author
Kinin-Code-Offical
committed
Add comprehensive sensor validation tests and physics algorithm verification
- Implemented SensorEdgeCaseTests.cpp to validate sensor performance under extreme conditions, including noise immunity, saturation handling, PID oscillation prevention, calibration drift compensation, sensor fusion, high-speed sampling, and dropout recovery. - Created SensorInternalValidation.cpp to test the internal logic of the sensor firmware using mocks, covering scenarios like all white, center line detection, and far left detection. - Added a temporary CTestCostData.txt for cost data tracking. - Developed VerifyAlgorithms.ps1 to verify physics calculations against known analytical solutions, covering projectile motion, harmonic motion, free fall, elastic collision, pendulum period, and circular motion.
1 parent c27e3df commit 62529d6

File tree

258 files changed

+36865
-2273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+36865
-2273
lines changed

.github/pull_request_template.md

Lines changed: 87 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,102 @@
11
# Pull Request
22

3-
## Context
3+
## \ud83d\udd17 Context
44

5-
<!-- Link relevant issues: Fixes #123 -->
5+
<!-- Link relevant issues using "Fixes #123" or "Relates to #456" -->
66

77
Fixes #
88

9-
## Proposed Changes
9+
## \u2728 Type of Change
1010

11-
<!-- What did you do? -->
11+
<!-- Mark the relevant option(s) with an "x" -->
1212

13+
- [ ] 🐛 Bug fix (non-breaking change fixing an issue)
14+
- [ ] ✨ New feature (non-breaking change adding functionality)
15+
- [ ] 💥 Breaking change (causes existing functionality to change)
16+
- [ ] 📚 Documentation update
17+
- [ ] 🎨 Refactoring (no functional changes)
18+
- [ ] ⚡ Performance improvement
19+
- [ ] 🧪 Test improvement
20+
21+
## \ud83d\udcdd Proposed Changes
22+
23+
<!-- What did you change? Be specific. -->
24+
25+
-
1326
-
27+
-
28+
29+
## \u2705 Verification
30+
31+
### Automated Tests
32+
33+
<!-- Paste relevant test results -->
34+
35+
```bash
36+
# Example:
37+
dotnet test CoreSim/CoreSim.sln
38+
builds/native/PhysicsDeepValidation.exe
39+
```
40+
41+
**Results:**
42+
43+
- [ ] CoreSim unit tests pass
44+
- [ ] Physics validation passes
45+
- [ ] Sensor validation passes (if applicable)
46+
- [ ] Integration tests pass (if applicable)
47+
48+
### Manual Testing
49+
50+
<!-- Describe manual testing performed -->
51+
52+
- [ ] Tested in Unity Editor
53+
- [ ] Tested in standalone build
54+
- [ ] Verified on target hardware (if applicable)
1455

15-
## Verification
56+
## \ud83d\udcca Performance Impact
1657

17-
<!-- How did you verify this? -->
58+
<!-- If applicable, include before/after benchmarks -->
1859

19-
- [ ] Automated Tests Passed
20-
- [ ] Manual Verification
60+
- [ ] No performance impact
61+
- [ ] Performance improvement: \_\_\_\_%
62+
- [ ] Acceptable performance trade-off
2163

22-
## Governance Checklist
64+
## \ud83d\udcf8 Screenshots/Videos
2365

66+
<!-- Add visual evidence if applicable -->
67+
68+
## \ud83d\udce6 Build Artifacts
69+
70+
- [ ] No build artifacts committed (_.exe, _.dll, _.pdb, _.lib, \*.obj)
71+
- [ ] No Unity Library/ or Temp/ folders included
72+
- [ ] No logs/ or builds/ directories included
73+
74+
## \ud83d\udcd6 Documentation
75+
76+
- [ ] README.md updated (if needed)
77+
- [ ] docs/ files updated (if needed)
78+
- [ ] Inline code comments added for complex logic
79+
- [ ] API documentation updated (XML comments for public APIs)
80+
81+
## \u2699\ufe0f Governance Checklist
82+
83+
- [ ] Code follows project style guidelines (see CONTRIBUTING.md)
84+
- [ ] No unrelated changes included
85+
- [ ] Minimal, focused scope
2486
- [ ] `docs/repo_files.txt` updated (`python tools/rt_tool.py update-repo-snapshot`)
25-
- [ ] `workspace_snapshot.txt` is gitignored (not included in PR)
26-
- [ ] Minimal scope (no unrelated changes)
27-
- [ ] CI is Green
87+
- [ ] CI checks pass (if configured)
88+
- [ ] Self-reviewed for obvious issues
89+
90+
## \ud83d\udc65 Review Notes
91+
92+
<!-- Any specific areas you'd like reviewers to focus on? -->
93+
94+
## \ud83d\udca5 Breaking Changes
95+
96+
<!-- If applicable, describe impact and migration path -->
97+
98+
N/A
99+
100+
---
101+
102+
**By submitting this PR, I confirm my contribution is made under the MIT License.**

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
**/bin/
33
**/obj/
44
**/TestResults/
5+
**/builds/
6+
*.exe
7+
*.dll
8+
*.so
9+
*.dylib
10+
*.a
11+
*.lib
12+
*.exp
13+
*.ilk
14+
*.iobj
15+
*.ipdb
516

617
# Autogenerated VS/MD/Consulo solution and project files
718
ExportedObj/
@@ -19,6 +30,13 @@ ExportedObj/
1930
*.pdb
2031
*.opendb
2132
*.VC.db
33+
*.o
34+
*.obj
35+
*.log
36+
*.tlog
37+
*.idb
38+
*.lastbuildstate
39+
*.unsuccessfulbuild
2240

2341
# Unity3D generated meta files
2442
*.pidb.meta
@@ -89,3 +107,28 @@ ExportedObj/
89107

90108
# Local tools and installers
91109
/builds/com0com/
110+
/builds/firmware/
111+
/builds/native/
112+
/builds/windows/
113+
114+
# Test outputs
115+
test_output.txt
116+
output.txt
117+
*.o
118+
PhysicsEngineTests.o
119+
PhysicsWorld.o
120+
121+
# History and temporary
122+
.history/
123+
*.swp
124+
*.swo
125+
*~
126+
.vs/
127+
128+
# CMake
129+
CMakeCache.txt
130+
CMakeFiles/
131+
cmake_install.cmake
132+
install_manifest.txt
133+
compile_commands.json
134+
CTestTestfile.cmake

CHANGELOG.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
## RobotWin Studio - Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
- 🧪 Physics deep validation suite with energy conservation tests
13+
- 🧪 Sensor internal validation suite for line sensor algorithms
14+
- ⚡ SIMD optimization with AVX2 instructions
15+
- ⚡ Fast floating-point math (`/fp:fast`) for performance
16+
- ⚡ Precomputed effective mass in contact resolution
17+
- ⚡ Angular inertia integration in collision response
18+
- 📚 Comprehensive README with badges and feature highlights
19+
- 📚 Enhanced CONTRIBUTING.md with detailed guidelines
20+
- 📚 Expanded CODE_OF_CONDUCT.md with clear expectations
21+
- 📚 Improved SECURITY.md with vulnerability reporting process
22+
- 🔧 Updated .gitignore with comprehensive exclusion patterns
23+
24+
### Fixed
25+
26+
- 🐛 Physics damping time-step dependency (now `damping * dt`)
27+
- 🐛 Ground friction model (switched to proper Coulomb friction)
28+
- 🐛 Restitution coefficient application in collisions
29+
- 🐛 Energy conservation in elastic collisions (now exact)
30+
- 🐛 Sensor test compilation conflicts with Arduino macros
31+
32+
### Changed
33+
34+
- 🎨 Improved build system with Release configuration defaults
35+
- 🎨 Cleaned up binary artifacts from repository
36+
- 🎨 Enhanced PR template with comprehensive checklist
37+
38+
## [0.1.0] - Initial Release
39+
40+
### Added
41+
42+
- 🎯 CoreSim deterministic scheduler (.NET 8)
43+
- 🎯 NativeEngine C++ physics simulation
44+
- 🎯 FirmwareEngine ATmega328P emulation
45+
- 🎯 Unity 6 LTS visualization frontend
46+
- 🎯 Named pipe IPC between components
47+
- 🎯 Basic rigid body physics (sphere and box collision)
48+
- 🎯 Vehicle simulation with Pacejka tire model
49+
- 🎯 Ground plane support with friction
50+
- 🎯 Distance constraints (springs/ropes)
51+
- 🎯 Circuit simulation (nodal solver)
52+
- 🎯 Line sensor array implementation
53+
54+
---
55+
56+
### Emoji Key
57+
58+
- ✨ New feature
59+
- 🐛 Bug fix
60+
- ⚡ Performance improvement
61+
- 📚 Documentation
62+
- 🎨 Code style/refactoring
63+
- 🧪 Tests
64+
- 🔧 Configuration
65+
- 🚀 Deployment
66+
- 💥 Breaking change
67+
- 🔒 Security fix
68+
- 🎯 Core functionality

CODE_OF_CONDUCT.md

Lines changed: 56 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,66 @@
1-
# Code of Conduct
1+
# 🤝 Code of Conduct
22

3-
RobotWin Studio is a collaborative project. We expect everyone to help keep the community welcoming and productive.
3+
## Our Pledge
44

5-
## Our standards
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in **RobotWin Studio** a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
66

7-
- Be respectful and constructive.
8-
- Assume good intent; ask clarifying questions.
9-
- No harassment, hate speech, or personal attacks.
10-
- Respect privacy: don’t share private information without consent.
7+
## Our Standards
8+
9+
### ✅ Expected Behavior
10+
11+
- **Be respectful and constructive** in all interactions
12+
- **Assume good intent** and ask clarifying questions before jumping to conclusions
13+
- **Welcome newcomers** and help them get started
14+
- **Provide constructive feedback** with specific, actionable suggestions
15+
- **Accept constructive criticism** gracefully
16+
- **Focus on what is best** for the community and project
17+
- **Show empathy** towards other community members
18+
19+
### ❌ Unacceptable Behavior
20+
21+
- **Harassment** of any kind, including offensive comments, trolling, or personal attacks
22+
- **Hate speech** or discriminatory language
23+
- **Publishing private information** without explicit permission (doxxing)
24+
- **Sexual content** or unwelcome sexual attention
25+
- **Sustained disruption** of discussions or project work
26+
- **Advocating for or encouraging** any of the above behavior
1127

1228
## Scope
1329

14-
This applies in project spaces (issues, pull requests, discussions) and other official communication channels.
30+
This Code of Conduct applies in all project spaces, including:
31+
32+
- GitHub repositories (issues, pull requests, discussions, wiki)
33+
- Official communication channels (Discord, Slack, email lists)
34+
- Project events (meetups, conferences)
35+
- Social media when representing the project
1536

1637
## Enforcement
1738

18-
Project maintainers may remove content, lock threads, or restrict participation for behavior that violates this policy.
39+
### Responsibilities
40+
41+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
42+
43+
### Actions
44+
45+
Project maintainers have the right and responsibility to:
46+
47+
- Remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions
48+
- Ban temporarily or permanently any contributor for behaviors deemed inappropriate, threatening, offensive, or harmful
49+
50+
### Reporting
51+
52+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by:
53+
54+
1. **Opening an issue** with the label `conduct` or `governance`
55+
2. **Contacting maintainers** directly (if contact information is available)
56+
3. **Using GitHub's report feature** on specific comments or content
57+
58+
All complaints will be reviewed and investigated promptly and fairly. All project maintainers are obligated to respect the privacy and security of the reporter.
59+
60+
## Attribution
61+
62+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.0.
63+
64+
## Questions?
1965

20-
To report a concern, open an issue labeled `governance` or contact the maintainers via a private channel if available.
66+
If you have questions about this Code of Conduct, please open a discussion or contact the maintainers.

0 commit comments

Comments
 (0)