Skip to content

Conversation

@nathanhhughes
Copy link
Collaborator

Took longer than I was hoping, but finally fixed the visualizer to work how we want:

  • You can now configure partitions on the same layer independently or jointly (there's a new "syntax" for selecting which partitions you're trying to configure that's kinda explained in the code / the visualizer config has examples)
  • Interlayer edges are configured separately from their layers
  • Color adapters take a layer key instead of a layer id, which should fix the bugs you were seeing

I am seeing the dynamic config gui freeze after a little bit, will add that to the list of bugs I need to track down (the hydra objects are broken still and there seems to be some issues with backend node merging)

@nathanhhughes nathanhhughes requested a review from Schmluk January 29, 2026 15:36
Copy link
Contributor

@Schmluk Schmluk left a comment

Choose a reason for hiding this comment

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

Looks great, thanks a lot for adding these features!

partitions:
2:
edges: {scale: 0.1, alpha: 0.2, color: {type: UniformEdgeColorAdapter}}
2p*:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

interlayer_insertion_skip: 0
edges: {scale: 0.01, alpha: 0.5, color: {type: UniformEdgeColorAdapter}}
interlayer_edges:
- {from: 3*, to: 2p*, draw: false}
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Minor: Would it make sense to imply * if no partitions are mentioned? i.e. from: 3 would apply to all partitions of 3, that would seem intuitive.

  • Minor minor: Would *p1 work to link up specific partitions only? Not sure if needed though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think that would make more sense in the final version (that gets put in spark-dsg), but I think that would lead to confusing behavior for configs that hadn't been updated yet at the moment (e.g., 2 being interperted as all partitions would mean that the agent layers pick up the object layer config as the default config)

//! @brief draw intralayer edges
//! @brief Draw edges
bool draw = true;
//! @brief intralayer edge size
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! Much simpler!

nh_(nh),
graph_config_("scene_graph", config.graph, [this]() { has_change_ = true; }),
pub_(nh.create_publisher<MarkerArray>("graph", rclcpp::QoS(1).transient_local())),
has_change_(false) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

* - [LayerId]p* (e.g., '2p*'), which selects Layer 2, Partitions >= 1
* - [LayerId]* (e.g., '2*'), which selects Layer 2, Partitions >= 0
*/
struct LayerKeySelector {
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor/later: This whole functionality would probably be really useful to have in a unified version in spark_dsg, that somewhat naturally goes from names to IDs and back (including the wildcard and partition selection), I think that'd be really awesome and might make some interfaces more flexible and easier to understand. That might also go hand in hand with the 'layers as views' idea. (Maybe could be implemented similar to the NodeSymbols)

E.g. the idea that something like this is correct syntax is really cool:

for (const auto& [id, node]: graph.layer("PLACESp[1-3]") { ... }

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had a similar thought 😄

@nathanhhughes nathanhhughes force-pushed the feature/partition_configs branch from 85d13f4 to 7ae4f63 Compare January 29, 2026 22:49
@nathanhhughes nathanhhughes merged commit 87725d8 into develop Jan 30, 2026
2 checks passed
@nathanhhughes nathanhhughes deleted the feature/partition_configs branch January 30, 2026 01:52
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.

3 participants