your code still has build issues btw
"manual" is a stringly-typed key with no compile-time safety. A typo here silently compiles and fails at runtime. Consider introducing a FeatureFlag enum with a toConfigKey() mapping, then overloading isFeatureEnabled(FeatureFlag) to delegate to the string version. Usage becomes isFeatureEnabled(FeatureFlag::Manual), which is typo-safe, autocomplete-friendly, and grep-reliable. The string overload can stay for config file parsing.
ie:
// FeatureFlag.h
enum class FeatureFlag {
Manual,
AutoReplay,
DebugOverlay,
// Add new flags here. Compiler enforces the switch stays in sync.
};
[[nodiscard]] constexpr std::string_view toConfigKey(FeatureFlag flag) {
switch (flag) {
case FeatureFlag::Manual: return "manual";
case FeatureFlag::AutoReplay: return "auto_replay";
case FeatureFlag::DebugOverlay: return "debug_overlay";
}
// Unreachable, but suppresses warnings on some compilers
return "";
}
typo: isFeatureEnable should be isFeatureEnabled
A lot of changes made using Claude, have potentially solved any collision problems and have integrated RVO controlled velocity with the Agent. I have attached the changes md file in the PR.Calude_Changes.md
Jonathan Ung (b3ebbb0c) at 08 Mar 17:40
Jonathan Ung (4beedb2e) at 08 Mar 17:40
[!718: 892-jimmyvu-behaviortree-making-navigateto-mor...
... and 1 more commit
Added dynamic path re-request functionality to the navigation system with two new DSL v2 utility nodes that allow robots to adaptively request new paths when their navigation target moves significantly during movement.
SetPrevNavigationTarget (src/agent/bt/nodesV2/utils/SetPrevNavigationTarget.h)
nav_to_x, nav_to_y) as previous coordinates (prev_x, prev_y)RequestPathIfTargetMoved (src/agent/bt/nodesV2/utils/RequestPathIfTargetMoved.h)
√(dx² + dy²)
pathTo() signal and updates previous coordinatesSetPrevNavigationTarget and RequestPathIfTargetMoved to NodeId enum in src/agent/bt/nodesV2/dsl/NodeId.h
prev_x and prev_y ports to PortId enum in src/agent/bt/nodesV2/dsl/PortId.h
BehaviorTreeManager.cpp to trigger auto-registrationThese nodes enable a ReactiveSequence pattern for adaptive navigation:
ReactiveSequence()
.child(Node(N::RequestPathIfTargetMoved)
.port(P::robot_id, port(P::robot_id))
.port(P::prev_x, var(P::prev_x))
.port(P::prev_y, var(P::prev_y))
.port(P::nav_to_x, port(P::nav_to_x))
.port(P::nav_to_y, port(P::nav_to_y))
.port(P::threshold, lit("50.0")))
.child(Node(N::FollowPathSmooth)
...)
Before:
After:
Closes #892
Jonathan Ung (b3ebbb0c) at 08 Mar 17:39
improvement to make navigateto more dynamic
... and 9 more commits
Added dynamic path re-request functionality to the navigation system with two new DSL v2 utility nodes that allow robots to adaptively request new paths when their navigation target moves significantly during movement.
SetPrevNavigationTarget (src/agent/bt/nodesV2/utils/SetPrevNavigationTarget.h)
nav_to_x, nav_to_y) as previous coordinates (prev_x, prev_y)RequestPathIfTargetMoved (src/agent/bt/nodesV2/utils/RequestPathIfTargetMoved.h)
√(dx² + dy²)
pathTo() signal and updates previous coordinatesSetPrevNavigationTarget and RequestPathIfTargetMoved to NodeId enum in src/agent/bt/nodesV2/dsl/NodeId.h
prev_x and prev_y ports to PortId enum in src/agent/bt/nodesV2/dsl/PortId.h
BehaviorTreeManager.cpp to trigger auto-registrationThese nodes enable a ReactiveSequence pattern for adaptive navigation:
ReactiveSequence()
.child(Node(N::RequestPathIfTargetMoved)
.port(P::robot_id, port(P::robot_id))
.port(P::prev_x, var(P::prev_x))
.port(P::prev_y, var(P::prev_y))
.port(P::nav_to_x, port(P::nav_to_x))
.port(P::nav_to_y, port(P::nav_to_y))
.port(P::threshold, lit("50.0")))
.child(Node(N::FollowPathSmooth)
...)
Before:
After:
Closes #892
nit: remove the unit testing stage altogether since it just runs as part of the memory check anyway
WorldStateEventHelper.h: define methods to extract telemetry/metrics from WorldState objectsWolrdStateSchema.h: Define inner structure of data which AnalyticsCore will use to store and pass dataAnalyticsCore Object which handles the actual population of WolrdStateSchema. Has slot to subscribe to updates from WorldStateManager.Closes #786
is this a sub?
Can you move this into a test util so other people can use it?
nit - put MS in the const name
Jonathan Ung (ccb3bd4d) at 01 Mar 18:24
testing POC v2 agent