A tool that simply cuts rosbag files within a specified start and end date and time.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ros2bagcut-1.0.0.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file ros2bagcut-1.0.0.tar.gz
.
File metadata
- Download URL: ros2bagcut-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e401d3646a72e8a5be952ace1b81c37cf986b00fa463972b285a1a744da2ddda |
|
MD5 | 6ea50162d1e8370f5793d68bbb6106bf |
|
BLAKE2b-256 | ee40adfbb8117532c379834ff048891963cb852941dbf4a0654a10af34654eae |
File details
Details for the file ros2bagcut-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: ros2bagcut-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9324ed9e6fc61d42a6810d31b36312f1b9ff3c62c2dff6335693138b5e6d2935 |
|
MD5 | 4882a6e55f9253d25c1f1924b2a7ad94 |
|
BLAKE2b-256 | 82372405d16eae2070cf23ac7c063f9bfb57edbcd975683b9881a5beb4c953b0 |