Skip to content

feat: spatiotemporal agent #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: development
Choose a base branch
from

Conversation

maciejmajek
Copy link
Member

Purpose

Even though latest LLMs have the context capacity reaching hundreds of thousands of tokens, the reasoning capabilities tend to decrease with the context size.

Proposed Changes

This PR introduces the SpatioTemporalAgent which runs on interval data (image, position, text history) gathering pipeline which can be later used by the agent to retrieve memories from a long time ago.

Issues

  • Links to relevant issues

Testing

  • How was it tested, what were the results?

@maciejmajek maciejmajek force-pushed the feat/spatiotemporal-agent branch 3 times, most recently from 586ab23 to 91bf95b Compare March 12, 2025 11:15
@maciejmajek maciejmajek changed the title feat: spatiotemporal agent feat: react agent Mar 12, 2025
@maciejmajek maciejmajek changed the title feat: react agent feat: spatiotemporal agent Mar 12, 2025
Copy link
Member

@boczekbartek boczekbartek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maciejmajek This PR looks really good! I'll report on testing in a separate comment. For now I left some comments to the code.

One general idea: I can see quite a lot of type: ignore in the code. One thing to consider would be to suppress annoying/not useful warnings for the entire file (or repo): see this link.
Just an idea, if you prefer type: ignore it's also fine, but for me slightly confusing.


The agent works with several key data structures:

- `SpatioTemporalData`: The main data container that includes:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more common to one entry in a database a "record"

Suggested change
- `SpatioTemporalData`: The main data container that includes:
- `SpatioTemporalRecord`: The main data container that includes:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent = ROS2SpatioTemporalAgent(config)
```

A complete working example can be found in `examples/agents/spatiotemporal.py`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be make it easier to try the agent if we'd recommend an example o3de binary here. How about this one?

]
}
},
limit=n_results,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will not return n_results closest, but n_results first found. Is it intended?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@boczekbartek
Copy link
Member

@maciejmajek I've tested the example agent with o3de rosbot_xl binary. One thing I had to change was the world_frame="odom" (here).

  • I was driving Rosbot using arrows in the simulation and it successfully collected observations in MongoDB. I checked that with MongoCompass
    image

However, I've only tested the "data collection" part of this PR. For the retrieval part I could not find the code to test. Do you have a snippet to test the retrieval part or how to add it to the example agent?

@maciejmajek maciejmajek force-pushed the feat/spatiotemporal-agent branch from 0aefa1f to b51196c Compare March 25, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants