My previous patches accidentally disabled *all* (3) reset messages,
instead of keeping exactly one. This patch sends exactly one empty description
(reset) message every time an introspection instance is constructed for a task.
Notice the additional increase of the description queue_size from 1 to 2 to avoid
directly dropping the reset message in favor of the new description likely to be send
shortly afterwards.
So far, the start_scene field of a SolutionMsg was only filled by Introspection::fillSolution(),
but not yet by Task::execute().
Addendum(v4hn): The previous approach was actually reasonable too (although the scene should have been marked as `is_diff`) for solutions sent for execution, but keeping the full start_scene around can facilitate debugging from recorded data.
Probably the most invasive format patch, also changing some internal API.
I deliberately disabled ClassCase and MethodCase checks for the moment
to avoid public API changes in this patch set.
To move a task instance to another one, it's not sufficient to swap all task members,
but we also need to adapt all back pointers, i.e. me_ and parent_ pointers of children,
to point to the (swapped) task instances.
- solutions_, failures_ as SolutionBaseConstPtrs in StagePrivate
- replace processSolutions() / processFailures() by direct const-access to storage containers
- generic sendForward(), sendBackward(), spawn(), connect() methods in StagePrivate
- reuse StagePrivate's sendForward(), sendBackward(), spawn() in containers
- store created InterfaceStates in StagePrivate::states_
- Interface: ordered<InterfaceState*> (only store pointers)
allows for common handling of states of valid and failure solutions
- remove additional state+solution storages
- containers: internal->external state mapping as InterfaceState* -> InterfaceState*
- store "failure" solutions to facilitate debugging
- Introspection assigns solution IDs as soon as they are created in a stage
Thus, solution IDs represent their creation order.
In contrast, the order of publishing (in StageStatistics) should
represent the cost order.
- Storing failures is disabled if Introspection is not available.
The task id was not unique enough to distinguish different tasks.
When a task publisher is killed and restarted, it usually comes up with
the same task id. However, visualization doesn't notice this change and
get confused / crashes when receiving task statistics and solutions.
- make TaskStatistics a latched topic too
- subscribing to topics in order (1. description, 2. statistics, 3. solution)
should ensure that we receive those latched messages in this order