Main Content

sendCartesianPose

Command robot to move to desired Cartesian pose

Description

sendCartesianPose(ur,pose) commands the Universal Robots cobot connected through ROS interface, based on the specified Cartesian pose of the end-effector.

example

sendCartesianPose(ur,pose,EndTime=endtime) commands the Universal Robots cobot connected through ROS interface, based on the specified Cartesian pose of the end-effector and a maximum duration. The method commands the robot to complete the motion from current Cartesian pose to the desired Cartesian pose within the duration. The default EndTime is 5 seconds.

Examples

collapse all

Connect to a physical or simulated cobot at IP address 192.168.2.112 on the ROS network.

ur = universalrobot('192.168.2.112');

Command the cobot to by providing the desired Cartesian pose and 7-seconds duration as inputs.

pose = [-pi/2  0  -pi/2 0.5    0    0.5];
sendCartesianPose(ur,pose,EndTime=7);

Input Arguments

collapse all

Connection to physical or simulated cobot from Universal Robots, specified as a universalrobot object.

Desired Cartesian pose of the simulated cobot, represented as a 1-by-6 numeric vector, in the form of [thetaz thetay thetax x y z]. The units are radians and seconds respectively for the three axes.

Data Types: numeric

Maximum duration by which the simulated cobot must try to complete the motion to reach the desired cartesian pose, specified in seconds. In some cases, even with this argument specified, there is no guarantee that the cobot will reach the desired joint configuration. In such cases, use sendCartesianPoseAndWait instead.

Data Types: double

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2022a