Code Monkey home page Code Monkey logo

Comments (8)

wxmerkt avatar wxmerkt commented on July 27, 2024 3

Checking the binary build log shows that it compiles with PINOCCHIO_WITH_HPP_FCL and also runs the collision tests successfully: https://build.ros2.org/job/Hbin_uJ64__pinocchio__ubuntu_jammy_amd64__binary/95/consoleFull

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 pinocchioTargets.cmake includes hpp-fcl for the pinocchio::pinocchio target.

So with this workaround, it compiles and runs:

ament_target_dependencies(pinocchio_example Eigen3 eigen3_cmake_module)
target_link_libraries(pinocchio_example PUBLIC pinocchio::pinocchio)

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

from pinocchio.

nim65s avatar nim65s commented on July 27, 2024 1

I'll be able to look into this next week, if @wxmerkt doesn't have any spare time before that

from pinocchio.

sea-bass avatar sea-bass commented on July 27, 2024 1

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 colcon build to build the package, which should work fine.

Now go into the file pinocchio_ros_example/src/pinocchio_example.cpp and uncomment these lines that call computeCollisions(). Building again, you'll find my error:

/workspace/src/pinocchio_ros_example/src/pinocchio_example.cpp:16:28: error: ‘computeCollisions’ is not a member of ‘pinocchio’
   16 |   auto result = pinocchio::computeCollisions(model, data, collision_model, collision_data, q);

from pinocchio.

sea-bass avatar sea-bass commented on July 27, 2024 1

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.

from pinocchio.

jcarpent avatar jcarpent commented on July 27, 2024

@wxmerkt @nim65s Any clue on this issue?

from pinocchio.

jcarpent avatar jcarpent commented on July 27, 2024

@scastro-bdai Could you provide reproducible command lines to try quickly in a docker image?

from pinocchio.

nim65s avatar nim65s commented on July 27, 2024

Thanks @wxmerkt !

from pinocchio.

sea-bass avatar sea-bass commented on July 27, 2024

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.

from pinocchio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.