-
Notifications
You must be signed in to change notification settings - Fork 237
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
set_parameters callback returns None #1423
Labels
more-information-needed
Further information is required
Comments
can you provide more description about this?
|
To set parameters from a list without Errors.
I get the error mentioned above when processing the second parameter
from rclpy.node import Node
class Test(Node):
def __init__(self):
super.__init__(node_name="test")
params_list = [
("param1", "val1"),
("param2", "val2"),
("param3", "val3")
]
self.declare_parameters(namespace="package_name", parameters=params_list) Same Issue happens on Jazzy as well, however different line number: Full Error msg:Traceback (most recent call last):
File "/opt/ros/jazzy/lib/my_pkg/action_server.py", line 441, in <module>
main()
File "/opt/ros/jazzy/lib/my_pkg/action_server.py", line 430, in main
test = Test()
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/ros/jazzy/lib/my_pkg/action_server.py", line 79, in __init__
self.declare_params()
File "/opt/ros/jazzy/lib/my_pkg/action_server.py", line 166, in declare_params
self.declare_parameters(namespace="my_pkg", parameters=params_list)
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/node.py", line 528, in declare_parameters
self._declare_parameter_common(
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/node.py", line 577, in _declare_parameter_common
result = self._set_parameters_atomically_common(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/node.py", line 910, in _set_parameters_atomically_common
if not result.successful:
^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'successful'
[ros2run]: Process exited with failure 1 |
@fujitatomoya if the result of this callback is None, there should be an exception handling, or something like that imo. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The callback returns None, and I get an error:
in this line 832
The text was updated successfully, but these errors were encountered: