Get current end-effector pose from the robot
Obtain End-Effector Pose from Cobot
Connect to a physical or simulated cobot at IP address
192.168.2.112 on the ROS network.
ur = universalrobot('192.168.2.112');
Get the current end-effector pose of the cobot, representing the current position and orientation of the end-effector.
pose = getCartesianPose(ur);
pose = 1×6 3.1415 0.5176 -1.5708 -0.2435 -0.2329 0.7613
Specify a timeout of 10 seconds while obtaining current end-effector pose of the cobot.
jointangles = getCartesianPose(ur,10);
ur — Connection to Universal Robots cobot
Connection to physical or simulated cobot from Universal Robots, specified as a
timeout — Timeout in seconds
Timeout value by which the end-effector pose must be obtained from the simulated cobot, specified in seconds.
pose — Current end-effector pose
Current end effector pose, returned as a 1-by-6 vector consisting of the three orientation and position values (represented as [theta(z) theta(y) theta(x) x y z]) in radians and meters respectively.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Introduced in R2022a