Skip to content
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

go/cli: mcap info show channels count #1051

Closed
wants to merge 2 commits into from
Closed

go/cli: mcap info show channels count #1051

wants to merge 2 commits into from

Conversation

pezy
Copy link
Contributor

@pezy pezy commented Jan 11, 2024

Public-Facing Changes

show channels count like channels(45): in mcap info print.

Description

The channels list printed by mcap info might have discontinuous sequence numbers due to certain reasons (for example, if one of the topics in the original recorded data has zero messages, then the mcap generated after using mcap filter will exhibit this). Therefore, it's important to visually see the number of channels.

@wkalt
Copy link
Contributor

wkalt commented Apr 22, 2024

this seems nice to me but the count formatting is inconsistent with the way other counts are displayed. Here is the existing info:

library:   mcap go v0.4.0                                              
profile:   ros1                                                        
messages:  1606                                                        
duration:  7.780758504s                                                
start:     2017-03-21T19:26:20.103843113-07:00 (1490149580.103843113)  
end:       2017-03-21T19:26:27.884601617-07:00 (1490149587.884601617)  
compression:
        zstd: [314/314 chunks] [119.10 MiB/58.57 MiB (50.82%)] [7.53 MiB/sec] 
channels:
        (0) /diagnostics              52 msgs (6.68 Hz)    : diagnostic_msgs/DiagnosticArray [ros1msg]  
        (1) /image_color/compressed  234 msgs (30.07 Hz)   : sensor_msgs/CompressedImage [ros1msg]      
        (2) /tf                      774 msgs (99.48 Hz)   : tf2_msgs/TFMessage [ros1msg]               
        (3) /radar/points            156 msgs (20.05 Hz)   : sensor_msgs/PointCloud2 [ros1msg]          
        (4) /radar/range             156 msgs (20.05 Hz)   : sensor_msgs/Range [ros1msg]                
        (5) /radar/tracks            156 msgs (20.05 Hz)   : radar_driver/RadarTracks [ros1msg]         
        (6) /velodyne_points          78 msgs (10.02 Hz)   : sensor_msgs/PointCloud2 [ros1msg]          
attachments: 0
metadata: 0

what about instead adding a "channels: 7" above where "attachments: 0" is printed?

@defunctzombie
Copy link
Contributor

@james-rms please take a look

go/cli/mcap/cmd/info.go Outdated Show resolved Hide resolved
Co-authored-by: james-rms <james.r.m.smith@gmail.com>
@james-rms
Copy link
Collaborator

Closing in favor of #1243

@james-rms james-rms closed this Sep 25, 2024
james-rms added a commit that referenced this pull request Sep 25, 2024
Merging #1051 with a small tweak to use Statistics's channel count if
available.

---------

Co-authored-by: peizhe.chen <peizhe.chen@horizon.cc>
Co-authored-by: pezy <urbancpz@gmail.com>
@pezy pezy deleted the go branch September 26, 2024 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants