leggedrobotics / ocs2

Optimal Control for Switched Systems
https://leggedrobotics.github.io/ocs2
BSD 3-Clause "New" or "Revised" License
893 stars 226 forks source link

build error no matching function for call #28

Closed alme96 closed 2 years ago

alme96 commented 2 years ago

Describe the bug -Build error due to no matching function for call to from robot_state_publisher::RobotStatePublisher::publishFixedTransforms(bool) -this error affects ocs2_ballbot_ros, ocs2_legged_robot and ocs2_mobile_manipulator_ros

To Reproduce Steps to reproduce the behavior: following the installation instructions form OCS2 documentation and also installed all the optional dependencies (pinocchio, raisim) I needed to add "leggedrobotics/anymal_c_simple_description" to src

Expected behavior successful building of ocs2

Screenshots Screenshot from 2021-12-16 13-20-47

Desktop (please complete the following information):

rubengrandia commented 2 years ago

This is an interface change in the ros package robot_state_publisher between Melodic and Noetic. As written in the documentation, we currently only support Ubuntu 20.04 and its default ROS version (Noetic).

wangarcher commented 2 years ago

try to make a minor modification to the osc2 source code. change the corresponding line into: robotStatePublisherPtr_->publishFixedTransforms("", true); to fit the melodic-devel robot_state_publisher package. I've tested it, and it worked without any problem. There might be other problems like this. Check the source code of the robot_state_publisher for both branches (melodic and noetic), and change the code properly.