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

Fix AttributeError: 'Parameter' object attribute 'name' is read-only #957

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

Noel215
Copy link
Contributor

@Noel215 Noel215 commented Feb 28, 2023

Controller Manager Spawner dies. Bug introduced in #910

[spawner-5] [INFO] [1677569381.689833939] [spawner_joint_state_broadcaster]: Set controller type to "joint_state_broadcaster/JointStateBroadcaster" for joint_state_broadcaster
[gzserver-1] [INFO] [1677569381.690260863] [controller_manager]: Loading controller 'joint_state_broadcaster'
[gzserver-1] [INFO] [1677569381.696931235] [controller_manager]: Setting use_sim_time=True for joint_state_broadcaster to match controller manager (see ros2_control#325 for details)
[spawner-5] [INFO] [1677569381.704335963] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[spawner-5] Traceback (most recent call last):
[spawner-5]   File "/home/user/exchange/humble/sim_ws/install/controller_manager/lib/controller_manager/spawner", line 33, in <module>
[spawner-5]     sys.exit(load_entry_point('controller-manager==2.23.0', 'console_scripts', 'spawner')())
[spawner-5]   File "/home/user/exchange/humble/sim_ws/install/controller_manager/local/lib/python3.10/dist-packages/controller_manager/spawner.py", line 212, in main
[spawner-5]     load_parameter_file(node=node, node_name=prefixed_controller_name, parameter_file=param_file,
[spawner-5]   File "/opt/ros/humble/lib/python3.10/site-packages/ros2param/api/__init__.py", line 159, in load_parameter_file
[spawner-5]     load_parameter_dict(node=node, node_name=node_name, parameter_dict=param_dict)
[spawner-5]   File "/opt/ros/humble/lib/python3.10/site-packages/ros2param/api/__init__.py", line 117, in load_parameter_dict
[spawner-5]     parameters = parse_parameter_dict(namespace='', parameter_dict=parameter_dict)
[spawner-5]   File "/opt/ros/humble/lib/python3.10/site-packages/ros2param/api/__init__.py", line 108, in parse_parameter_dict
[spawner-5]     parameter = Parameter()
[spawner-5]   File "/opt/ros/humble/local/lib/python3.10/dist-packages/rcl_interfaces/msg/_parameter.py", line 80, in __init__
[spawner-5]     self.name = kwargs.get('name', str())
[spawner-5] AttributeError: 'Parameter' object attribute 'name' is read-only
[ERROR] [spawner-5]: process has died [pid 39835, exit code 1, cmd '/home/user/exchange/humble/sim_ws/install/controller_manager/lib/controller_manager/spawner joint_state_broadcaster --controller-manager controller_manager --controller-type joint_state_broadcaster/JointStateBroadcaster --param-file /home/user/exchange/humble/sim_ws/install/pmb2_controller_configuration/share/pmb2_controller_configuration/config/joint_state_broadcaster.yaml --ros-args'].

Copy link
Contributor

@livanov93 livanov93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.
LGTM!

Copy link

@DasRoteSkelett DasRoteSkelett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message could be more verbose, or at least mentioning an issue.
Other than then nitpicking, LGTM

Copy link
Member

@bmagyar bmagyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!

@bmagyar bmagyar merged commit fb89ad3 into ros-controls:master Feb 28, 2023
@bmagyar
Copy link
Member

bmagyar commented Feb 28, 2023

@Mergifyio backport to humble

@mergify
Copy link
Contributor

mergify bot commented Feb 28, 2023

backport to humble

❌ No backport have been created

  • Backport to branch to failed

GitHub error: Branch not found

  • Backport to branch humble in progress

mergify bot pushed a commit that referenced this pull request Feb 28, 2023
(cherry picked from commit fb89ad3)

# Conflicts:
#	controller_manager/controller_manager/spawner.py
@bmagyar
Copy link
Member

bmagyar commented Feb 28, 2023

@Mergifyio backport to humble

@mergify
Copy link
Contributor

mergify bot commented Feb 28, 2023

backport to humble

❌ No backport have been created

  • Backport to branch to failed

GitHub error: Branch not found

  • Backport to branch humble in progress

bmagyar added a commit that referenced this pull request Feb 28, 2023
… (#958)

* fix AttributeError: Parameter object attribute name is read-only (#957)

(cherry picked from commit fb89ad3)

# Conflicts:
#	controller_manager/controller_manager/spawner.py

* fix conflict

---------

Co-authored-by: Noel Jiménez García <48183611+Noel215@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants