Skip to content

Fix TD freeze on startup with S-series lidars - #4

Open
lakeheck wants to merge 3 commits into
Ajasra:mainfrom
lakeheck:main
Open

lakeheck wants to merge 3 commits into
Ajasra:mainfrom
lakeheck:main

Conversation

@lakeheck

Copy link
Copy Markdown

Summary

  • Fixed TouchDesigner freeze/hang when loading projects with plugin saved in Active state (S-series lidars)
  • Fixed scan data not displaying - switched from getScanDataWithIntervalHq() to grabScanDataHq()
  • Fixed crash on plugin reinit/reload - proper thread lifecycle management
  • Added model-aware connection logic - S-series vs A-series handled differently
  • Added debug logging via OutputDebugStringA() for troubleshooting
  • Cleaned up build config - fixed hardcoded paths, removed build artifacts from repo

Root Cause

Certain Slamtec SDK functions (getMotorInfo(), setMotorSpeed(), startScan()) block indefinitely on S-series lidars (S1/S2/S3) which have internal motor control. When TD loaded a project with the plugin in Active state, these blocking calls prevented startup completion.

Testing

  • ✅ S2 - confirmed working
  • ✅ S3 - confirmed working
  • ⚠️ A2 - requires correct baudrate selection (115200 or 256000, not 1000000)
  • ⏳ A1/A3 - untested but should work (code maintains backward compatibility)

Known Limitations

  • A-series lidars require manual baudrate selection (typically 115200 or 256000)
  • getMotorInfo() disabled for all models (hangs on S-series)

Files Changed

  • SlamtecCHOP.cpp/.h - debug logging, startup handling
  • drvlogic/RPLidarDevice.cpp/.h - model-aware connection, thread cleanup, scan method
  • BasicGeneratorCHOP.vcxproj - fixed paths
  • .gitignore - exclude build artifacts
  • CHANGELOG.md - detailed change log
  • CLAUDE.md - project documentation

See CHANGELOG.md for full details.

🤖 Generated with Claude Code

lakeheck and others added 3 commits December 13, 2025 12:01
Remove accidentally committed VS cache and build output files.
Update .gitignore to prevent future commits of:
- .vs/ (Visual Studio cache)
- x64/, Debug/, Release/ (build outputs)
- *.user, *.suo (user-specific settings)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant