Skip to content

Conversation

@Levi-Armstrong
Copy link
Contributor

@Levi-Armstrong Levi-Armstrong commented Jun 13, 2025

This PR adds a property tree similar to tools like Boost Property Tree but tightly coupled with yaml-cpp to support loading, saving and validation of Tesseract yaml config like kinematics plugins and task composer plugins yaml files. It also supports property attributes to assist validation and additional attributes for UI specific configuration.

It leverages nested exceptions like the urdf parser to give a full back trace of where the error occurs within the yaml file.

exception: Validation failed for property: config
  exception: Validation failed for property: outputs
    exception: Validation failed for property: program
      exception: Required property missing or null

Also has the ability to save with and without schema/attributes data

Save without schema/attributes

config:
  conditional: true
  format_result_as_input: false
  inputs:
    environment: environment
    profiles: profiles
    program: input_data
  outputs:
    program: output_data

Save with schema/attributes

config:
  attributes:
    doc: Main config for plugin
    required: true
    return_options:
      0: Error
      1: Successful
  conditional:
    attributes:
      default: true
      doc: Enable conditional execution
      required: true
      type: bool
    value: true
  format_result_as_input:
    follow: Eigen::Vector3d
    value: true
  inputs:
    attributes:
      doc: Input sources
      required: true
    environment:
      attributes:
        doc: The tesseract environment
        required: true
        type: std::string
      value: environment
    profiles:
      attributes:
        doc: The tesseract profiles
        required: true
        type: std::string
      value: profiles
    program:
      attributes:
        doc: The composite instruction
        required: true
        type: std::string
      value: input_data
  outputs:
    program:
      attributes:
        required: true
        type: std::string
      value: output_data
  remapping:
     attributes:
        type: {std::string : std::string}
        required: false
     value: ~
  indexing: 
    attributes:
        type: std::string[]
        required: false
    value: ~

Vectors

@codecov
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

Attention: Patch coverage is 44.67085% with 353 lines in your changes missing coverage. Please review.

Project coverage is 91.32%. Comparing base (fa4a972) to head (7e5297a).

Files with missing lines Patch % Lines
tesseract_common/src/property_tree.cpp 30.94% 241 Missing ⚠️
..._common/include/tesseract_common/yaml_extensions.h 73.71% 41 Missing ⚠️
tesseract_common/src/schema_registry.cpp 21.05% 30 Missing ⚠️
...ct_common/include/tesseract_common/property_tree.h 8.00% 23 Missing ⚠️
...esseract_collision/bullet/src/bullet_factories.cpp 76.66% 7 Missing ⚠️
tesseract_common/src/schema_registration.cpp 55.55% 4 Missing ⚠️
...ision/core/src/contact_managers_plugin_factory.cpp 0.00% 3 Missing ⚠️
tesseract_common/src/plugin_info.cpp 0.00% 3 Missing ⚠️
tesseract_collision/fcl/src/fcl_factories.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1161      +/-   ##
==========================================
- Coverage   93.02%   91.32%   -1.71%     
==========================================
  Files         266      272       +6     
  Lines       17874    18509     +635     
==========================================
+ Hits        16628    16903     +275     
- Misses       1246     1606     +360     
Files with missing lines Coverage Δ
...t_collision/core/contact_managers_plugin_factory.h 100.00% <ø> (ø)
tesseract_collision/core/src/types.cpp 91.07% <100.00%> (+0.11%) ⬆️
...ract_common/include/tesseract_common/plugin_info.h 100.00% <ø> (ø)
..._common/include/tesseract_common/schema_registry.h 100.00% <100.00%> (ø)
tesseract_common/src/yaml_extensions.cpp 100.00% <100.00%> (ø)
..._kinematics/core/src/kinematics_plugin_factory.cpp 93.44% <ø> (ø)
tesseract_srdf/src/configs.cpp 100.00% <ø> (ø)
tesseract_srdf/src/srdf_model.cpp 100.00% <ø> (ø)
tesseract_collision/fcl/src/fcl_factories.cpp 66.66% <0.00%> (-33.34%) ⬇️
...ision/core/src/contact_managers_plugin_factory.cpp 89.10% <0.00%> (-1.75%) ⬇️
... and 7 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Levi-Armstrong Levi-Armstrong force-pushed the feature/property-tree branch 3 times, most recently from d0b252f to 2429ddf Compare June 16, 2025 18:18
@Levi-Armstrong Levi-Armstrong force-pushed the feature/property-tree branch from 8edff3e to aa48cc2 Compare July 4, 2025 17:29
@Levi-Armstrong Levi-Armstrong force-pushed the feature/property-tree branch from aa48cc2 to 7e5297a Compare July 6, 2025 01:50
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