PickNikRobotics / generate_parameter_library

Declarative ROS 2 Parameters
BSD 3-Clause "New" or "Revised" License
230 stars 43 forks source link

Inheritance? #193

Closed edwardribbit closed 4 months ago

edwardribbit commented 4 months ago

This is an idea and I don't know if it's possible to implement Is there a simple way to select from a set of variables like inheritance in the code?

A:
  my_var:
    my_int: {type: int}
B:
  my_var:
    my_int: {type: int}

Use case (pseudocode)

auto my_var;
if(A){
  my_var = A.my_var;
}else if(B){
  my_var = B.my_var;
}

print(my_var.my_int)
edwardribbit commented 4 months ago

I realize this looks similar to a map parameter...