Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Support empty parameter list

Aperta
#227 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
cpp, python
Ambito
tooling

Direzione di ricerca

Start by tracing how the YAML parameter definition is handled and how it generates the C++ ParamListener and get_params() behavior. Check the generated update() loop against the reported type: none unused-variable error. Done means an empty parameter list is accepted, get_params() returns an empty list, and the existing dummy-parameter workaround is unnecessary.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

My goal is to be able to provide the infrastructure for a parameter library without requiring actual parameters. This could be because I'm stubbing out a class early in development or if I am just wanting to be consistent and provide an easy place for future work to add to.

Something like:

foo::bar_params: []

I would expect then that accessing the params with get_params() returns an empty list:

param_listener_ = std::make_shared<bar_params::ParamListener>(get_node());
params_ = param_listener_->get_params(); 
// params _is an empty list

The current workaround is to provide a dummy value:

foo::bar_params:
  dummy:
    type: int

but this just leads to cruft that I'd rather not have.
I tried to use the none type to not actually generate the dummy param, but this doesn't compile in C++ due to an unused-variable warning.

foo::bar_params:
  dummy:
    type: none
bar_params.hpp: In member function ‘rcl_interfaces::msg::SetParametersResult foo::bar_params::ParamListener::update(const std::vector<rclcpp::Parameter>&)’:
bar_params.hpp:135:24: error: unused variable ‘param’ [-Werror=unused-variable]
  135 |       for (const auto &param: parameters) {
Lingua principale
Python
Stelle
385
Fork
81
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PickNikRobotics/generate_parameter_library

Tutte le issue di PickNikRobotics/generate_parameter_library

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.