-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add progress bar for mcap convert
#973
Conversation
go/ros/bag2mcap.go
Outdated
@@ -225,7 +232,7 @@ func channelIDForConnection(connID uint32) (uint16, error) { | |||
return uint16(connID), nil | |||
} | |||
|
|||
func Bag2MCAP(w io.Writer, r io.Reader, opts *mcap.WriterOptions) error { | |||
func Bag2MCAP(w io.Writer, r io.Reader, opts *mcap.WriterOptions, progressBar *progressbar.ProgressBar) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like i should just put the progress bar in this function instead of injecting it 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that does seem nicer, but you'd just need to pass in a messageCount.
Maybe the cleanest option would be to pass in the *Info
struct, and then construct the progress bar in here? You need to call Info() outside this function (as you do) or else you would need to pass this a ReadSeeker, which you're not in position to do.
This looks great generally. The thing that's not clear to me is this:
the 1606 needs some units, and I have no idea what "it/s" is. I guess that's the conversion rate? We can probably either remove that, or change it to a MB/sec computation. |
go/ros/bag2mcap.go
Outdated
@@ -173,6 +173,10 @@ func processBag( | |||
} | |||
} | |||
|
|||
if err != nil { | |||
return err | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
go/ros/ros2db3_to_mcap.go
Outdated
|
||
if err != nil { | ||
return fmt.Errorf("failed to increment progress bar: %w", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
go/go.work
Outdated
@@ -1,4 +1,6 @@ | |||
go 1.18 | |||
go 1.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.18
This adds a progressbar to the `convert` command to show percentage completion of converting from both ros and db3 to mcap.
f985b99
to
5fcd91f
Compare
### Public-Facing Changes This adds a progress bar to show percentage completion when running `mcap convert ...`
Public-Facing Changes
This adds a progress bar when running
mcap convert ...