Discover agents via Nav2 nodes#38
Conversation
Signed-off-by: Xiyu Oh <xiyuoh@gmail.com>
There was a problem hiding this comment.
Thanks for these changes!
I think its a great idea to be able to automatically discover participants (like we do in rmf_participant_discover). However, I would caution against using node names since its super easy to remap them.
I would also caution against looking for bt_navigator fields.
The recommended way to handle this via the spec is here:
The challenge is to figure out which "agents" are configured via nav2. Right now this plugin will clone anything with a bt_navigator running.
Before moving further with this I want to know what your thoughts are about the over architecture of where nav2_traffic sits. Are we looking at
flowchart TD
A[Plan Executor] -->|~/safe_zone| B(nav2_traffic)
subgraph On Nav2 Robot
B --> C[Nav2]
end
Or
flowchart TD
subgraph On Cloud/edge/buzz-word for some server
A[Plan Executor] -->|~/safe_zone| B(nav2_traffic)
end
B --> C[Nav2]
If its the former a simple config file based approach would be preferred, IMO, the base robot may not even have nodes/topics remapped to its own name. Perhaps we would simply run one instance of the nav2_traffic plugin per robot.
We could alternatively use the latter approach. The challenge is we would have to forward ALL nav2 topics. IMO as nav2 evolves these could potentially change and it would mean maintaining a mapping (right now I think we just forward Odom).
Signed-off-by: Xiyu Oh <xiyuoh@gmail.com>
|
@arjo129 thanks for your suggestion, agreed! As discussed during the last PMC call, updated the agent registration on the nav2 node via a config. Deliberately left the config as bare as possible, in case we have other useful fields to add in the future. |
arjo129
left a comment
There was a problem hiding this comment.
For now this looks good to me. Im wondering if we should consider a version where we have one nav2 plugin per robot
|
|
||
| fn main() { | ||
| let args: Vec<String> = std::env::args().collect(); | ||
| let config_path = args |
There was a problem hiding this comment.
Can we consider using https://docs.rs/clap/latest/clap/
Currently the Nav2Traffic plugin agent spawning is hardcoded (i.e.
robot0androbot1). This PR switches it to discover any Nav2 nodes running and extracting agent names to spawn entities withNav2Agentcomponents accordingly. Specifically it looks for nodes with thebt_navigatorsuffix, which I thought should be identifiable enough.GenAI Use
We follow OSRA's policy on GenAI tools
Generated-by: Gemini 3.1 Pro