-
Notifications
You must be signed in to change notification settings - Fork 2
MCAP rosbags
Effie Daum edited this page Feb 4, 2024
·
1 revision
wget https://github.com/foxglove/mcap/releases/latest/download/mcap-linux-amd64 -O ~/.local/bin/mcap
sudo chmod +x ~/.local/bin/mcap
Get informations about a mcap
import sys
from mcap.reader import make_reader
filename = None
mcapfile = filename or sys.argv[1]
with open(filename, "rb") as f:
reader = make_reader(f)
header = reader.get_header()
msg_profile = header.profile
mcap_version = header.library
summary = reader.get_summary()
statistics = summary.statistics
schemas = summary.schemas
channels = summary.channels
start = statistics.message_start_time
end = statistics.message_end_time
# schemas : {id: Schema(id=id,data=msg_definition, encoding='ros1msg'/'ros2msg', name='sensor_msgs/msg/Imu')}
# channels : {id: Channel(id=id,topic='/topic', message_encoding='cdr', metadata={'offered_qos_profiles': '{}'}, schema_id=schema_id)}
for schema, channel, message in reader.iter_messages(topics=["/velocity"]):
topic = channel.topic
message_type = schema.name
message_data = message.data
ROS1 messages from mcap
import sys
from mcap_ros1.reader import read_ros1_messages
for msg in read_ros1_messages(sys.argv[1]):
topic = msg.topic
if topic == "/topic":
msg_object = msg.ros_msg
field = msg_object.field_name
import sys
from mcap_ros2.reader import read_ros2_messages
for msg in read_ros2_messages(sys.argv[1]):
topic = msg.topic
if topic == "/topic":
msg_object = msg.ros_msg
field = msg_object.field_name
- Warthog Teach and Repeat (ROS1)
- Warthog Teach and Repeat (ROS2)
- Time Synchronization (NTP)
- Time Synchronization (PTP)
- Deployment of Robotic Total Stations (RTS)
- Deployment of the backpack GPS
- Warthog Emlid GPS
- Atlans-C INS
- How to use a CB Radio when going in the forest
- IP forwarding
- Emlid Data Postprocessing (PPK)
- Setting up a reliable robot communication with Zenoh
- Zenoh rmw
- Lessons Learned
- Robots' 3D Models
- Order Management
- Fast track Master → PhD
- Intellectual Property
- Repository Guidelines
- TF Cheatsheet
- Montmorency Forest Wintertime Dataset
- RTS-GT Dataset 2023
- Deschenes2021 Dataset
- TIGS Dataset
- DRIVE Datasets
- BorealHDR
- TimberSeg 1.0
- DARPA Subterranean Challenge - Urban Dataset
- How to upload a dataset to VALERIA
- ROS1 Bridge
- Migrating a repository to ROS2 (Humble)
- ROS2 and rosbags
- MCAP rosbags
- DDS Configuration (work in progress)
- Using a USB Microphone with ROS2
- ROS2 in VSCode
- ROS2 Troubleshooting