Giter Site home page Giter Site logo

Comments (5)

pantor avatar pantor commented on August 12, 2024 1

I've now added a setup.py file and continuous deployment to PyPI, so you can install the Python module either via
pip install ruckig from PyPI or build it yourself via pip install . from the current directory. Does that clear up this issue?

from ruckig.

jonbinney avatar jonbinney commented on August 12, 2024 1

Thanks @pantor ! For my own workflow, I'd like to find a good way to have ruckig play nice with catkin. I think I can do that by doing something in cmake to trick setuptools into doing the "right thing" with respect to caktin's devel and install spaces. That is separate from this github issue though, and I consider this issue to be complete.

from ruckig.

traversaro avatar traversaro commented on August 12, 2024

A third option is just to use CMake to install the Python bindings without using neither catkin nor setuptools. Unfortunately the possible use cases of people using C++/Python bindings vary, so a rather general approach is traversaro@146e765 (warning: I did not test it explicitly), in which two options can control the installation behavior:

  • RUCKIG_PYTHON_INSTALL_IN_ACTIVE_SITE if this option is ON, the Python bindings are installed in the active site package directory (so with automatic support for venv or conda environments), similar to what happens when you install with setup.py .However, if the active Python interpreter is the system one, this will result in Python packages installed in the /usr prefix and and in any case outside the CMAKE_INSTALL_PREFIX , so I personally typically prefer to keep this option by default to OFF.
  • If RUCKIG_PYTHON_INSTALL_IN_ACTIVE_SITE is OFF, the installation directory absolute or relative to CMAKE_INSTALL_PREFIX can be specified with the RUCKIG_PYTHON_INSTALL_DIR, that is initialized with a reasonable Python-provided value. The user can set this value manually to the desired installation directory.

Clearly, this logic is rather complex and can be simplified if the workflow that the project needs to be supported are limited.

Furthermore, I am not an expert in catkin, so I do not know if this option could cover also the catkin installation workflow.

from ruckig.

pantor avatar pantor commented on August 12, 2024

From my perspective, Ruckig is primarily a C++ project, as it is designed to be used in the real-time control cycle where Python is typically avoided. So in general I would prefer @traversaro 's suggestion to use CMake for installing the Python library as well.

However, from your (and other feedback) it seems that the Python module is quite useful. That's why I'm thinking about uploading Ruckig to PyPI, so that it can be easily installed via pip. Would that help in your case? Do you need both the C++ and Python library? Then I would add a setup.py file one way or another.

from ruckig.

jonbinney avatar jonbinney commented on August 12, 2024

I'd like to contribute patches to ruckig, so I'm looking for a method that works well from source. A pip installable version may be useful for some people, but as you say, many people will need the C++ library so that they can use it in realtime scenarios. My own workflow for this type of thing is:

  1. Work out the basic math using sympy and jupyter notebooks
  2. Code the algorithm in python using numpy/etc to see if it works
  3. Code the algorithm in C++ to make it more useful for robots.

I like @traversaro's suggestion, and I'll do some experimenting with how that would interact with catkin. Ideally I could get catkin to set the Python3_SITEARCH cmake variable to the correct location.

from ruckig.

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.