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

Fix failure to find effort_controllers when building mimic_joint_controller #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sloretz
Copy link

@sloretz sloretz commented Dec 20, 2022

This fixes a build failure on all platforms on the ROS Noetic buildfarm: https://build.ros.org/job/Nbin_uF64__mimic_joint_controller__ubuntu_focal_amd64__binary/197/console

23:15:30 [ 50%] Building CXX object CMakeFiles/mimic_joint_controller.dir/src/mimic_joint_controller.cpp.o
23:15:30 /usr/lib/ccache/c++  -DROSCONSOLE_BACKEND_LOG4CXX -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"mimic_joint_controller\" -Dmimic_joint_controller_EXPORTS -I/tmp/binarydeb/ros-noetic-mimic-joint-controller-0.1.7/include -I/opt/ros/noetic/include -I/opt/ros/noetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp  -g -O2 -fdebug-prefix-map=/tmp/binarydeb/ros-noetic-mimic-joint-controller-0.1.7=. -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC   -o CMakeFiles/mimic_joint_controller.dir/src/mimic_joint_controller.cpp.o -c /tmp/binarydeb/ros-noetic-mimic-joint-controller-0.1.7/src/mimic_joint_controller.cpp
23:15:30 In file included from /tmp/binarydeb/ros-noetic-mimic-joint-controller-0.1.7/src/mimic_joint_controller.cpp:5:
23:15:31 /tmp/binarydeb/ros-noetic-mimic-joint-controller-0.1.7/include/mimic_joint_controller/mimic_joint_controller.h:9:10: fatal error: effort_controllers/joint_position_controller.h: No such file or directory
23:15:31     9 | #include <effort_controllers/joint_position_controller.h>
23:15:31       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23:15:31 compilation terminated.

Likely culprit is #81 removing the dependency on hardware_interface. mimic_joint_controller includes on headers from effort_controllers and hardware_interface, so it must have dependencies on them too.

#include <hardware_interface/joint_state_interface.h>
#include <effort_controllers/joint_position_controller.h>

@ye-luo-xi-tui
Copy link
Member

ye-luo-xi-tui commented Dec 31, 2022

Hello,sloretz.
You mentioned that it may cause by removing the dependency on hardware_interface.But controller_interface has the dependency on hardware_interface,isn't it?And I build it successfully on my PC.

@sloretz
Copy link
Author

sloretz commented Feb 25, 2023

But controller_interface has the dependency on hardware_interface,isn't it?

That's a good point. I still don't see a path to effort_controllers, but it looks like code has changed here and upstream. There are other issues preventing this from building, so I'm not sure if this is still an issue.

https://build.ros.org/job/Ndev__rm_controllers__ubuntu_focal_amd64/122/console

10:15:51 [ 16%] Building CXX object CMakeFiles/rm_chassis_controllers.dir/src/chassis_base.cpp.o
10:15:53 In file included from /tmp/ws/src/rm_controllers/rm_chassis_controllers/src/chassis_base.cpp:37:
10:15:53 /tmp/ws/src/rm_controllers/rm_chassis_controllers/include/rm_chassis_controllers/chassis_base.h:49:10: fatal error: nav_msgs/Odometry.h: No such file or directory
10:15:53    49 | #include <nav_msgs/Odometry.h>
10:15:53       |          ^~~~~~~~~~~~~~~~~~~~~
10:15:53 compilation terminated.

And I build it successfully on my PC.

One thing that might make a difference is if you're PC has ROS Noetic installed from debian packages. /opt/ros/noetic is a merged workspace, meaning the build might be able to find packages even if the package.xml is missing a dependency. The buildfarm only installs the packages specified in the package.xml. Building Noetic from source with catkin-tools or a prerelease test would be a good way to replicate what's happening on the buildfarm.

I'll leave this open for now, but feel free to close if it's no longer relevant.

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

Successfully merging this pull request may close these issues.

2 participants