We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f18219 commit 8a913d8Copy full SHA for 8a913d8
core/src/introspection.cpp
@@ -57,6 +57,8 @@ std::string getTaskId(const TaskPrivate* task) {
57
std::ostringstream oss;
58
char our_hostname[256] = { 0 };
59
gethostname(our_hostname, sizeof(our_hostname) - 1);
60
+ // Hostname could have `-` as a character but this is an invalid character in ROS so we replace it with `_`
61
+ std::replace(std::begin(our_hostname), std::end(our_hostname), '-', '_');
62
oss << our_hostname << "_" << getpid() << "_" << reinterpret_cast<std::size_t>(task);
63
return oss.str();
64
}
0 commit comments