-
Notifications
You must be signed in to change notification settings - Fork 21
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
Provide basic double, vector and matrix operations on signals #26
Comments
Hi, I think this would be the right thing to do, but we are currently looking at removing this project in favor of another python binding for dynamic-graph, which would be compatible with Python3, so I think this should be done directly in this new project. |
@nim65s, sounds good. Any chance to take a look at the new project? I tried to compile python2 on my mac and it fails -would be more than happy to try the new one on osx with python3. |
Hi, I had the same idea as you. It is actually easy to do. I started it on branch python_expression on my fork (https://github.com/jmirabel/dynamic-graph-python/tree/python_expression).
The two points are not very hard to solve though. |
It is far from ready for now, but the first stages of development are available here: https://github.com/nim65s/py-dynamic-graph I am currently trying different ways to bind eigen, so stack-of-tasks/eigenpy#35 is also makint troubles here. I also tried pybind11, but the project, even if it looks really nice and promising, seems to suffer from lack of maintenance time. Don't expect too much for this now, as this is not my main task, and I might not be the best guy to develop this. |
Sorry for the long delay in follow up on this. I really like the overall idea of having operators at the python level to manipulate signals. We could use template to automatically include new types. |
@olivier-stasse , thanks for your take on this.
I am not sure what you are referring to with "types from sot-core" here. Is type something like |
Hi, any update on this project? |
From LAAS, no and this is not in the roadmap. |
@jviereck we still have some issues with the new bindings on some of our repositories. But normally the bindings with python3 is working very well now. So if I understand correctly you want to build the graph of the signal using directly some algebra ? |
Now that we moved to boost python, it wouldn't be hard to achieve. Here are the steps, in case someone wants to work on this:
Signal<MatrixHomo>& operator* (Signal<MatrixHomo>& a, Signal<MatrixHomo>& b) {
// Create entity MatrixHomoProduct, and register it in the pool.
// plug the signals
return entity.sout;
}
The only annoying this is that the operation entity is not easily accessible. |
At this point doing basic algebraic operations with signals like adding two vector-signals or slicing a matrix requires using matrix/operator entities from sot-core 1. For convenience it would be great to have basic operators like addition, substraction, multiplication (including matrix-vector products etc) work on the python signals class directly. Like
etc.
Does this sounds like a good idea? It would required to move the sot-core matrix/operators into this repo.
The text was updated successfully, but these errors were encountered: