RoboTeamTwente / roboteam_world

Package to keep and filter the status of the world.
3 stars 1 forks source link

Make library out of state prediction #54

Open RobotJente opened 4 years ago

RobotJente commented 4 years ago

In AI we don't have access to any of the fancy models from control. These models are mostly reimplemented in a simpler form in AI as far as I could tell, and this causes a lot of duplicate code. I think it would be nice if they could be in some sort of library form

rolfvdhulst commented 4 years ago

Which models specifically are you talking about here? The robot movement model, the ball model? Because at the moment all they do is simply filtering the data and giving the best estimate to the AI, which makes it quite useless to make more available than that to our AI. We could somehow make more information available (especially on the ball), but we would have to think about what is relevant and what is not relevant data/ will be explicitly needed. As said before, I personally think that one of the most relevant things we could do for this is move AI/World to the same application so requesting data for models becomes easier to e.g. share. To this end I have already defined worldUtils as a library to be easily used in other applications.

RobotJente commented 4 years ago

All of them. The problem I see is that the same code is implemented twice in 2 different places. I now understand why you want them to be the same application: requesting data from world becomes a lot easier if they are the same program... However this sounds to me like a lot of work, I might be mistaken. But having the code for the models in 1 place is a good first step I think

rolfvdhulst commented 4 years ago

All of them. The problem I see is that the same code is implemented twice in 2 different places. I now understand why you want them to be the same application: requesting data from world becomes a lot easier if they are the same program... However this sounds to me like a lot of work, I might be mistaken. But having the code for the models in 1 place is a good first step I think

I don't really get what you mean with code being implemented twice in different places. Roboteam_AI's code is about world interpretation/usage and this code is about filtering data.

It's not actually a lot of work to port actually. It's literally a library. You can link worldUtils to roboteam_AI in the main loop, construct a worldFilter there and make sure AI gets the relevant commands and boom you're done.

I would still however suggest that there's a pure data layer in between roboteam_AI and roboteam_world and that roboteam_AI cannot directly call roboteam_world except through the data it outputs. We could also simply send all the parameters necessary to calculate the models (which are not that many actually). Roboteam_world as it is now is not responsible for data analysis but for filtering and interpretation and I would personally like to keep it that way. If there is relevant information the AI needs it should be filtered and put in this data format, rather than AI requesting it when necessary (unless there is a massive overhead to computing this data and it is only sparsely needed, but this is not the case as of now). That way we keep a nice separation of concerns.