robot_interfaces
robot_interfaces copied to clipboard
first action before reading first observation ?
https://github.com/open-dynamic-robot-initiative/robot_interfaces/blob/a738a3a61a4d96ab32c772b7e706c5bae2a1b0be/include/robot_interfaces/robot_backend.hpp#L119
I find it counter intuitive that the system waits for a first action before starting, as possibly the first action may depend on the robot state/observation.
My program was hanging forever and it took me a while to find that this was because I start my loop with:
robot_interfaces::TimeIndex time_index = ri_frontend_.get_current_timeindex();
which hanged forever as no first action had been sent yet.
I agree (I actually had the same issue once). I think the best solution would be to already provide observations immediately and only start sending actions once the first one is provided by the user.
@luator should I go ahead and work on this ? (want to make sure nobody else is currently doing this)
we should probably talk about it first, felix and i had some discussion and it is not really clear what is the best solution, there are some subtleties.
Il giorno mer 13 nov 2019 alle ore 10:31 Vincent Berenz < [email protected]> ha scritto:
@luator https://github.com/luator should I go ahead and work on this ? (want to make sure nobody else is currently doing this)
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/open-dynamic-robot-initiative/robot_interfaces/issues/10?email_source=notifications&email_token=AAO6EOUL6C72FBWT25RI63TQTPCQPA5CNFSM4JFNOND2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED5PKXI#issuecomment-553317725, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO6EOVFAIXRJZKC7CFV6UTQTPCQPANCNFSM4JFNONDQ .
To have this documented here: We decided in an offline-discussion to try the following solution:
- As soon as the backend is started, it starts adding observations to the time series.
- The action time series stay empty in the beginning and only start "running" once the first action is sent by the user. It starts with the proper non-zero timeindex so that it is in sync with the observations in the same way as it is now.
I can take a look into the code to get an idea how much effort it will be to implement this.
that would be great!