ADVRHumanoids / CartesianInterface

Package for generic cartesian control of floating base robots. It includes a ROS-based front end, as well as a programmatic API that can be used inside a real-time loop.
GNU General Public License v3.0
20 stars 1 forks source link

Export opensot tasks #60

Closed graiola closed 3 years ago

graiola commented 3 years ago

To be completed with a test suite...

EnricoMingo commented 3 years ago

I see a possible drawback: if the CartesI/O task give access to the pointer of the internal OpenSoT task, a user could directly set references to this one generating inconsistency with the one contained in the CartesI/O one. In fact, the update in the CartesI/O task set the references to the OpenSoT task. Just to keep in mind.

graiola commented 3 years ago

Does it make sense to allow external control of the tasks and relegate cartesio to be a kind of observer? For example in my case, I want to be able to set the references for some tasks but I still want cartesio to provide an api for some parameters.

EnricoMingo commented 3 years ago

The problem is that to have those parameters updated inside the OpenSoT tasks, the update() method needs to be called, therefore also references will be updated. So at the moment, it is not possible to have this mixed behavior. :(

Il giorno sab 29 mag 2021 alle ore 12:50 Gennaro Raiola < @.***> ha scritto:

Does it make sense to allow external control of the tasks and relegate cartesio to be a kind of observer? For example in my case, I want to be able to set the references for some tasks but I still want cartesio to provide an api for some parameters.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ADVRHumanoids/CartesianInterface/pull/60#issuecomment-850812921, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKBVSW64RNEYHGSPYRGSXTTQDBHHANCNFSM45XFJGTA .

-- PhD Mingo Hoffman Enrico Istituto Italiano di Tecnologia, Genova

graiola commented 3 years ago

Should we close this PR?

alaurenzi commented 3 years ago

If it's useful, we could add an API that allows the user to just use cartesio to construct opensot's stack of tasks, and then "manually" manage the autostack and solver without ever calling CartesianInterface::update()...

graiola commented 3 years ago

If it's useful, we could add an API that allows the user to just use cartesio to construct opensot's stack of tasks, and then "manually" manage the autostack and solver without ever calling CartesianInterface::update()...

It could be useful, and in my case, I would love to use Cartesio to expose the tasks sets and gets so that I can rely on it to work as a sort of API. Even better, it would be cool to be able to control some tasks with Cartesio (think about the arm on a quadruped, controlled by interactive markers) and others through independent C++ code (such as a walking pattern generator). Does it make sense?

alaurenzi commented 3 years ago

This is already possible by using the CartesIO C++ API, and running the RosServerClass component along with it (this will expose all topics/services/actions).

The mixed raw opensot + cartesio is problematic though, for the reasons that Enrico explained..

So I guess either one sticks to one API, or the other