Command robot to move to desired joint configuration
commands the Universal Robots cobot connected through ROS interface, based on the specified
joint configuration and a maximum duration. The method commands the robot to complete the
motion from current joint configuration to the desired joint configuration within the
Command the Cobot to Desired Joint Configuration
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 joint configuration and 5-seconds duration as inputs.
jointWaypoints = [20 -90 -70 -20 70 0]*pi/180; sendJointConfiguration(ur,jointWaypoints,EndTime=5);
ur — Connection to Universal Robots cobot
Connection to physical or simulated cobot from Universal Robots, specified as a
jointconfig — Desired joint configuration
Desired joint configuration of the physical or simulated cobot, represented as a 1-by-6 numeric vector, in the range [-pi,pi].
endtime — Duration to complete the motion
Maximum duration by which the simulated cobot must try to complete the motion to
reach the desired joint configuration, 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
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Introduced in R2022a