Skip to content

Control system time #55

@ethanmusser

Description

@ethanmusser

Problem

Currently, we can publish LCM messages from multiple sources over multiple channels via the LcmPublisher class. These can be recorded and played back using the lcm-logger and lcm-logplayer LCM utilities. However, we have no good way of timestamping these outgoing messages.

Proposed Solution

Maintain a realtimetools::Timer object in the MjbotsControlLoop realtime thread, which acts as the global system time, and pass this to all objects that may publish LCM messages (e.g., robots, behaviors) or otherwise require system time via raw or shared pointers. This solution permits the synchronization of LCM messages based on recorded timestamps, which may be useful in debugging or examining logs. This solution is only trivial as long as the LCM publisher and control loop are running on the same thread.

Related Discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions