ros2 / rmw_dps

Implementation of the ROS Middleware (rmw) Interface using Intel's Distributed Publish & Subscribe.
Apache License 2.0
23 stars 8 forks source link

Incompatible with the latest RMW? #4

Closed AAlon closed 5 years ago

AAlon commented 5 years ago

I'm using a source installation of ROS2 from tip of master on Ubuntu Bionic. Cloned this repo into the src/ros2/ dir, and ran colcon build --symlink-install --cmake-force-configure which failed. Seeing as the last commit was a while ago, I'm wondering whether this is still compatible with the latest ROS2 and RMW interface?

Build log:

                                                       --- stderr: rmw_dps_cpp
make[2]: *** [CMakeFiles/rmw_dps_cpp.dir/src/rmw_init.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_count.cpp: In function ‘rmw_ret_t rmw_count_publishers(const rmw_node_t*, const char*, size_t*)’:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_count.cpp:32:3: error: expected ‘;’ before ‘*’ token
   *count = 0;
   ^
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_count.cpp: In function ‘rmw_ret_t rmw_count_subscribers(const rmw_node_t*, const char*, size_t*)’:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_count.cpp:47:3: error: expected ‘;’ before ‘*’ token
   *count = 0;
   ^
make[2]: *** [CMakeFiles/rmw_dps_cpp.dir/src/rmw_count.cpp.o] Error 1
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_publish.cpp:72:82: error: macro "RCUTILS_CHECK_FOR_NULL_WITH_MSG" passed 4 arguments, but takes just 3
     publisher, "publisher pointer is null", return RMW_RET_ERROR, error_allocator);
                                                                                  ^
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_publish.cpp:75:42: error: macro "RCUTILS_CHECK_FOR_NULL_WITH_MSG" passed 4 arguments, but takes just 3
     return RMW_RET_ERROR, error_allocator);
                                          ^
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_publish.cpp:84:82: error: macro "RCUTILS_CHECK_FOR_NULL_WITH_MSG" passed 4 arguments, but takes just 3
     info, "publisher info pointer is null", return RMW_RET_ERROR, error_allocator);
                                                                                  ^
In file included from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/include/rmw_dps_cpp/TypeSupport.hpp:130:0,
                 from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/include/rmw_dps_cpp/MessageTypeSupport.hpp:21,
                 from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/type_support_common.hpp:20,
                 from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_client.cpp:25:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/include/rmw_dps_cpp/TypeSupport_impl.hpp:23:10: fatal error: rosidl_generator_c/primitives_array_functions.h: No such file or directory
 #include "rosidl_generator_c/primitives_array_functions.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rmw_dps_cpp.dir/src/rmw_client.cpp.o] Error 1
In file included from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/include/rmw_dps_cpp/TypeSupport.hpp:130:0,
                 from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/include/rmw_dps_cpp/MessageTypeSupport.hpp:21,
                 from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/type_support_common.hpp:20,
                 from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/client_service_common.cpp:17:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/include/rmw_dps_cpp/TypeSupport_impl.hpp:23:10: fatal error: rosidl_generator_c/primitives_array_functions.h: No such file or directory
 #include "rosidl_generator_c/primitives_array_functions.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/rmw_dps_cpp.dir/src/client_service_common.cpp.o] Error 1
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_guard_condition.cpp: In function ‘rmw_guard_condition_t* rmw_create_guard_condition()’:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_guard_condition.cpp:25:1: error: conflicting declaration of C function  rmw_guard_condition_t* rmw_create_guard_condition()’
 rmw_create_guard_condition()
 ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_guard_condition.cpp:17:0:
/ros2_clean/install/rmw/include/rmw/rmw.h:528:1: note: previous declaration ‘rmw_guard_condition_t* rmw_create_guard_condition(rmw_context_t*)’
 rmw_create_guard_condition(rmw_context_t * context);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /ros2_clean/install/rcutils/include/rcutils/error_handling.h:28:0,
                 from /ros2_clean/install/rcutils/include/rcutils/logging.h:23,
                 from /ros2_clean/install/rcutils/include/rcutils/logging_macros.h:22,
                 from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_publish.cpp:17:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_publish.cpp: In function ‘rmw_ret_t rmw_publish(const rmw_publisher_t*, const void*)’:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_publish.cpp:38:3: error: expected ‘;’ before ‘(’ token
   assert(publisher);
   ^
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_publish.cpp: In function ‘rmw_ret_t rmw_publish_serialized_message(const rmw_publisher_t*, const rmw_serialized_message_t*)’:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_publish.cpp:71:3: error: ‘RCUTILS_CHECK_FOR_NULL_WITH_MSG’ was not declared in this scope
   RCUTILS_CHECK_FOR_NULL_WITH_MSG(
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_get_gid_for_publisher.cpp: In function ‘rmw_ret_t rmw_get_gid_for_publisher(const rmw_publisher_t*, rmw_gid_t*)’:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_get_gid_for_publisher.cpp:32:3: error: expected ‘;’ before ‘if’
   if (!publisher) {
   ^~
make[2]: *** [CMakeFiles/rmw_dps_cpp.dir/src/rmw_guard_condition.cpp.o] Error 1
make[2]: *** [CMakeFiles/rmw_dps_cpp.dir/src/rmw_publish.cpp.o] Error 1
In file included from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_request.cpp:17:0:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/include/rmw_dps_cpp/Listener.hpp: In static member function ‘static void Listener::onPublication(DPS_Subscription*, const DPS_Publication*, uint8_t*, size_t)’:
/ros2_clean/install/rcutils/include/rcutils/logging_macros.h:67:3: error: expected ‘;’ before ‘do’
   do { \
   ^
/ros2_clean/install/rcutils/include/rcutils/logging_macros.h:253:3: note: in expansion of macro ‘RCUTILS_LOG_COND_NAMED’
   RCUTILS_LOG_COND_NAMED( \
   ^~~~~~~~~~~~~~~~~~~~~~
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/include/rmw_dps_cpp/Listener.hpp:51:5: note: in expansion of macro ‘RCUTILS_LOG_DEBUG_NAMED’
     RCUTILS_LOG_DEBUG_NAMED(
     ^~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/rmw_dps_cpp.dir/src/rmw_get_gid_for_publisher.cpp.o] Error 1
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/include/rmw_dps_cpp/Listener.hpp: In static member function ‘static void Listener::onAcknowledgement(DPS_Publication*, uint8_t*, size_t)’:
/ros2_clean/install/rcutils/include/rcutils/logging_macros.h:67:3: error: expected ‘;’ before ‘do’
   do { \
   ^
/ros2_clean/install/rcutils/include/rcutils/logging_macros.h:253:3: note: in expansion of macro ‘RCUTILS_LOG_COND_NAMED’
   RCUTILS_LOG_COND_NAMED( \
   ^~~~~~~~~~~~~~~~~~~~~~
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/include/rmw_dps_cpp/Listener.hpp:77:5: note: in expansion of macro ‘RCUTILS_LOG_DEBUG_NAMED’
     RCUTILS_LOG_DEBUG_NAMED(
     ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /ros2_clean/install/rcutils/include/rcutils/error_handling.h:28:0,
                 from /ros2_clean/install/rcutils/include/rcutils/logging.h:23,
                 from /ros2_clean/install/rcutils/include/rcutils/logging_macros.h:22,
                 from /ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_request.cpp:17:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_request.cpp: In function ‘rmw_ret_t rmw_send_request(const rmw_client_t*, const void*, int64_t*)’:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_request.cpp:40:3: error: expected ‘;’ before ‘(’ token
   assert(client);
   ^
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_request.cpp: In function ‘rmw_ret_t rmw_take_request(const rmw_service_t*, rmw_request_id_t*, void*, bool*)’:
/ros2_clean/src/ros2/rmw_dps/rmw_dps_cpp/src/rmw_request.cpp:82:3: error: expected ‘;’ before ‘(’ token
   assert(service);
malsbat commented 5 years ago

Thanks for filing this @AAlon, I will look into it.

malsbat commented 5 years ago

Fixed as of https://github.com/ros2/rmw_dps/commit/ab6f8d0257d6cf61fc499fee6ab3936e0b3234f6

AAlon commented 5 years ago

Thanks @malsbat! at the moment, rmw_dps doesn't build with the tip of master of ROS2. Was this change made for compatibility with ROS2-Crystal, or for the tip of master RMW layer?

If the former, perhaps you could create a develop branch which would be kept up-to-date with the latest interface; If the latter, then let's get the master branch updated, since the RMW interface has changed a bit.

I've made the necessary adjustments which can be seen at https://github.com/ros2/rmw_dps/compare/master...AAlon:develop - I hope those make sense. I could open a PR either against master or develop depending on the answer to the question above.

malsbat commented 5 years ago

Hi @AAlon, the changes I made were against the tip of master. I thought I had caught everything, but looking at your change, it appears I had some stale bits somewhere. Please go ahead and make your pull request and I will merge it. Thanks again.