-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Task Summary
Automate the management of Carla dependencies by integrating the copy and rename operation of ${CARLA_Root}\PythonAPI\carla\dependencies\ to ${FIXS_Root}\CommonLib\libcarla\ into the build system.
Why is this needed?
Currently, per doc/CARLAdoc.md:35, users must manually copy the Carla dependencies directory after building LibCarla:
Once the build is finished, copy the directory
${CARLA_Root}\PythonAPI\carla\dependencies\into the${FIXS_Root}\CommonLib\and rename the directory as libcarla.
This manual step is error-prone and breaks the automated build workflow established by the dispatch system. Automating this will:
- Ensure consistent Carla dependency management across development environments
- Reduce setup friction for new developers
- Align with existing build automation patterns (yaml-cpp, libevent, CarMaker, dSPACE)
- Prevent build failures due to missing or incorrectly placed libcarla dependencies
Scope of Work
The automation should integrate into the existing modular build system:
-
Configuration: Add Carla path detection to
dependencies.yaml(similar to existing tool entries)carla_root: Path to Carla installationcarla_version: Version tracking (e.g., "0.9.15")
-
Detection Script: Extend scripts/dispatch/detect_tool_paths.ps1 to locate Carla installation
- Search common installation paths:
C:\CARLA,C:\Program Files\CARLA, user-specified paths - Validate
PythonAPI\carla\dependencies\exists - Return Carla root path and version
- Search common installation paths:
-
Build Script: Create new dispatch script
scripts\dispatch\6_carla_dependencies.ps1- Check if
${CARLA_Root}\PythonAPI\carla\dependencies\exists - Copy directory to
${FIXS_Root}\CommonLib\libcarla\ - Handle existing
libcarladirectory (backup/overwrite with user confirmation in manual mode) - Log operation to
build.logandbuild_summary.log - Skip gracefully if Carla not detected (not all developers need Carla)
- Check if
-
Integration: Update dispatch.bat to call the new script after external libraries step
- Execute after
1_external_libraries.bat(libcarla is an external dependency) - Before
2_core_components.bat(VirtualEnvironment.lib depends on libcarla headers)
- Execute after
-
Documentation: Update doc/BUILD.md and doc/CARLAdoc.md
- Document automated Carla dependency management
- Explain how to configure Carla path in
dependencies.yaml - Note manual fallback if auto-detection fails
Environment (if version-specific)
- CARLA version: 0.9.15 (current target version per doc/CARLAdoc.md)
- Visual Studio: 2022 17.8 (MSVC 14.3, per Carla build requirements)
- Build system: PowerShell-based dispatch scripts (Windows-only)
Risks or Dependencies
-
Carla installation variability: Unlike MATLAB/dSPACE which have standard install paths, Carla may be in custom locations
- Mitigation: Support both auto-detection and manual path specification in
dependencies.yaml
- Mitigation: Support both auto-detection and manual path specification in
-
Breaking existing workflows: Some users may have manually managed libcarla with custom modifications
- Mitigation: Add backup/confirmation logic; document migration path
-
Cross-version compatibility: Future Carla versions may change dependency structure
- Mitigation: Version-specific handling in detection script; clear error messages
-
Dependency ordering: VirtualEnvironment.lib compilation requires libcarla headers to be in place first
- Must execute before step 2 (core components) in dispatch sequence
Additional Context
Related documentation:
- doc/CARLAdoc.md:35 - Current manual process
- doc/BUILD.md - Build system architecture
- dependencies.yaml - Central configuration for tool versions
- scripts/dispatch/detect_tool_paths.ps1 - Tool detection patterns
Example existing automation pattern (dSPACE libraries):
- Detection in
detect_tool_paths.ps1finds dSPACE installation - Build script
4b_carmaker_dspace.ps1compiles version-specific libraries - Output copied to
CommonLib/andbuild/directories - Logged to build summary files
The Carla automation should follow this established pattern for consistency.