Skip to content

Commit f897df5

Browse files
author
Felix Exner
committed
Write an initial textmessage when connecting the urscript_interface
1 parent f261a5c commit f897df5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ur_robot_driver/src/urscript_interface.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ class URScriptInterface : public rclcpp::Node
7070
m_secondary_stream = std::make_unique<urcl::comm::URStream<urcl::primary_interface::PrimaryPackage>>(
7171
this->get_parameter("robot_ip").as_string(), urcl::primary_interface::UR_SECONDARY_PORT);
7272
m_secondary_stream->connect();
73+
74+
auto program_with_newline = std::string("textmsg(\"urscript_interface connected\")\n");
75+
size_t len = program_with_newline.size();
76+
const auto* data = reinterpret_cast<const uint8_t*>(program_with_newline.c_str());
77+
size_t written;
78+
m_secondary_stream->write(data, len, written);
7379
}
7480
~URScriptInterface() override = default;
7581

0 commit comments

Comments
 (0)