Main Content

executeSecondaryURScriptCommand

Execute secondary URScript command over ROS interface

Since R2023a

Description

executeSecondaryURScriptCommand(ur,cmdStr) executes the secondary URScript command specified by cmdStr using ROS topic interface. This function accepts the URScript commands in terms of string or char. The command must be wrapped in a secondary program.

Note

This function does not check for the syntax validity of the command. Ensure that you verify the command before sending it to the physical robot.

Examples

collapse all

Connect to ROS at IP address 192.168.2.112.

ur = universalrobot('192.168.2.112');

Specify the secondary URScript command to set standard digital output signal level, and execute the command.

commandString = "set_standard_digital_out(1,True)";
executeSecondaryURScriptCommand(ur,commandString);

Input Arguments

collapse all

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

URScript command, specified as a string scalar or character vector, wrapped in a secondary program.

Example: set_standard_digital_out(1,True)

Data Types: string | char

Extended Capabilities

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

Version History

Introduced in R2023a