chvmp / champ

MIT Cheetah I Implementation
BSD 3-Clause "New" or "Revised" License
1.47k stars 342 forks source link

Compilation error on ros2 galactic #110

Closed tuschla closed 1 year ago

tuschla commented 1 year ago

I get the following error when doing colcon build on the ros2 branch. Thanks for the help.

Starting >>> champ_gazebo                
--- stderr: champ_gazebo                                                                          
In file included from /home/lt/kamaro/Incremental-Learning/install/champ_msgs/include/champ_msgs/msg/contacts_stamped.hpp:9,
                 from /home/lt/kamaro/Incremental-Learning/src/champ/champ_gazebo/src/contact_sensor.cpp:26:
/home/lt/kamaro/Incremental-Learning/install/champ_msgs/include/champ_msgs/msg/detail/contacts_stamped__traits.hpp: In function ‘void rosidl_generator_traits::to_yaml(const ContactsStamped&, std::ostream&, size_t)’:
/home/lt/kamaro/Incremental-Learning/install/champ_msgs/include/champ_msgs/msg/detail/contacts_stamped__traits.hpp:32:17: error: invalid initialization of reference of type ‘const ContactsStamped&’ {aka ‘const champ_msgs::msg::ContactsStamped_<std::allocator<void> >&’} from expression of type ‘const _header_type’ {aka ‘const std_msgs::msg::Header_<std::allocator<void> >’}
   32 |     to_yaml(msg.header, out, indentation + 2);
      |             ~~~~^~~~~~
/home/lt/kamaro/Incremental-Learning/install/champ_msgs/include/champ_msgs/msg/detail/contacts_stamped__traits.hpp:23:44: note: in passing argument 1 of ‘void rosidl_generator_traits::to_yaml(const ContactsStamped&, std::ostream&, size_t)’
   23 |   const champ_msgs::msg::ContactsStamped & msg,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/lt/kamaro/Incremental-Learning/install/champ_msgs/include/champ_msgs/msg/detail/contacts_stamped__traits.hpp:49:9: error: ‘value_to_yaml’ was not declared in this scope
   49 |         value_to_yaml(item, out);
      |         ^~~~~~~~~~~~~
make[2]: *** [CMakeFiles/contact_sensor.dir/build.make:63: CMakeFiles/contact_sensor.dir/src/contact_sensor.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/contact_sensor.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< champ_gazebo [12.9s, exited with code 2]
physicsfreak963 commented 3 months ago

I'm running through similar issue, can you provide how you fixed the issue