ros2bagcut
A tool that simply cuts rosbag files within a specified start and end date and time.
1. Install ROS2
DISTRO=humble
sudo apt update && sudo apt install -y locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
-o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update
sudo apt install -y ros-${DISTRO}-rosbag2
2. Install ros2bagcut
pip install ros2bagcut
3. Usage
ros2bagcut \
-i rosbag2_2024_01_12-09_37_34_0.db3 \
-o rosbag2_2024_01_12-09_37_34_0_cut.db3 \
-st 2024 1 12 18 37 55 \
-tz Asia/Tokyo
usage: ros2bagcut
[-h]
[-i INPUT_BAG_FILE]
[-o OUTPUT_BAG_FILE]
[-st STARTTIME STARTTIME STARTTIME STARTTIME STARTTIME STARTTIME]
[-et ENDTIME ENDTIME ENDTIME ENDTIME ENDTIME ENDTIME]
[-tz {
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
...
America/Adak
America/Anchorage
America/Anguilla
...
Asia/Aden
Asia/Almaty
Asia/Amman
Asia/Anadyr
Asia/Aqtau
Asia/Tokyo
...
Europe/Amsterdam
Europe/Andorra
Europe/Astrakhan
Europe/Athens
Europe/Belgrade
...
Pacific/Apia
Pacific/Auckland
Pacific/Bougainville
...
}]
options:
-h, --help
show this help message and exit
-i INPUT_BAG_FILE, --input_bag_file INPUT_BAG_FILE
Input bag file name.
-o OUTPUT_BAG_FILE, --output_bag_file OUTPUT_BAG_FILE
Output bag file name.
-st STARTTIME STARTTIME STARTTIME STARTTIME STARTTIME STARTTIME, \
--starttime STARTTIME STARTTIME STARTTIME STARTTIME STARTTIME STARTTIME
Cut start time and date, minute, second.
If not specified, start from the beginning.
e.g. --starttime {year} {mont} {day} {hour} {minute} {second}
-et ENDTIME ENDTIME ENDTIME ENDTIME ENDTIME ENDTIME, \
--endtime ENDTIME ENDTIME ENDTIME ENDTIME ENDTIME ENDTIME
Cut end time and date, minute, second.
If unspecified, to the end.
e.g. --endtime {year} {mont} {day} {hour} {minute} {second}
-tz {...}, --timezone {...}
Time zone string.
Metadata
Release files for ros2bagcut 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ros2bagcut-1.0.0.tar.gz | 5.3 kB | Without provenance | Details for ros2bagcut-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ros2bagcut-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for ros2bagcut-1.0.0-py3-none-any.whl |
Total release size: 11.5 kB
Release files / ros2bagcut-1.0.0.tar.gz
| Download URL | ros2bagcut-1.0.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e401d3646a72e8a5be952ace1b81c37cf986b00fa463972b285a1a744da2ddda
|
|
BLAKE2b-256 checksum How to use checksums |
ee40adfbb8117532c379834ff048891963cb852941dbf4a0654a10af34654eae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / ros2bagcut-1.0.0-py3-none-any.whl
| Download URL | ros2bagcut-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9324ed9e6fc61d42a6810d31b36312f1b9ff3c62c2dff6335693138b5e6d2935
|
|
BLAKE2b-256 checksum How to use checksums |
82372405d16eae2070cf23ac7c063f9bfb57edbcd975683b9881a5beb4c953b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for ros2bagcut 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.