이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
Simulink의 ROS 2
Simulink®를 사용해 ROS 2 네트워크와 메시지에 액세스
ROS Toolbox를 사용하면 Simulink에서 ROS 및 ROS 2에 연결할 수 있으며 네트워크를 통해 메시지를 보낼 수 있습니다. Get Started with ROS 2 in Simulink® 항목을 참조하십시오.
타깃 시스템에 코드를 생성하고 배포할 수도 있습니다. 독립형 ROS 2 노드 생성에 대한 고급 예제는 Generate a Standalone ROS 2 Node from Simulink 항목을 참조하십시오.
ROS 2 장치에 배포되어 사용할 수 있는 ROS 2 노드를 실행하거나 중지하거나 노드의 상태를 확인하려면 아래에 나와 있는 MATLAB® 함수를 사용합니다. ros2device
를 사용하여 ROS 장치에 대한 연결을 만듭니다.
함수
블록
Blank Message | 지정된 메시지 유형을 사용해 빈 ROS 2 메시지 생성 |
Call Service | Call service in ROS 2 network |
Current Time | Retrieve current ROS 2 time or system time |
Get Parameter | Get ROS 2 parameter value |
Publish | Send messages to ROS 2 network |
Read Data | Play back data from ROS 2 log file |
Read Image | Extract image from ROS 2 Image message |
Read Scan | Extract scan data from ROS or ROS 2 laser scan message |
Read Point Cloud | Extract point cloud from ROS 2 PointCloud2 message |
Subscribe | Receive messages from ROS 2 network |
Write Image | Write image data to a ROS or ROS 2 message |
Write Point Cloud | Write point cloud data to a ROS or ROS 2 message |
도움말 항목
ROS 2 네트워크
- Get Started with ROS 2 in Simulink®
Use Simulink blocks for ROS 2 to send and receive messages from a local ROS 2 network. - Publish and Subscribe to ROS 2 Messages in Simulink
Publish and subscribe to a ROS 2 topic using Simulink. - Connect to a ROS-Enabled Robot from Simulink® over ROS 2
Configure a Simulink model to send and receive information from a separate ROS-based simulator such as Gazebo over ROS 2.
ROS 2 메시지
- Work with ROS 2 Messages in Simulink
Work with complex ROS 2 messages inSimulink, such as messages with nested sub-messages and variable-length arrays. - Manage Array Sizes for ROS Messages in Simulink
Description of dialog box for managing array sizes in Simulink ROS
ROS 2 응용 프로그램
- Generate a Standalone ROS 2 Node from Simulink
Generate and build a standalone ROS 2 node from a Simulink model. - Feedback Control of a ROS-Enabled Robot Over ROS 2
Use Simulink to control a simulated robot running in a Gazebo robot simulator over ROS 2 network. - Sign Following Robot with ROS 2 in Simulink
Use Simulink to control a simulated robot running on a separate ROS-based simulator over ROS 2 network. - Generate Code to Manually Deploy a ROS 2 Node from Simulink
Generate C++ code from a Simulink model to deploy as a standalone ROS 2 node.
모델 실행
- Enable ROS 2 Time Model Stepping for Deployed Nodes
You can enable a deployed ROS 2 node to execute based on the time published on the/clock
topic on a ROS 2 network.