# Writing a turtlebot controller

I am trying to implement a "controller" for turtlebot
Specifically, I wish to build a unit that subscribes to multiple topics, relevant to to motion control (goal, path, object detection, keyop, etc) that can affect the motion decision making.

For example - I get a path plan to follow, while getting a keyop command, while reading a range sensor that triggers the "stop or else you'd hit that obstacle" bit. Now, I wish to control this information - some of it needs to be discarded, some of it should be ignored for now (but not discarded) and some of it needs some processing.

The problems I get are as follows: 1.Due to the fact that callbacks are asynchronous, I need to make sure all the information is processed in a correct priority. 2. I need to save the information that was ignored for later processing. 3. I need to save the state of the system

I only can think of global state variables and global stacks for dealing with this, but I was hoping that a thing like message_filter is available for this purpose.

edit retag close merge delete