Unexpected behaviour of `mcap convert` with flag `--strict-message-order`
bug
**Description**
- Version: mcao go v1.7.1 (I think)
- Platform: Ubuntu 20.04
**Steps To Reproduce**
```bash
mcap convert mydata.bag mydata.mcap --strict-message-order
mcap doctor mydata.mcap
```
Depending on the original ros1 data, `convert` does not sort the data by log message order, and `doctor` complains about this, generating messages like this:
```
Message.log_time <timestamp> on "<topic>" is less than the latest log time <timestamp>
```
Similarly `mcap merge mydata.mcap myotherdata.mcap -o mergeddata.mcap --strict-message-order` does not produce log-time sorted files.
**Expected Behavior**
Applying the `--strict-message-order` global flag, which is documented as `--strict-message-order Require that messages have a monotonic log time`, should result in sorted files.
If this flag does not apply to all available commands, then maybe it shouldn't be a global flag?
**Workaround**
Run `mcap sort` afterwards.
关闭于 2026-03-23 1 条评论