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

[RM] Rename load_urdf method to load_and_initialize_components and add error handling there to avoid stack crashing when error happens. #1354

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

destogl
Copy link
Member

@destogl destogl commented Feb 1, 2024

Functionality discussed in the meeting on 31st of January 2024.

  • Don't crash is something fails when hardware compoentns are loaded and initialized and enable new sending of robot description in that case.

First part of functinality in #1237.

Other Changes

@destogl destogl self-assigned this Feb 1, 2024
@destogl destogl added bug enhancement high-priority backport-humble This label should be used by maintaines only! Label triggers PR backport to ROS2 humble. backport-iron This label should be used by maintaines only! Label triggers PR backport to ROS2 Iron. labels Feb 1, 2024
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: Patch coverage is 89.40397% with 16 lines in your changes missing coverage. Please review.

Project coverage is 87.79%. Comparing base (1ed61ef) to head (366f65c).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1354      +/-   ##
==========================================
+ Coverage   87.70%   87.79%   +0.08%     
==========================================
  Files         102      102              
  Lines        8704     8764      +60     
  Branches      780      787       +7     
==========================================
+ Hits         7634     7694      +60     
- Misses        790      792       +2     
+ Partials      280      278       -2     
Flag Coverage Δ
unittests 87.79% <89.40%> (+0.08%) ⬆️

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

Files Coverage Δ
.../include/controller_manager/controller_manager.hpp 100.00% <100.00%> (ø)
...ager/test/test_controller_manager_urdf_passing.cpp 100.00% <100.00%> (ø)
...rface/test/mock_components/test_generic_system.cpp 99.75% <100.00%> (ø)
...rface_testing/test/test_components/test_sensor.cpp 68.75% <100.00%> (-18.75%) ⬇️
...e_interface_testing/test/test_resource_manager.cpp 99.32% <100.00%> (+0.02%) ⬆️
...e_interface_testing/test/test_resource_manager.hpp 93.33% <100.00%> (ø)
...ace_testing/test/test_components/test_actuator.cpp 91.48% <0.00%> (-4.07%) ⬇️
...rface_testing/test/test_components/test_system.cpp 89.36% <66.66%> (-10.64%) ⬇️
hardware_interface/src/resource_manager.cpp 73.56% <93.82%> (+2.65%) ⬆️
controller_manager/src/controller_manager.cpp 74.41% <50.00%> (-0.15%) ⬇️

... and 1 file with indirect coverage changes

Copy link
Contributor

@fmauch fmauch left a comment

Choose a reason for hiding this comment

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

This seems fine and reflects the discussion in my opinion. I left a couple of comments/suggestions, but they should not be blocking this.

Copy link
Contributor

mergify bot commented Feb 25, 2024

This pull request is in conflict. Could you fix it @destogl?

Co-authored-by: Sai Kishor Kothakota <[email protected]>
@destogl
Copy link
Member Author

destogl commented Apr 2, 2024

pending a Gazebo fixup PR

see ros-controls/gz_ros2_control#265

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

minor comments

controller_manager/src/controller_manager.cpp Outdated Show resolved Hide resolved
hardware_interface/src/resource_manager.cpp Show resolved Hide resolved
controller_manager/src/controller_manager.cpp Outdated Show resolved Hide resolved
controller_manager/src/controller_manager.cpp Outdated Show resolved Hide resolved
controller_manager/src/controller_manager.cpp Outdated Show resolved Hide resolved
controller_manager/src/controller_manager.cpp Outdated Show resolved Hide resolved
@christophfroehlich
Copy link
Contributor

pending a Gazebo fixup PR

see ros-controls/gz_ros2_control#265

Do we want to maintain gazebo_ros2_control until EOL of Gazebo Classic? (at least for building it from source on jammy)

@destogl
Copy link
Member Author

destogl commented Apr 3, 2024

pending a Gazebo fixup PR

see ros-controls/gz_ros2_control#265

Do we want to maintain gazebo_ros2_control until EOL of Gazebo Classic? (at least for building it from source on jammy)

I don't want to put any effort there anymore. I am not using it or recommend to use it, so I think this will be a reson more for people to switch.

Co-authored-by: Sai Kishor Kothakota <[email protected]>
Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

Looks good to me! :)
Thanks for the changes. I will try to review also the PR of gz_ros2_control soon

@christophfroehlich
Copy link
Contributor

pending a Gazebo fixup PR

see ros-controls/gz_ros2_control#265

Do we want to maintain gazebo_ros2_control until EOL of Gazebo Classic? (at least for building it from source on jammy)

I don't want to put any effort there anymore. I am not using it or recommend to use it, so I think this will be a reson more for people to switch.

I still have to use it, because modern gazebo is not feature equal yet (e.g, no kinematic loops). As a consequence, we will already break the rolling-on-humble compatibility.

@olivier-stasse
Copy link
Contributor

olivier-stasse commented Apr 5, 2024

I still have to use it, because modern gazebo is not feature equal yet (e.g, no kinematic loops). As a consequence, we will already break the rolling-on-humble compatibility.

It looks like there is a way to handle parallel structure here gazebosim/gz-physics#25 (comment) using DetachableJoint

Copy link
Contributor

mergify bot commented Jun 17, 2024

This pull request is in conflict. Could you fix it @destogl?

@destogl destogl requested review from fmauch and saikishor June 17, 2024 18:41
Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

@destogl Looking great!
Thanks for following up. We should get this merged soon! :)

@destogl
Copy link
Member Author

destogl commented Jun 19, 2024

Tests are clean on rolling:

Hardware Interface:

build/hardware_interface/Testing/20240619-1807/Test.xml: 6 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface/test_results/hardware_interface/test_component_interfaces.gtest.xml: 9 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface/test_results/hardware_interface/test_component_parser.gtest.xml: 40 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface/test_results/hardware_interface/test_generic_system.gtest.xml: 22 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface/test_results/hardware_interface/test_inst_hardwares.gtest.xml: 3 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface/test_results/hardware_interface/test_joint_handle.gtest.xml: 5 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface/test_results/hardware_interface/test_macros.gtest.xml: 2 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface_testing/Testing/20240619-1745/Test.xml: 2 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface_testing/test_results/hardware_interface_testing/test_resource_manager.gtest.xml: 27 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface_testing/test_results/hardware_interface_testing/test_resource_manager_prepare_perform_switch.gtest.xml: 5 tests, 0 errors, 0 failures, 0 skipped

Hardware Interface Testing:

build/hardware_interface_testing/Testing/20240619-1808/Test.xml: 2 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface_testing/test_results/hardware_interface_testing/test_resource_manager.gtest.xml: 27 tests, 0 errors, 0 failures, 0 skipped
build/hardware_interface_testing/test_results/hardware_interface_testing/test_resource_manager_prepare_perform_switch.gtest.xml: 5 tests, 0 errors, 0 failures, 0 skipped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants