ROS1 support for the Python MCAP library
Project description
Python MCAP Ros1 support
This package provides ROS1 support for the Python MCAP file format reader & writer.
Installation
You can install directly via pip.
pip install mcap-ros1-support
Reading ROS1 Messages
# Reading from a MCAP file
from mcap_ros1.reader import read_ros1_messages
for msg in read_ros1_messages("my_data.mcap"):
print(f"{msg.topic}: f{msg.ros_msg}")
Writing ROS1 Messages
from mcap_ros1.writer import Writer as Ros1Writer
from std_msgs.msg import String
output = open("example.mcap", "w+b")
ros_writer = Ros1Writer(output=output)
for i in range(0, 10):
ros_writer.write_message("chatter", String(data=f"string message {i}"))
ros_writer.finish()
Stay in touch
Join our Slack channel to ask questions, share feedback, and stay up to date on what our team is working on.
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
mcap-ros1-support-0.6.0.tar.gz
(46.2 kB
view hashes)
Built Distribution
Close
Hashes for mcap_ros1_support-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b1dfb59c46b9435fd7a9419dba0b1dcd335423fa49eb1b7b98bcdcf92016612 |
|
MD5 | d6fc2ddba9be141b75d5a6e765393a13 |
|
BLAKE2b-256 | a1401a9ba993e2a9b12261f7aceaa408633e6c77c0f7f4f2ce7b77237aa8d50d |