%% Wait for Transformation Between Robot Frames
% Connect to the ROS network. Specify the IP address of your network.

rosinit('192.168.17.129')

%
% Create a ROS transformation tree.

tftree = rostf;

%
% Wait for the transformation between the target frame, /camera_depth_frame, and the source frame, /base_link, to be available. Specify a timeout of 5 seconds.

waitForTransform(tftree,'/camera_depth_frame','/base_link',5);

%
% Get the transformation.

tform = getTransform(tftree,'/camera_depth_frame','/base_link');

%
% When you are finished, disconnect from the ROS network.

rosshutdown

%
% Copyright 2019 The MathWorks, Inc.