You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building the ros1_bridge on the ROS_DISTRO foxy there is a build error
I am using the docker image osrf/ros2:nightly
/home/ros2/foxy/src/ros1_bridge/src/dynamic_bridge.cpp: In lambda function:
/home/ros2/foxy/src/ros1_bridge/src/dynamic_bridge.cpp:708:22: error: ‘using element_type = class rclcpp::Node’ {aka ‘class rclcpp::Node’} has no member named ‘get_service_names_and_types_by_node’; did you mean ‘get_service_names_and_types’?
708 | ros2_node->get_service_names_and_types_by_node(pair.first, pair.second);| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| get_service_names_and_types
Even on eloquent banch it seems rclcpp::Node no longer have this function get_service_names_and_types_by_node(x, y)
I am able to fix this issue with the following changes by replacing with
get_service_names_and_types()
/*Return a map of existing service names to list of service types.*/
diff --git a/src/dynamic_bridge.cpp b/src/dynamic_bridge.cpp
index 27da971..74890a9 100644
--- a/src/dynamic_bridge.cpp+++ b/src/dynamic_bridge.cpp@@ -698,18 +698,26 @@ int main(int argc, char * argv[])
// collect available services (not clients)
std::set<std::string> service_names;
+ /*
std::vector<std::pair<std::string, std::string>> node_names_and_namespaces =
ros2_node->get_node_graph_interface()->get_node_names_and_namespaces();
for (auto & pair : node_names_and_namespaces) {
if (pair.first == ros2_node->get_name() && pair.second == ros2_node->get_namespace()) {
continue;
}
+
std::map<std::string, std::vector<std::string>> services_and_types =
ros2_node->get_service_names_and_types_by_node(pair.first, pair.second);
for (auto & it : services_and_types) {
service_names.insert(it.first);
}
}
+ */+ std::map<std::string, std::vector<std::string>> services_and_types =+ ros2_node->get_service_names_and_types();+ for (auto & it : services_and_types) {+ service_names.insert(it.first);+ }
auto ros2_services_and_types = ros2_node->get_service_names_and_types();
std::map<std::string, std::map<std::string, std::string>> active_ros2_services;
The text was updated successfully, but these errors were encountered:
When building the ros1_bridge on the ROS_DISTRO foxy there is a build error
I am using the docker image osrf/ros2:nightly
In order to build the latest state of the master branch (which includes #267) you need the referenced changes from ros2/rclcpp#1131. Please make sure you have the latest versions, e.g. rclcpp 1.1.0.
Even on eloquent banch it seems rclcpp::Node no longer have this function get_service_names_and_types_by_node(x, y)
The master branch of ros1_bridge is not compatible with ROS Eloquent. You need to use the eloquent branch for that.
Bug report
When building the
ros1_bridge
on theROS_DISTRO foxy
there is a build errorI am using the docker image osrf/ros2:nightly
Even on
eloquent
banch it seems rclcpp::Node no longer have this functionget_service_names_and_types_by_node(x, y)
I am able to fix this issue with the following changes by replacing with
The text was updated successfully, but these errors were encountered: