Passing standard variable types between codelets

Is there a way to pass standard variables (int, bool, double, string) between codelets, either by a global variable or edges? if so, how can it be done? I’ve tried both and have hit dead ends.

Hi Seen7780, what problem are you trying to solve?

I am trying to pass a variable from one codelet to another, so they can communicate without using proto messages, because I don’t believe proto message work for standard variable types. I am receiving an error like “module cannot open shared object file: no such file or directory”. if I cant open the header file in the other .cpp files how can i pass variables? I’ve also tried a separate .h file for global variable and that also doesn’t work with isaac sdk.

seen7780, there are at least two ways to do this that I can think of now:

  1. A codelet can read/write another codelet’s parameters. As an example, please check the following line of apps/carter/carter_delivery/CarterDelivery.hpp:
    navigation_mode_->set_desired_behavior(waypoint.empty() ? “stop” : “navigate”);
    You can do “get_” instead of “set_” to read.

  2. Although we are using it less and less ourselves lately, Isaac supports the variables you are describing. Please check engine/alice/tests/variables.cpp. You can do setVariable(“my_variable”, 2.3); in one codelet and getVariable(“my_variable”); in the other.