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

Humble + Garden #260

Open
federicociresola opened this issue Mar 27, 2024 · 7 comments
Open

Humble + Garden #260

federicociresola opened this issue Mar 27, 2024 · 7 comments

Comments

@federicociresola
Copy link

federicociresola commented Mar 27, 2024

Hi,
I noticed that there is only support for Fortress with Humble but not for Garden, why? What is the problem to make a porting gz_ros2_control in Garden with Humble? Because I am working with PX4 and it works only with Gazebo Garden

@ahcorde
Copy link
Collaborator

ahcorde commented Mar 27, 2024

Hi @federicociresola if you compile the package from source you can use the combination that you want

@federicociresola
Copy link
Author

@ahcorde I have tried it but I obtained this error during the compilation

--- stderr: gz_ros2_control                               
/home/toshi/projects/SPARCS/locobot/ws_gz_control/src/gz_ros2_control/gz_ros2_control/src/gz_ros2_control_plugin.cpp: In member function ‘virtual void gz_ros2_control::GazeboSimROS2ControlPlugin::Configure(const Entity&, const std::shared_ptr<const sdf::v13::Element>&, gz::sim::v7::EntityComponentManager&, gz::sim::v7::EventManager&)’:
/home/toshi/projects/SPARCS/locobot/ws_gz_control/src/gz_ros2_control/gz_ros2_control/src/gz_ros2_control_plugin.cpp:424:67: error: ‘__gnu_cxx::__alloc_traits<std::allocator<hardware_interface::HardwareInfo>, hardware_interface::HardwareInfo>::value_type’ {aka ‘struct hardware_interface::HardwareInfo’} has no member named ‘hardware_plugin_name’
  424 |     std::string robot_hw_sim_type_str_ = control_hardware_info[i].hardware_plugin_name;
      |                                                                   ^~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/gz_ros2_control-system.dir/build.make:76: CMakeFiles/gz_ros2_control-system.dir/src/gz_ros2_control_plugin.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:139: CMakeFiles/gz_ros2_control-system.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2

OS: Ubuntu Desktop 22.04
ROS_VERSION: Humble
GAZEBO_VERSION: Garden

@ahcorde
Copy link
Collaborator

ahcorde commented Mar 27, 2024

did you checkout the right branch in gz_ros2_control? You should use humble

@federicociresola
Copy link
Author

federicociresola commented Mar 27, 2024

This error is showed in the main branch instead in humble didn't appear but in humble branch the folders are also with
ignition hence them can not work with Garden or am I making a mistake?

The same thing it is written in the compile section of the readme
image

@federicociresola
Copy link
Author

@ahcorde I discovered that from humble to iron, the package ros2_control has changed the internal API with this PR where it changed the variable name hardware_class_type with hardware_plugin_nameinside the struct called HardwareInfo

I tried to move into the branch iron and I changed the code here

std::string robot_hw_sim_type_str_ = control_hardware_info[i].hardware_plugin_name;

with the old variable name hardware_class_type and it seems that it works with Humble+Garden but I would like to have a your opinion about this workaround. Is it a good thing if I create a PR for the humble branch and I add the feature to work with Garden?

@yschulz
Copy link

yschulz commented Jun 14, 2024

Same issue with Humble + Harmonic. Thank you for the fix @federicociresola !

@mitanshu-2004
Copy link

Same issue with Humble + Harmonic. Thank you for the fix @federicociresola !

Hey, I am also trying Humble+harmonic but not able to setup gz_ros2_control. I didn't understand what is the fix

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

No branches or pull requests

4 participants