Groot icon indicating copy to clipboard operation
Groot copied to clipboard

Blackboard lookup

Open Serafadam opened this issue 4 years ago • 4 comments

I think it would be a nice addition if there was a view of currently present Blackboard variables & their values. Or maybe that is implemented and I haven't seen that? I guess it's just a simple case of getting tree.blackboard_stack and printing its contents.

Serafadam avatar Apr 24 '20 14:04 Serafadam

I am tempted to say that it is impossible, but let's just say it is very hard to implement:

Groot and the BT.CPP executor are lously coupled and communicate over flatbuffer.

You change would involve a new flatbuffer protocol that include that. And about the values, do not forget that ANY C++ type is allowed.

Even if I serialize that, how can I make a user defined C++ type visible in Groot? I can not.

So, no, this will not happen, sorry.

facontidavide avatar May 13 '20 22:05 facontidavide

we may of course limit the scope to only types that are strings or can be converted to string (line numbers). That would be very limiting, but better than nothing.

Still a lot of work that I have no time to do, unfortunately.

facontidavide avatar May 14 '20 10:05 facontidavide

Would there be a way to make a mechanism that allows easy adding of such types? I haven't worked with flatbuffer, but won't creating schemas or using https://google.github.io/flatbuffers/flexbuffers.html help? Also if a custom type had an overloaded << operator for string representation, would that help?

Serafadam avatar May 15 '20 13:05 Serafadam

you are welcome to do that and send a PullRequest :)

It is a huge amount of work that I don't have time for further development of Groot right now.

facontidavide avatar May 15 '20 16:05 facontidavide