ros2_control icon indicating copy to clipboard operation
ros2_control copied to clipboard

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

Open destogl opened this issue 1 year ago • 7 comments

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

  • Adjustment how update_rate is passed to RM - now it is always passed after parameter is read.
  • enabling override of loading and parsing URDF in RM so that simulators can now use this to simplify data access. For example see ros-controls/gz_ros2_control#265
  • Check the example 9 in ros-controls/ros2_control_demos#486
  • Webots people are notified: cyberbotics/webots_ros2#916

destogl avatar Feb 01 '24 16:02 destogl

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 (fbb893b) to head (ff682bd).

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%) :arrow_up:

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%) :arrow_down:
...e_interface_testing/test/test_resource_manager.cpp 99.32% <100.00%> (+0.02%) :arrow_up:
...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%) :arrow_down:
...rface_testing/test/test_components/test_system.cpp 89.36% <66.66%> (-10.64%) :arrow_down:
hardware_interface/src/resource_manager.cpp 73.56% <93.82%> (+2.65%) :arrow_up:
controller_manager/src/controller_manager.cpp 74.41% <50.00%> (-0.15%) :arrow_down:

... and 1 file with indirect coverage changes

codecov[bot] avatar Feb 01 '24 16:02 codecov[bot]

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

mergify[bot] avatar Feb 25 '24 09:02 mergify[bot]

pending a Gazebo fixup PR

see ros-controls/gz_ros2_control#265

destogl avatar Apr 02 '24 11:04 destogl

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)

christophfroehlich avatar Apr 02 '24 21:04 christophfroehlich

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.

destogl avatar Apr 03 '24 08:04 destogl

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.

christophfroehlich avatar Apr 04 '24 19:04 christophfroehlich

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 https://github.com/gazebosim/gz-physics/issues/25#issuecomment-1948330215 using DetachableJoint

olivier-stasse avatar Apr 05 '24 05:04 olivier-stasse

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

mergify[bot] avatar Jun 17 '24 18:06 mergify[bot]

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

destogl avatar Jun 19 '24 18:06 destogl