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

Mocking: map command interface to state interface of different types #885

Closed
tonynajjar opened this issue Jan 5, 2023 · 9 comments
Closed

Comments

@tonynajjar
Copy link
Contributor

tonynajjar commented Jan 5, 2023

Is your feature request related to a problem? Please describe.

I have a prismatic joint with one velocity command interface and one position state interface. In real world this translates to one linear actuator + a distance sensor tracking the tip.
I was able to create a controller for it. My problem is in running this controller in "simple simulation" with the GenericSystem.
Mirroring the command and state interfaces of the same type does not make sense here, what I need is for the velocity commands to be integrated and mapped to the position state interface - this would represent an idealistic simulation.

Do you think this is something that can be supported by the GenericSystem or should I create my own hardware interface that does this?

@destogl
Copy link
Member

destogl commented Jan 19, 2023

I have a prismatic joint with one velocity command interface and one position command interface.

Do you mean “velocity command interface and one position state interface”?

There is a PR from @livanov93 #540 that we never managed to polish out and finish. Maybe is that the best place to start. I would also need this, just didn't found time for it yet

@tonynajjar
Copy link
Contributor Author

Definitely yes, edited. Thanks

@destogl
Copy link
Member

destogl commented Jan 19, 2023

@tonynajjar please check my edited comment

@tonynajjar
Copy link
Contributor Author

I see. I still do wonder if it's a good idea to open up this door; the question if we implement this is where does it stop? What about deriving velocity from position (in the case of position command interface and velocity state interface)? Throw in acceleration in the mix and you have more combinations.

Do you think this is something that can be supported by the GenericSystem or should I create my own hardware interface that does this?

That's why I was asking this question. Perhaps the GenericSystem should stay as is but have an option to extend it?

@destogl
Copy link
Member

destogl commented Feb 9, 2023

I would personally like to have this. I had it already multiple times when this would be very handy. Implementing this we are covering 98+ % use-cases, from my experience having acceleration commanding interface is not so common – but we can know that first when we try it.

So, yes I would go down this path. I am pretty sure we will not get many questions about doing other crazy things there.

@christophfroehlich
Copy link
Contributor

I too tripped over this missing feature just now ^^ (velocity command -> integration to position state)

If no one is working on this right now, I'll have a look on the work from @livanov93 and make a PR for rolling. But maybe I just cherry pick the integration-part first.

@tonynajjar
Copy link
Contributor Author

tonynajjar commented Oct 4, 2023

Does #1028 close this ticket or is there something missing? (I haven't tested it yet but it's in backlog)

@christophfroehlich
Copy link
Contributor

I tested the same configuration as you were describing in the beginning with the latest feature -> I think we can close this as fixed!

@tonynajjar
Copy link
Contributor Author

Following up on this, you have one more successful test from my side 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants