-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crash with dynamic bridge #10
Comments
I got a debug compilation backtrace:
|
It appears that the dynamic_bridge assumes that response names have '::' inside them. I modified it to skip those that don't and got this output:
The modification below goes inside the main method of the generated dynamic_bridge.cpp: if (publisher_count) {
std::string suffix("Reply");
auto position = it.first.rfind(suffix);
if (position != std::string::npos && position == it.first.size() - suffix.size()) {
std::string & t = it.second;
std::string name(it.first.begin(), it.first.end() - suffix.size());
if (active_ros2_services.find(name) == active_ros2_services.end()) {
active_ros2_services[name] = std::map<std::string, std::string>();
}
auto colons = t.rfind("::");
auto rspnse = t.rfind("_Response_");
if (colons != std::string::npos && rspnse != std::string::npos) {
std::string srv(t.begin() + colons + 2, t.begin() + rspnse);
std::string pkg(t.begin(), t.begin() + colons);
active_ros2_services[name]["package"] = pkg;
active_ros2_services[name]["name"] = srv;
active_ros2_services[name]["response_topic"] = it.first;
active_ros2_services[name]["response_type"] = t;
}
else { std::cout << "Unsupported publisher: " << t << std::endl; }
} else {
ros2_publishers[it.first] = it.second;
}
} I guess I'm not sure if this is a bug with the dynamic_bridge or if the rmw_coredx is not following some generated-topic naming standard. |
Hmm. OK. Those strings look like they might be the 'type' of request/reply topics. In CoreDX DDS, we tend to use the 'short' typename instead of fully-qualified typename for things like this. If ROS assumes/requires a fully-qualified typename here, then this might be the issue. I'll look into it a bit further... |
I get a crash when running dynamic_bridge (only) with the coredx middleware. It appears to be an overrun of an array of strings. Not-so-helpful stacktrace:
The text was updated successfully, but these errors were encountered: