Conversation
|
I would add some manual how too read logfile (including example). That is actually the most common question to me from colleagues. |
|
|
||
| - `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. |
There was a problem hiding this comment.
There is not mapping of inputs and outputs.
| }, | ||
| "links": [ | ||
| ["serial.raw", "gps.raw"], | ||
| ["gps.position", "app.position"] |
There was a problem hiding this comment.
The app module is missing, thus the config is invalid.
| ### 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. |
There was a problem hiding this comment.
From my point of view, the subt module is obsolete and it should not be listed in this doc.
| ```json | ||
| "links": [ | ||
| ["gps.position", "app.position"], | ||
| ["app.desired_speed", "base.speed"] |
There was a problem hiding this comment.
It should be explained why out_put/input channels may differs each other.
| logfile = 'myrobot-260310_123456.log' | ||
| names = lookup_stream_names(logfile) | ||
|
|
||
| with LogReader(logfile) as log: |
There was a problem hiding this comment.
Can you please also add a mention of the lookup_stream_id function and the other LogReader parameters (only_stream_id, clip_start_time_sec, clip_end_time_sec)?
ps: there is also follow parametre but i dont remember its purpose.
There was a problem hiding this comment.
OK, added new paragraph - is it enough? thanks
|
OK, thanks - merging ... |
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.