Main Content

MATLAB에서의 ROS 네트워크 액세스

MATLAB®을 사용하여 ROS 네트워크와 메시지에 액세스

ROS는 메시지를 사용하여 정보를 공유합니다. 메시지는 데이터 공유를 위한 간단한 데이터 구조입니다. 메시지를 수신하거나 서브스크라이브하려면 rossubscriber를 사용합니다. 메시지를 보내거나 퍼블리시하려면 rospublisher를 사용합니다. 메시지 전송에 대한 자세한 내용은 ROS Publisher 및 ROS Subscriber를 사용해 데이터 교환하기 항목을 참조하십시오.

ROS 서비스 및 액션을 통해 사용자는 작업을 수행할 수 있습니다. ROS 서비스는 요청-응답 통신을 통해 정보를 수집하고 ROS 네트워크에서 콜백 함수를 트리거합니다. 액션은 작업이나 목표를 트리거하고 작업을 실행하는 동안 피드백을 받는 데 사용할 수 있습니다.

함수

모두 확장

rosmessageROS 메시지 생성 (R2019b 이후)
rosmsgROS 메시지 및 메시지 유형에 대한 정보 가져오기 (R2019b 이후)
rosShowDetailsDisplay all ROS message contents (R2021a 이후)
rostopicRetrieve information about ROS topics (R2019b 이후)
rospublisherPublish message on a topic (R2019b 이후)
rossubscriberSubscribe to messages on a topic (R2019b 이후)
receiveWait for new ROS message (R2019b 이후)
send토픽에 ROS 메시지 퍼블리시 (R2019b 이후)
rosactionRetrieve information about ROS actions (R2019b 이후)
rosactionserverCreate ROS Action Server (R2022a 이후)
getFeedbackMessageCreate new action feedback message (R2022a 이후)
isPreemeptRequestedCheck if a goal has been preempted (R2022a 이후)
sendFeedbackSend feedback to action client during goal execution (R2022a 이후)
rosActionServerExecuteGoalFcnReturn function handle for ROS action server callback (R2022a 이후)
rosactionclientCreate ROS action client (R2019b 이후)
cancelAllGoalsCancel all goals on action server (R2019b 이후)
cancelGoalCancel last goal sent by client (R2019b 이후)
sendGoalSend goal message to action server (R2019b 이후)
sendGoalAndWaitSend goal message and wait for result (R2019b 이후)
waitForServerWait for action server to start (R2019b 이후)
callCall ROS or ROS 2 service server and receive a response (R2019b 이후)
isServerAvailableDetermine if ROS or ROS 2 service server is available (R2021b 이후)
rosserviceRetrieve information about services in ROS network (R2019b 이후)
rossvcclientConnect to ROS service server (R2019b 이후)
rossvcserverCreate ROS service server (R2019b 이후)
waitForServerWait for ROS or ROS 2 service server to start (R2021b 이후)
rosrateExecute loop at fixed frequency (R2019b 이후)

블록

모두 확장

Blank Message지정된 메시지 유형을 사용해 빈 메시지 생성 (R2019b 이후)
Current Time현재 ROS 시간 또는 시스템 시간 가져오기 (R2019b 이후)
PublishSend messages to ROS network (R2019b 이후)
SubscribeReceive messages from ROS network (R2019b 이후)
Call ServiceCall service in ROS network (R2019b 이후)

도움말 항목

ROS Publisher 및 Subscriber

ROS 서비스 및 액션