Main Content

ROS 2 네트워크 연결 및 탐색

ROS 2 네트워크 설정과 상호 작용

ROS 2에 연결하여 로보틱스 애플리케이션 프로토타입을 만들고, ROS 네트워크를 통해 로보틱스 하드웨어 또는 로보틱스 시뮬레이터에 액세스합니다. MATLAB®을 사용하여 자체 ROS 네트워크를 만들거나 기존 ROS 2 네트워크에 연결할 수 있습니다. ROS 2 네트워크를 설정하려면 먼저 ros2node 객체를 사용하여 ROS 2 노드를 생성합니다.

ros2param 객체와 객체 함수를 사용하여 ROS 2 파라미터에 액세스할 수 있습니다.

ros2rate 객체를 사용하여 코드 실행 타이밍을 제어할 수 있습니다.

함수

모두 확장

ros2ROS 2 네트워크 정보 가져오기 (R2019b 이후)
ros2messageROS 2 메시지 구조체 생성 (R2019b 이후)
ros2tfReceive, send, verify and apply ROS 2 transformations (R2023a 이후)
rosApplyTransformTransform ROS and ROS 2 message entities into target frame (R2021a 이후)
rosReadTransformReturn transformation from ROS or ROS 2 TransformStamped message structure (R2023b 이후)
canTransform변환이 사용 가능한지 검증 (R2023a 이후)
transformTransform message entities into target coordinate frame (R2023a 이후)
getTransformReturn the transformation between two coordinate frames (R2023a 이후)
sendTransformSend a transformation to the ROS 2 network (R2023a 이후)
ros2timeAccess ROS 2 time functionality (R2022b 이후)
ros2rateExecute loop at fixed frequency (R2022b 이후)
ros2durationCreate a ROS 2 duration message (R2022b 이후)
ros2deviceConnect to remote ROS 2 device (R2021a 이후)
runNodeStart ROS or ROS 2 node (R2019b 이후)
stopNodeStop ROS or ROS 2 node (R2019b 이후)
isNodeRunningDetermine if ROS or ROS 2 node is running (R2019b 이후)

객체

모두 확장

ros2nodeCreate a ROS 2 node on the specified network (R2019b 이후)
ros2paramCreate object to access parameters from ROS 2 nodes (R2022b 이후)

블록

Blank Message지정된 메시지 유형을 사용해 빈 ROS 2 메시지 생성 (R2019b 이후)
Current Time현재 ROS 2 시간 또는 시스템 시간 가져오기 (R2022b 이후)
Get ParameterGet ROS 2 parameter value (R2022b 이후)