Connect to ROS Master from MATLAB and Read Current State of Robot
rosinitcommand from MATLAB® with the IP address of the Linux host where the ROS master is running.
rosaction listcommands to view list of accessible nodes, topics, services and actions.
Execute the following set of commands to read current robot state.
jSub = rossubscriber('/joint_states'); jMsg = receive(jSub);
jMsgcontains the robot data in the structure depicted by sensor_msgs/JointState.