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

Python Binding for TaskActuationEquality #233

Open
ZafarArmaghan opened this issue Jul 31, 2024 · 4 comments
Open

Python Binding for TaskActuationEquality #233

ZafarArmaghan opened this issue Jul 31, 2024 · 4 comments

Comments

@ZafarArmaghan
Copy link

Hi,

Is there a python binding available for TaskActuationEquality.

I need to specify a passive joint in TSID. To do that, I want to set the torque of that joint to be equal to zero. However, when I try to implement it I get the following error.

"AttributeError: module 'tsid' has no attribute 'TaskActuationEquality' ".

@andreadelprete
Copy link
Collaborator

Unfortunately at the moment there are no python bindings for TaskActuationEquality. You could approximate by adding a large penalty on the torque of the passive joint. Alternatively, I could guide you through the implementation of the Python bindings, which is rather simple if you have some experience with C++.

@rua0ra1
Copy link

rua0ra1 commented Aug 1, 2024

Hi @andreadelprete ,
Thank you for your response to my colleague's question. We appreciate your assistance. I am happy to work on implementing the Python bindings as I have some experience with C++. Before I begin, are there any specific guidelines or instructions for this library that I should be aware of?

Thank you.

@andreadelprete
Copy link
Collaborator

Hi @rua0ra1 ,
the instructions for compiling the library from source are on the main github page of the project. Regarding the python bindings, it should be rather simple by following the examples of the other bindings. These are the steps that I think are necessary (I might miss something though):

  • create a new file task-actuation-equality.cpp in the folder bindings\python\tasks following the example of another file in that folder
  • in the folder include/tsid/bindings/python/tasksadd a file task-actuation-equality.hpp, following the example of another equality task, such as task-com-equality
  • in the file expose-tasks.hpp add a function to expose the new task

This should do it, but if you encounter any issue feel free to ask me here.

@rua0ra1
Copy link

rua0ra1 commented Aug 1, 2024

Thanks for the details @andreadelprete. I will work on it and get back to you if i encounter any issues. Thank you and have a good one :)

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

No branches or pull requests

3 participants