Main Content

このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。

ROS ログ ファイルと変換

rosbag、変換ツリーおよび時系列データを解析する

ROS のトピックは“ Rosbag”と呼ばれるログ ファイルに保存されます。MATLAB®でこれらの rosbag 内の情報にアクセスして、フィルター処理できます。rosbag の処理例は、Work with rosbag Logfilesを参照してください。

座标ににににトピックトピックアクセス,それらを使用してててててででででデータ変换変换できますAccess the tf Transformation Tree in ROSを参照してください。

rosrateオブジェクトは、コード実行のタイミングを制御する上で役立ちます。

関数

すべて展開する

rosbag rosbag ログ ファイルを開いて解析
readMessages rosbag からのメッセージの読み取り
select Select subset of messages in rosbag
timeseries 创建时间序列object for selected message properties
ros2bag Open and parse ros2bag log file
readMessages Read messages fromros2bagobject
select Select subset of messages in ros2bag
罗斯特 Access ROS time functionality
rosrate Execute loop at fixed frequency
rosduration 创建一个ROS时间对象
rostf Receive, send, and apply ROS transformations
seconds Returns seconds of a time or duration
rosApplyTransform Transform message entities into target frame
canTransform Verify if transformation is available
转换 Transform message entities into target coordinate frame
waitForTransform Wait until a transformation is available
getTransform Retrieve transformation between two coordinate frames
SendTransform Send transformation to ROS network

オブジェクト

BagSelection Object for storing rosbag selection
TransformStamped Create transformation message

ブロック

Read Data Play back data from log file
Coordinate Transformation Conversion 指定し座标変换表现変换変换

トピック

ROS ログ ファイル (rosbag)

rosbag の構造と、rosbag のメッセージのサブセットを選択するためのワークフローの概要。

Work with rosbag Logfiles

Arosbagor bag is a file format in ROS for storing message data. These bags are often created by subscribing to one or more ROS topics, and storing the received message data in an efficient file structure. MATLAB® can read these rosbag files and help with filtering and extracting message data. See ROS ログ ファイル (rosbag) for more information about rosbag support in MATLAB.

Access the tf Transformation Tree in ROS

ROS中的TF系统可跟踪多个坐标框架,并在树结构中保持它们之间的关系。TF已分发,因此ROS网络中的每个节点都可以使用所有坐标帧信息。MATLAB®使您能够访问此转换树。这个示例使您熟悉访问可用的坐标帧,检索它们之间的转换以及任何两个坐标帧之间的点,向量和其他实体。

Execute Code Based on ROS Time

Using arosrate对象允许您根据ROS时间控制代码执行速率/clocktopic.

Time Stamp a ROS Message Using Current Time in Simulink

This example shows how to time stamp a ROS message with the current system time of your computer. Use theCurrent Timeblock and assign the output to thestd_msgs/Headermessage in the Stamp field. Publish the message on a desired topic.

Convert a ROS Pose Message to a Homogeneous Transformation

This model subscribes to aPosemessage on the ROS network and converts it to a homogeneous transformation. Use bus selectors to extract the rotation and translation vectors. The Coordinate Transformation Conversion block takes the rotation vector (euler angles) and translation vector in and gives the homogeneous transformation for the message.