Sending URScript secondary program through ROS topic interface

Hi All,

Hope you are doing great.

I am trying to use the ROS topic interface with URSim to send the URScript command to control the simulated robot.

I am trying to prevent the program stop with the mentioned workaround on this link: Universal_Robots_ROS_Driver/ROS_INTERFACE.md at master · UniversalRobots/Universal_Robots_ROS_Driver · GitHub

and my final command looks like this,

rostopic pub /ur_hardware_interface/script_command std_msgs/String "data: 'sec myProgram(): set_digital_out(0, True) end'"

Here I am not seeing the execution of the command in the URSim.

Any comments will be appreciated.

Thanks,
Milan

The comment in the documentation actually got illegally formatted when automatically being extracted from the source code.

However, rostopic pub adds additional challenges regarding newlines. A working command would be:

rostopic pub /ur_hardware_interface/script_command std_msgs/String "data: 'sec myProgram():

 set_digital_out(0, True)

end

'"