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

[ForceTorqueSensorBroadcaster] Create ParamListener and get parameters on configure #698

Merged
merged 4 commits into from Aug 18, 2023

Conversation

Noel215
Copy link
Contributor

@Noel215 Noel215 commented Jul 14, 2023

Hi,

After the last sync of humble, the ForceTorqueSensorBroadcaster stopped working for me. After looking for the issue, I've found that there is a validation of the parameter frame_id (added here), that is failing always because the parameters have not been loaded into the node yet and then, the parameter is empty at that point.

I have the parameter declared in the yaml file that I'm loading in the node but the error I'm having is the following:

[spawner-9] [INFO] [1689253918.601573973] [spawner_ft_sensor_controller]: Set controller type to "force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster" for ft_sensor_controller
[gzserver-1] [INFO] [1689253918.602927505] [controller_manager]: Loading controller 'ft_sensor_controller'
[gzserver-1] Exception thrown during init stage with message: Invalid value set during initialization for parameter 'frame_id': Parameter 'frame_id' cannot be empty 
[gzserver-1] [ERROR] [1689253918.613905153] [controller_manager]: Could not initialize the controller named 'ft_sensor_controller'
[INFO] [spawn_entity.py-3]: process has finished cleanly [pid 56778]
[spawner-9] [FATAL] [1689253918.815438355] [spawner_ft_sensor_controller]: Failed loading controller ft_sensor_controller
[ERROR] [spawner-9]: process has died [pid 56791, exit code 1, cmd '/home/user/exchange/alum/emergency_button/install/controller_manager/lib/controller_manager/spawner ft_sensor_controller --controller-manager controller_manager --controller-type force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster --param-file /home/user/exchange/alum/emergency_button/install/tiago_controller_configuration/share/tiago_controller_configuration/config/ft_sensor_controller.yaml --ros-args'].

By creating the ParamListener and reading the parameters on configure instead of on init is working for me. I would like to have also a backport for humble.

Thanks! :)

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2023

Codecov Report

Merging #698 (a60ee05) into master (e7f9962) will increase coverage by 0.75%.
Report is 352 commits behind head on master.
The diff coverage is 34.91%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #698      +/-   ##
==========================================
+ Coverage   35.78%   36.53%   +0.75%     
==========================================
  Files         189        7     -182     
  Lines       17570      676   -16894     
  Branches    11592      357   -11235     
==========================================
- Hits         6287      247    -6040     
+ Misses        994      134     -860     
+ Partials    10289      295    -9994     
Flag Coverage Δ
unittests 36.53% <34.91%> (+0.75%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...ontroller/test/test_load_diff_drive_controller.cpp 11.11% <0.00%> (ø)
diff_drive_controller/src/odometry.cpp 42.16% <11.11%> (ø)
diff_drive_controller/src/speed_limiter.cpp 46.55% <11.11%> (ø)
...ive_controller/test/test_diff_drive_controller.cpp 17.62% <12.08%> (ø)
...iff_drive_controller/src/diff_drive_controller.cpp 47.09% <46.88%> (ø)
...de/diff_drive_controller/diff_drive_controller.hpp 100.00% <100.00%> (ø)
...troller/include/diff_drive_controller/odometry.hpp 100.00% <100.00%> (ø)

... and 189 files with indirect coverage changes

@bmagyar bmagyar added the backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble. label Jul 14, 2023
Since the parameters are not declared on init anymore, they cannot be
set without declaring them before
@bmagyar bmagyar merged commit 32aaef7 into ros-controls:master Aug 18, 2023
13 checks passed
mergify bot pushed a commit that referenced this pull request Aug 18, 2023
…s on configure (#698)

* Create ParamListener and get parameters on configure

* Declare parameters for test_force_torque_sensor_broadcaster

Since the parameters are not declared on init anymore, they cannot be
set without declaring them before

---------

Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
(cherry picked from commit 32aaef7)
christophfroehlich pushed a commit that referenced this pull request Dec 4, 2023
…s on configure (#698)

* Create ParamListener and get parameters on configure

* Declare parameters for test_force_torque_sensor_broadcaster

Since the parameters are not declared on init anymore, they cannot be
set without declaring them before

---------

Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
(cherry picked from commit 32aaef7)
christophfroehlich added a commit that referenced this pull request Dec 5, 2023
…s on configure (backport #698) (#750)

* [ForceTorqueSensorBroadcaster] Create ParamListener and get parameters on configure (#698)

* Create ParamListener and get parameters on configure

* Declare parameters for test_force_torque_sensor_broadcaster

Since the parameters are not declared on init anymore, they cannot be
set without declaring them before

---------

Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
(cherry picked from commit 32aaef7)

* Fix "parameter is already declared" error

---------

Co-authored-by: Noel Jiménez García <noel.jimenez@pal-robotics.com>
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
saikishor added a commit to saikishor/ros2_controllers that referenced this pull request Jan 25, 2024
bmagyar pushed a commit that referenced this pull request Jan 29, 2024
mergify bot pushed a commit that referenced this pull request Jan 30, 2024
…arameters on configure (#698)" (#988)

This reverts commit 32aaef7.

(cherry picked from commit 7fee940)
mergify bot pushed a commit that referenced this pull request Jan 30, 2024
…arameters on configure (#698)" (#988)

This reverts commit 32aaef7.

(cherry picked from commit 7fee940)
bmagyar pushed a commit that referenced this pull request Jan 31, 2024
bmagyar pushed a commit that referenced this pull request Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants