Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught exception when setting undeclared parameter #705

Closed
Karsten1987 opened this issue Apr 25, 2019 · 1 comment · Fixed by #718
Closed

Uncaught exception when setting undeclared parameter #705

Karsten1987 opened this issue Apr 25, 2019 · 1 comment · Fixed by #718
Assignees
Labels
bug Something isn't working

Comments

@Karsten1987
Copy link
Contributor

Bug report

Required Info:

  • Operating System:
    • OSX (i guess applicable to all)
  • Installation type:
    • source
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

ros2 run demo_nodes_cpp talker
ros2 param set talker non-declared-parameter 0.0

Expected behavior

talker nodes ignores undeclared parameter

Actual behavior

talker terminates with uncaught exception

@Karsten1987 Karsten1987 added bug Something isn't working ready Work is about to start (Kanban column) labels Apr 25, 2019
@jacobperron jacobperron added in progress Actively being worked on (Kanban column) and removed ready Work is about to start (Kanban column) labels May 14, 2019
jacobperron added a commit that referenced this issue May 14, 2019
…backs

Fixes #705.

If the set_parameters() call fails, it's nice to be able to return a partial result.
Since there is no convenient method to obtain a partial result, we call set_parameters()
once for each parameter.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron
Copy link
Member

Proposed fix in #718.

Now talker logs a warning and continues talking:

$ ros2 run demo_nodes_cpp talker
[INFO] [talker]: Publishing: 'Hello World: 1'
[INFO] [talker]: Publishing: 'Hello World: 2'
[INFO] [talker]: Publishing: 'Hello World: 3'
[WARN] [rclcpp]: Failed to set parameter: parameter 'non-declared-parameter' cannot be set because it was not declared
[INFO] [talker]: Publishing: 'Hello World: 4'
[INFO] [talker]: Publishing: 'Hello World: 5'
...

And the set command reports the error message:

$ ros2 param set talker non-declared-parameter 0.0
Setting parameter failed: parameter 'non-declared-parameter' cannot be set because it was not declared

@jacobperron jacobperron added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels May 15, 2019
jacobperron added a commit that referenced this issue May 15, 2019
…backs (#718)

Fixes #705.

If the set_parameters() call fails, it's nice to be able to return a partial result.
Since there is no convenient method to obtain a partial result, we call set_parameters()
once for each parameter.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron jacobperron removed the in review Waiting for review (Kanban column) label May 15, 2019
cho3 pushed a commit to cho3/rclcpp that referenced this issue Jun 3, 2019
…backs (ros2#718)

Fixes ros2#705.

If the set_parameters() call fails, it's nice to be able to return a partial result.
Since there is no convenient method to obtain a partial result, we call set_parameters()
once for each parameter.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
skucheria pushed a commit that referenced this issue Jul 13, 2019
…backs (#718)

Fixes #705.

If the set_parameters() call fails, it's nice to be able to return a partial result.
Since there is no convenient method to obtain a partial result, we call set_parameters()
once for each parameter.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Siddharth Kucheria <kucheria@usc.edu>
nnmm pushed a commit to ApexAI/rclcpp that referenced this issue Jul 9, 2022
* Add test subscriber lost_event
* Fix lint warning
* Remove test wait for lost event
* Check for fastrtps as unsupported
* Add check for event count returned
* Reformat to delete extra code
* Fix linter spacing

Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com>
DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this issue Aug 5, 2022
…dedExecutor (ros2#705)

* Fix bad_function_call in test_play by replacing rclcpp::spin_some with SingleThreadedExecutor
* Replace other instances of rclcpp::spin_some

Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants