Here in the JTC, the state can be initialized from the command if the required param is set. The logic seems to require that you have both state and command interfaces in order to do the initialization. Specifically, you must have both state and command for velocity interfaces in order for this function to return true. If you have only state for velocity, it returns false. This means if you have command=position and state=position,velocity and ask the JTC to initialize from command, it won’t do it. To me this seems wrong. I would expect it to separately initialize position, velocity, acceleration, and effort, depending on whether there is a command interface available, regardless of whether there is a state interface. The only exception being you need a position state interface. Does this make sense? I already have a working prototype of this but I wanted to ask in case I am misunderstanding something. @Marq_Razz @christophfroehlich @bmagyar @saikishor
Here is my current implementation.
It passes all tests, but I had to modify the one relevant test because I am proposing different logic ![]()
By the way, these tests are great! They helped me catch and fix things quickly.
Overall the proposal sounds valid.I don’t know why you would ever want to initialize from the command interface but with the optional parameter it sounds easy enough to opt in. I would suggest you make a PR request with your changes. I was a little surprised how large the changes are but haven’t had a chance to try and wrap my head abound them to see how they allow this.
1 Like