Skip to content

Deep Dive for OSGAR Developers doc#1046

Open
m3d wants to merge 13 commits intomasterfrom
feature/deep-dive-doc
Open

Deep Dive for OSGAR Developers doc#1046
m3d wants to merge 13 commits intomasterfrom
feature/deep-dive-doc

Conversation

@m3d
Copy link
Copy Markdown
Member

@m3d m3d commented Apr 2, 2026

Elena prepared, I think a nice, documentation, how OSGAR works inside. If there is something you are missing there (or is even wrong!) please let me know. Thanks m.

@m3d m3d requested review from tajgr and zbynekwinkler April 2, 2026 09:50
@tajgr
Copy link
Copy Markdown
Collaborator

tajgr commented Apr 7, 2026

I would add some manual how too read logfile (including example). That is actually the most common question to me from colleagues.

doc/deep_dive.md Outdated

- `driver`: The Python class name or alias (e.g., `osgar.drivers.gps:GPS`).
- `init`: A dictionary of parameters passed to the module's `__init__` method.
- `bus`: (Implicitly handled) Mapping of inputs and outputs.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There is not mapping of inputs and outputs.

},
"links": [
["serial.raw", "gps.raw"],
["gps.position", "app.position"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The app module is missing, thus the config is invalid.

doc/deep_dive.md Outdated
### Simulation and Replay Mode
The "no system time" rule is what makes OSGAR powerful for both simulation and debugging:
- **In Replay**: `LogReader` reads the original timestamps from the log file. When a module calls `listen()`, it receives the exact same `timedelta` that was recorded during the real run. The module "thinks" it is running in real-time, even if the replay is running much faster.
- **In Simulation**: A simulator driver (e.g., `subt/simulation.py`) can publish a dedicated `sim_time_sec` channel. Other modules then synchronize their internal state to this published simulation time rather than the wall clock. This allows the simulation to run at any speed (or even pause) without affecting the robot's control logic.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

From my point of view, the subt module is obsolete and it should not be listed in this doc.

doc/deep_dive.md Outdated
```json
"links": [
["gps.position", "app.position"],
["app.desired_speed", "base.speed"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It should be explained why out_put/input channels may differs each other.

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