-
Notifications
You must be signed in to change notification settings - Fork 416
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
Unable to compile code with pinocchio::computeCollisions()
with ROS 2 Humble binary install
#2289
Comments
I'll be able to look into this next week, if @wxmerkt doesn't have any spare time before that |
@scastro-bdai Could you provide reproducible command lines to try quickly in a docker image? |
Switching to my personal account, but it's still me! I've made a simple repo here: https://github.com/sea-bass/pinocchio_ros_cpp_example As stated in the repo README, you should be able to do: docker compose build
docker compose run base Once you're in the container, you can do Now go into the file
|
Checking the binary build log shows that it compiles with Debug notes: Running the standard Docker image, installing Pinocchio from binaries shows HPP_FCL is included: docker run -it --rm ros:humble /bin/bash
apt update && apt install -y ros-humble-pinocchio
python3 -c "import pinocchio ; print(pinocchio.WITH_HPP_FCL)" When using the repro example (thank you!), it shows that it cannot find hpp-fcl during configuration. This is because it's not included in the exported dependencies, e.g. adding message (WARNING ${pinocchio_LIBRARIES}) shows that we are not linking to or exporting the dependency to hpp-fcl. However, we can see that the So with this workaround, it compiles and runs:
I.e. linking directly using CMake rather than using ament. I am not too familiar with ament so cannot say where exactly the packaging issue comes in. I fixed your example with this workaround and now it works fine: wxmerkt/pinocchio_ros_cpp_example@d000ca6 |
Brilliant, thank you for looking into this! I also don't know much about the inner workings of ament, but this workaround will for sure let us carry on with our work, without the need to build Pinocchio from source. |
Thanks @wxmerkt ! |
By the way... I fleshed out the example in https://github.com/sea-bass/pinocchio_ros_cpp_example, so now it runs and hopefully serves as an example for people using ROS 2 with Pinocchio. If there is any interest in this going in the regular documentation here, I'm happy to donate this example so it doesn't live on my personal account. |
Bug description
I've installed
ros-humble-pinocchio
package (it's version 2.6.21) which claims to have HPP-FCL support. However, I don't seem to be able to use collision checking functions.Expected behavior
Compiling code that calls
computeCollisions()
should work.Reproduction steps
I've successfully written a good deal of code, that loads models and computes forward kinematics and Jacobians... but when I try to bring in the
computeCollisions()
functions I get a build error:I have included the header:
#include "pinocchio/algorithm/geometry.hpp"
, which appears to be the right one for 2.6.21.Am I missing something obvious, or is there an issue with HPP-FCL support in the installed version?
I also tried to build Pinocchio 2.6.21 from source, and even after hard-coding the CMake option to build with collision support, this issue still persists. Seems none of the unit tests / examples involving collisions were compiled regardless... but I'm also very bad at understanding CMake, so it's likely user error.
System
The text was updated successfully, but these errors were encountered: