In particular, the 'on_set_parameter_callback' callback was checking for undeclared parameters, but that could not have been a problem since 'allow_undeclared_parameters' is set to false by default.
Instead, change the logic in that callback to arbitrarily reject parameters > 5.0 (for param1) or < -5.0 (for param2). That is a much better demonstration of what this node should do.
Also add in a print during the constructor, telling the user what to expect.
In particular, the 'on_set_parameter_callback' callback was checking for undeclared parameters, but that could not have been a problem since 'allow_undeclared_parameters' is set to false by default.
Instead, change the logic in that callback to arbitrarily reject parameters > 5.0 (for param1) or < -5.0 (for param2). That is a much better demonstration of what this node should do.
Also add in a print during the constructor, telling the user what to expect.