Hi, I am working on adding the “FollowPath” goal behavior to carter_sim and adding my own node to pass the required Plan2Proto to the FollowPath node. I seem to have successfully added the FollowPath node, but I am running into issues adding my own custom node. Herein it is referred to as arena_pattern_gen with the codelet name ArenaPatternGen.
From what I understand, in addition to having my cpp and hpp files in the app directory, I should register the codelet in the header(hpp) file using the line
ISAAC_ALICE_REGISTER_CODELET(ArenaPatternGen);
then, add the node under navigation.graph.json (as it interacts with the navigation graph) and add the codelet as a component, under the type name registered in the header file:
{
"name": "arena_pattern_gen",
"components": [
{
"name": "message_ledger",
"type": "isaac::alice::MessageLedger"
},
{
"name": "arena_pattern_gen",
"type": "ArenaPatternGen"
}
]
}
and the edges:
{
"source": "arena_pattern_gen/arena_pattern_gen/plan",
"target": "follow_path/isaac.navigation.FollowPath/plan"
}
and the tick period in the navigation.config.json:
"arena_pattern_gen": {
"arena_pattern_gen": {
"tick_period": "250ms"
}
}
Finally, in the BUILD file, I add “isaac_cc_module” to the load() call and define the module:
isaac_cc_module(
name = "arena_pattern_gen",
srcs = ["ArenaPatternGen.cpp"],
hdrs = ["ArenaPatternGen.hpp"],
visibility = ["//visibility:public"],
deps = [
"//engine/alice",
"//messages",
],
)
and add it to the carter_sim app under “modules”:
isaac_app(
name = "carter_sim",
app_json_file = "carter_sim.app.json",
data = [
"//apps/assets/maps",
"//packages/map:libmap_module.so",
"carter.config.json",
"carter.graph.json",
"navigation.graph.json",
"navigation.config.json",
],
modules = [
[b] "//apps/carter_sim:arena_pattern_gen",
[/b] "navigation",
"perception",
"planner",
"viewers",
"flatsim",
],
)
However, when I try to run this I get the error:
engine/alice/backend/modules.cpp@271: Could not load component 'ArenaPatternGen'
I seem to be following all guides I can find to the letter. I have tried registering and referencing the codelet name both with and without the isaac:: namespace but this does not seem to make a difference.
I would appreciate it if anyone has experience with a problem like this, or any insight in general. I am willing to provide my full code here if it will help.
Thanks for reading!
- Travis