Skip to content

Commit 0bc57de

Browse files
authored
Added stop program to the robot program when in headless mode (#128)
This will ensure that no program is running on the robot when external control script is send to the robot.
1 parent 1ed6576 commit 0bc57de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ur/ur_driver.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ urcl::UrDriver::UrDriver(const std::string& robot_ip, const std::string& script_
152152
in_headless_mode_ = headless_mode;
153153
if (in_headless_mode_)
154154
{
155-
full_robot_program_ = "def externalControl():\n";
155+
full_robot_program_ = "stop program\n";
156+
full_robot_program_ += "def externalControl():\n";
156157
std::istringstream prog_stream(prog);
157158
std::string line;
158159
while (std::getline(prog_stream, line))

0 commit comments

Comments
 (0)