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

Tidy upper part of info table #967

Merged
merged 3 commits into from
Sep 8, 2023
Merged

Tidy upper part of info table #967

merged 3 commits into from
Sep 8, 2023

Conversation

wkalt
Copy link
Contributor

@wkalt wkalt commented Sep 7, 2023

This aligns the spacing in the upper part of the "mcap info" output.

This aligns the spacing in the upper part of the "mcap info" output.
@wkalt wkalt requested a review from james-rms September 7, 2023 23:14
@wkalt
Copy link
Contributor Author

wkalt commented Sep 7, 2023

Before:

[~/work/mcap/go/cli/mcap] (main) $ mcap info ~/data/mcap/gps.mcap
library: mcap go v0.4.0
profile: ros1
messages: 30445
duration: 5m39.406125817s
start: 2021-03-22T08:03:38.38194777-07:00 (1616425418.381947770)
end: 2021-03-22T08:09:17.788073587-07:00 (1616425757.788073587)
compression:
	zstd: [1/1 chunks] [4.25 MiB/750.08 KiB (82.78%)] [2.21 KiB/sec]
channels:
  	(0) /gps/rxmrtcm       3025 msgs (8.91 Hz)   : ublox_msgs/RxmRTCM [ros1msg]
  	(1) /gps/navpvt        3364 msgs (9.91 Hz)   : ublox_msgs/NavPVT [ros1msg]
  	(2) /gps/fix           3364 msgs (9.91 Hz)   : sensor_msgs/NavSatFix [ros1msg]
  	(3) /gps/fix_velocity  3364 msgs (9.91 Hz)   : geometry_msgs/TwistWithCovarianceStamped [ros1msg]
  	(4) /gps/navstatus     3364 msgs (9.91 Hz)   : ublox_msgs/NavSTATUS [ros1msg]
  	(5) /gps/navposecef    3364 msgs (9.91 Hz)   : ublox_msgs/NavPOSECEF [ros1msg]
  	(6) /gps/navclock      3364 msgs (9.91 Hz)   : ublox_msgs/NavCLOCK [ros1msg]
  	(7) /gps/navheading    3364 msgs (9.91 Hz)   : sensor_msgs/Imu [ros1msg]
  	(8) /gps/navrelposned  3364 msgs (9.91 Hz)   : ublox_msgs/NavRELPOSNED9 [ros1msg]
  	(9) /gps/monhw          340 msgs (1.00 Hz)   : ublox_msgs/MonHW [ros1msg]
  	(10) /gps/navsat        168 msgs (0.49 Hz)   : ublox_msgs/NavSAT [ros1msg]
attachments: 0
metadata: 0

After


[~/work/mcap/go/cli/mcap] (maint/tidier-info-table) $ mcap info ~/data/mcap/gps.mcap
library: mcap go v0.4.0
profile: ros1
messages:30445
duration:5m39.406125817s
start:   2021-03-22T08:03:38.38194777-07:00 (1616425418.381947770)
end:     2021-03-22T08:09:17.788073587-07:00 (1616425757.788073587)
compression:
	zstd: [1/1 chunks] [4.25 MiB/750.08 KiB (82.78%)] [2.21 KiB/sec]
channels:
	(0) /gps/rxmrtcm     3025 msgs (8.91 Hz) : ublox_msgs/RxmRTCM [ros1msg]
	(1) /gps/navpvt      3364 msgs (9.91 Hz) : ublox_msgs/NavPVT [ros1msg]
	(2) /gps/fix         3364 msgs (9.91 Hz) : sensor_msgs/NavSatFix [ros1msg]
	(3) /gps/fix_velocity3364 msgs (9.91 Hz) : geometry_msgs/TwistWithCovarianceStamped [ros1msg]
	(4) /gps/navstatus   3364 msgs (9.91 Hz) : ublox_msgs/NavSTATUS [ros1msg]
	(5) /gps/navposecef  3364 msgs (9.91 Hz) : ublox_msgs/NavPOSECEF [ros1msg]
	(6) /gps/navclock    3364 msgs (9.91 Hz) : ublox_msgs/NavCLOCK [ros1msg]
	(7) /gps/navheading  3364 msgs (9.91 Hz) : sensor_msgs/Imu [ros1msg]
	(8) /gps/navrelposned3364 msgs (9.91 Hz) : ublox_msgs/NavRELPOSNED9 [ros1msg]
	(9) /gps/monhw        340 msgs (1.00 Hz) : ublox_msgs/MonHW [ros1msg]
	(10) /gps/navsat      168 msgs (0.49 Hz) : ublox_msgs/NavSAT [ros1msg]
attachments: 0
metadata: 0

@jtbandes
Copy link
Member

jtbandes commented Sep 7, 2023

Can you add a +1 somewhere to ensure there's always at least one space? I think messages:30445 looks weird

@wkalt
Copy link
Contributor Author

wkalt commented Sep 8, 2023

@jtbandes thanks for catching that. Here is the new output:

[~/work/mcap/go/cli/mcap] (maint/tidier-info-table) $ mcap info ~/data/mcap/gps.mcap
library:   mcap go v0.4.0
profile:   ros1
messages:  30445
duration:  5m39.406125817s
start:     2021-03-22T08:03:38.38194777-07:00 (1616425418.381947770)
end:       2021-03-22T08:09:17.788073587-07:00 (1616425757.788073587)
compression:
        zstd: [1/1 chunks] [4.25 MiB/750.08 KiB (82.78%)] [2.21 KiB/sec]
channels:
        (0) /gps/rxmrtcm       3025 msgs (8.91 Hz)   : ublox_msgs/RxmRTCM [ros1msg]
        (1) /gps/navpvt        3364 msgs (9.91 Hz)   : ublox_msgs/NavPVT [ros1msg]
        (2) /gps/fix           3364 msgs (9.91 Hz)   : sensor_msgs/NavSatFix [ros1msg]
        (3) /gps/fix_velocity  3364 msgs (9.91 Hz)   : geometry_msgs/TwistWithCovarianceStamped [ros1msg]
        (4) /gps/navstatus     3364 msgs (9.91 Hz)   : ublox_msgs/NavSTATUS [ros1msg]
        (5) /gps/navposecef    3364 msgs (9.91 Hz)   : ublox_msgs/NavPOSECEF [ros1msg]
        (6) /gps/navclock      3364 msgs (9.91 Hz)   : ublox_msgs/NavCLOCK [ros1msg]
        (7) /gps/navheading    3364 msgs (9.91 Hz)   : sensor_msgs/Imu [ros1msg]
        (8) /gps/navrelposned  3364 msgs (9.91 Hz)   : ublox_msgs/NavRELPOSNED9 [ros1msg]
        (9) /gps/monhw          340 msgs (1.00 Hz)   : ublox_msgs/MonHW [ros1msg]
        (10) /gps/navsat        168 msgs (0.49 Hz)   : ublox_msgs/NavSAT [ros1msg]
attachments: 0
metadata: 0

@wkalt
Copy link
Contributor Author

wkalt commented Sep 8, 2023

last iteration pads the topic names after the chan IDs:


[~/work/mcap/go/cli/mcap] (maint/tidier-info-table) $ mcap info ~/data/mcap/gps.mcap
library:   mcap go v0.4.0
profile:   ros1
messages:  30445
duration:  5m39.406125817s
start:     2021-03-22T08:03:38.38194777-07:00 (1616425418.381947770)
end:       2021-03-22T08:09:17.788073587-07:00 (1616425757.788073587)
compression:
        zstd: [1/1 chunks] [4.25 MiB/750.08 KiB (82.78%)] [2.21 KiB/sec]
channels:
        (0)  /gps/rxmrtcm       3025 msgs (8.91 Hz)   : ublox_msgs/RxmRTCM [ros1msg]
        (1)  /gps/navpvt        3364 msgs (9.91 Hz)   : ublox_msgs/NavPVT [ros1msg]
        (2)  /gps/fix           3364 msgs (9.91 Hz)   : sensor_msgs/NavSatFix [ros1msg]
        (3)  /gps/fix_velocity  3364 msgs (9.91 Hz)   : geometry_msgs/TwistWithCovarianceStamped [ros1msg]
        (4)  /gps/navstatus     3364 msgs (9.91 Hz)   : ublox_msgs/NavSTATUS [ros1msg]
        (5)  /gps/navposecef    3364 msgs (9.91 Hz)   : ublox_msgs/NavPOSECEF [ros1msg]
        (6)  /gps/navclock      3364 msgs (9.91 Hz)   : ublox_msgs/NavCLOCK [ros1msg]
        (7)  /gps/navheading    3364 msgs (9.91 Hz)   : sensor_msgs/Imu [ros1msg]
        (8)  /gps/navrelposned  3364 msgs (9.91 Hz)   : ublox_msgs/NavRELPOSNED9 [ros1msg]
        (9)  /gps/monhw          340 msgs (1.00 Hz)   : ublox_msgs/MonHW [ros1msg]
        (10) /gps/navsat         168 msgs (0.49 Hz)   : ublox_msgs/NavSAT [ros1msg]
attachments: 0
metadata: 0

@wkalt wkalt merged commit 8ac076a into main Sep 8, 2023
24 checks passed
@wkalt wkalt deleted the maint/tidier-info-table branch September 8, 2023 22:46
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.

2 participants