Skip to content
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

Incompatible with the latest RMW? #32

Open
AAlon opened this issue Apr 17, 2019 · 16 comments
Open

Incompatible with the latest RMW? #32

AAlon opened this issue Apr 17, 2019 · 16 comments

Comments

@AAlon
Copy link

AAlon commented Apr 17, 2019

I'm using a source installation of ROS2 from tip of master on Ubuntu Bionic (mostly equivalent to Crystal in terms of API compatibility).

Ran CoreDX's scripts/cdxenv.sh, then 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 supposed to be compatible with the latest ROS2 and RMW interface?

Build log:

--- stderr: rmw_coredx_cpp
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/custom_listeners.cpp: In member function ‘virtual void CustomDataReaderListener::trigger_graph_guard_condition()’:
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/custom_listeners.cpp:77:70: error: ‘rmw_get_error_string_safe’ was not declared in this scope
     fprintf(stderr, "failed to trigger graph guard condition: %s\n", rmw_get_error_string_safe());
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/rmw_create_guard_condition.cpp: In function ‘rmw_guard_condition_t* rmw_create_guard_condition()’:
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/rmw_create_guard_condition.cpp:42: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_coredx/rmw_coredx_cpp/src/rmw_create_guard_condition.cpp:20: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);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/custom_listeners.cpp:77:70: note: suggested alternative: ‘rmw_get_error_string’
     fprintf(stderr, "failed to trigger graph guard condition: %s\n", rmw_get_error_string_safe());
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                                      rmw_get_error_string
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/names.cpp: In function ‘bool rmw_coredx_process_service_name(const char*, bool, char**, char**)’:
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/names.cpp:98:5: error: expected ‘;’ before ‘success’
     success = false;
     ^~~~~~~
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/names.cpp:107:5: error: expected ‘;’ before ‘success’
     success = false;
     ^~~~~~~
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/rmw_create_node.cpp: In function ‘rmw_node_t* rmw_create_node(const char*, const char*, size_t, const rmw_node_security_options_t*)’:
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/rmw_create_node.cpp:73:1: error: conflicting declaration of C function ‘rmw_node_t* rmw_create_node(const char*, const char*, size_t, const rmw_node_security_options_t*)’
 rmw_create_node (
 ^~~~~~~~~~~~~~~
In file included from /ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/rmw_create_node.cpp:20:0:
/ros2_clean/install/rmw/include/rmw/rmw.h:166:1: note: previous declaration ‘rmw_node_t* rmw_create_node(rmw_context_t*, const char*, const char*, size_t, const rmw_node_security_options_t*)’
 rmw_create_node(
 ^~~~~~~~~~~~~~~
/ros2_clean/src/ros2/rmw_coredx/rmw_coredx_cpp/src/rmw_create_node.cpp:128:55: error: too few arguments to function ‘rmw_guard_condition_t* rmw_create_guard_condition(rmw_context_t*)’
   graph_guard_condition = rmw_create_guard_condition( );
@ClarkTucker
Copy link
Contributor

We haven't yet updated this code to work with the current API, so this isn't too surprising to me. I think we've got it on our engineering schedule in the next month or so... Can you make progress in the mean-time using an older ros2 baseline?

@AAlon
Copy link
Author

AAlon commented Apr 17, 2019

We wanted to evaluate performance, and for that we'd prefer to use the latest version of ROS2. We can wait and check back once support is in place; I just want to note that ROS2 Dashing is coming out in about two months, so it might be wise to skip crystal and invest in ROS2-D support. Thanks!

@ClarkTucker
Copy link
Contributor

Recently updated to support the Crystal API. [Haven't built against master yet...]

@ChuiVanfleet
Copy link

Any word on this building with latest RMW?

@ClarkTucker
Copy link
Contributor

No progress yet beyond the Crystal version. This will hopefully be worked by the end of June.

@rotu
Copy link

rotu commented Sep 4, 2019

@ClarkTucker Any movement on this? I'm seeing lots of build errors against ROS2 Dashing.

@rotu
Copy link

rotu commented Sep 4, 2019

Here's the build log I get:
colcon stderr.log

@ClarkTucker
Copy link
Contributor

I just merged an update that is compatible with the dashing api.
It builds OK for me on Linux/64bit. Haven't tried under Windows.
Limited testing looks good so far.

@rotu
Copy link

rotu commented Sep 5, 2019

Thanks, @ClarkTucker!

What CoreDX version are you building against? I'm struggling to get a clean build on Ubuntu 18.04 against CoreDX 4.5.0 x86_64 as downloaded from here http://www.twinoakscomputing.com/coredx/download

--- stderr: rosidl_typesupport_coredx_c
In file included from /home/dan/ros2_ws/src/rmw_coredx/rosidl_typesupport_coredx_c/src/wstring_conversion.cpp:15:
In file included from /home/dan/ros2_ws/src/rmw_coredx/rosidl_typesupport_coredx_c/include/rosidl_typesupport_coredx_c/wstring_conversion.hpp:20:
In file included from /opt/TwinOaks/coredx-4.5.0-Evaluation/target/include/dds/dds.hh:28:
/opt/TwinOaks/coredx-4.5.0-Evaluation/target/include/dds/dds_map.hh:32:32: error: unknown type name 'map_compare_func'
  template <class KT,class VT, map_compare_func CMP> 

After uncommenting the typedef in the beginning of that header dds_map.hh:

--- stderr: rosidl_typesupport_coredx_c                                        
In file included from /home/dan/ros2_ws/src/rmw_coredx/rosidl_typesupport_coredx_c/src/wstring_conversion.cpp:15:
In file included from /home/dan/ros2_ws/src/rmw_coredx/rosidl_typesupport_coredx_c/include/rosidl_typesupport_coredx_c/wstring_conversion.hpp:20:
In file included from /opt/TwinOaks/coredx-4.5.0-Evaluation/target/include/dds/dds.hh:28:
/opt/TwinOaks/coredx-4.5.0-Evaluation/target/include/dds/dds_map.hh:96:5: error: C++ requires a type specifier for all declarations
    DDS_MAP_DEFINE_CXX(KT, VT, CoreMapType);
    ^
In file included from /home/dan/ros2_ws/src/rmw_coredx/rosidl_typesupport_coredx_c/src/wstring_conversion.cpp:15:
In file included from /home/dan/ros2_ws/src/rmw_coredx/rosidl_typesupport_coredx_c/include/rosidl_typesupport_coredx_c/wstring_conversion.hpp:20:
/opt/TwinOaks/coredx-4.5.0-Evaluation/target/include/dds/dds.hh:90:11: error: unknown type name 'DDS_DOMAINID_TYPE_NATIVE'
  typedef DDS_DOMAINID_TYPE_NATIVE  DomainId_t; 
          ^
/opt/TwinOaks/coredx-4.5.0-Evaluation/target/include/dds/dds.hh:91:11: error: unknown type name 'DDS_HANDLE_TYPE_NATIVE'
  typedef DDS_HANDLE_TYPE_NATIVE    InstanceHandle_t; 
          ^

@ClarkTucker
Copy link
Contributor

I built against CoreDX DDS v4.5.3 and v4.7.0.

The file "include/dds/dds.hh" includes "dds/dds.h". This file, in turn, should provide the declarations for map_compare_func, DDS_HANDLE_TYPE_NATIVE, and the others...

Is it possible that you have an include path that provides "dds/dds.h" from some other vendor or project?

@rotu
Copy link

rotu commented Sep 5, 2019

Bingo! I'm not sure why it winds CoreDX's include directory winds up behind CycloneDDS's but you nailed it:

eclipse-cyclonedds/cyclonedds#249

It builds now, but there are still some unimplemented hooks that error when ROS tries to load the middleware layer:

ros2 node list

>>> [rcutils|error_handling.c:106] rcutils_set_error_state()
This error state is being overwritten:

  'failed to resolve symbol 'rmw_init_publisher_allocation' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

with this new error message:

  'failed to resolve symbol 'rmw_fini_publisher_allocation' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

rcutils_reset_error() should be called after error handling to avoid this.
<<<

>>> [rcutils|error_handling.c:106] rcutils_set_error_state()
This error state is being overwritten:

  'failed to resolve symbol 'rmw_fini_publisher_allocation' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

with this new error message:

  'failed to resolve symbol 'rmw_get_serialized_message_size' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

rcutils_reset_error() should be called after error handling to avoid this.
<<<

>>> [rcutils|error_handling.c:106] rcutils_set_error_state()
This error state is being overwritten:

  'failed to resolve symbol 'rmw_get_serialized_message_size' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

with this new error message:

  'failed to resolve symbol 'rmw_init_subscription_allocation' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

rcutils_reset_error() should be called after error handling to avoid this.
<<<

>>> [rcutils|error_handling.c:106] rcutils_set_error_state()
This error state is being overwritten:

  'failed to resolve symbol 'rmw_init_subscription_allocation' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

with this new error message:

  'failed to resolve symbol 'rmw_fini_subscription_allocation' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

rcutils_reset_error() should be called after error handling to avoid this.
<<<

>>> [rcutils|error_handling.c:106] rcutils_set_error_state()
This error state is being overwritten:

  'failed to resolve symbol 'rmw_fini_subscription_allocation' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

with this new error message:

  'failed to resolve symbol 'rmw_set_log_severity' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

rcutils_reset_error() should be called after error handling to avoid this.
<<<

>>> [rcutils|error_handling.c:106] rcutils_set_error_state()
This error state is being overwritten:

  'failed to resolve symbol 'rmw_set_log_severity' in shared library '/home/dan/ros2_ws/install/lib/librmw_coredx_cpp.so', at /home/dan/ros2_ws/src/rmw_implementation/rmw_implementation/src/functions.cpp:163'

with this new error message:

  'type support handle implementation 'rosidl_typesupport_c' (0x7f619b7e0568) does not match valid type supports ('rosidl_typesupport_coredx_cpp' (0x7f619af85115), 'rosidl_typesupport_coredx_c' (0x7f619b187bb9)), at /home/dan/ros2_ws/src/rmw_coredx/rmw_coredx_cpp/src/rmw_create_publisher.cpp:90'

rcutils_reset_error() should be called after error handling to avoid this.
<<<
Unknown error creating node: type support handle implementation 'rosidl_typesupport_c' (0x7f619b7e0568) does not match valid type supports ('rosidl_typesupport_coredx_cpp' (0x7f619af85115), 'rosidl_typesupport_coredx_c' (0x7f619b187bb9)), at /home/dan/ros2_ws/src/rmw_coredx/rmw_coredx_cpp/src/rmw_create_publisher.cpp:90, at /tmp/binarydeb/ros-dashing-rcl-0.7.6/src/rcl/publisher.c:171

@ClarkTucker
Copy link
Contributor

Yep, I wish I could find a list of the newly required methods for each API update :(
I'll see what I can do...

@ClarkTucker
Copy link
Contributor

What ros2 code are you building against? I'm using the ros2repos from "release-dashing".

@ClarkTucker
Copy link
Contributor

Updated to add the missing api functions:

  • rmw_init_publisher_allocation
  • rmw_fini_publisher_allocation
  • rmw_get_serialized_message_size
  • rmw_init_subscription_allocation
  • rmw_fini_subscription_allocation
  • rmw_set_log_severity

@rotu
Copy link

rotu commented Sep 17, 2019

After this and #33, it seems like RMW is compiling. I'm seemingly having trouble with the IDL code generator:

--- stderr: nav2_msgs                               
/home/dan/ros2_ws/build/nav2_msgs/rosidl_typesupport_coredx_cpp/nav2_msgs/msg/dds_coredx/costmap__type_support.cpp:23:1: error: class 'Header_' was previously declared as a struct [-Werror,-Wmismatched-tags]
class Header_;
^
/opt/ros/dashing-src/install/include/std_msgs/msg/dds_coredx/Header_.hh:47:40: note: previous use is here
        struct COREDX_TS_STRUCT_EXPORT Header_ {
                                       ^
/home/dan/ros2_ws/build/nav2_msgs/rosidl_typesupport_coredx_cpp/nav2_msgs/msg/dds_coredx/costmap__type_support.cpp:23:1: note: did you mean struct here?
class Header_;
^~~~~
struct

and

make[2]: *** [CMakeFiles/nav2_msgs__rosidl_typesupport_coredx_cpp.dir/rosidl_typesupport_coredx_cpp/nav2_msgs/msg/dds_coredx/voxel_grid__type_support.cpp.o] Error 1
2 errors generated.
In file included from /home/dan/ros2_ws/build/nav2_msgs/rosidl_typesupport_coredx_cpp/nav2_msgs/srv/dds_coredx/clear_costmap_except_region__type_support.cpp:14:
In file included from /opt/TwinOaks/coredx-4.5.0-Evaluation/target/include/dds/request_reply.hh:31:
In file included from /opt/TwinOaks/coredx-4.5.0-Evaluation/target/include/dds/sample.hh:659:
/opt/TwinOaks/coredx-4.5.0-Evaluation/target/include/dds/loanedsamples_tmpl.hh:68:39: error: ISO C++ specifies that qualified reference to 'LoanedSamples' is a constructor name rather than a type in this context, despite preceding 'typename' keyword [-Werror,-Winjected-class-name]
    return typename LoanedSamples<T>::LoanedSamples(tmp);

@ChuiVanfleet
Copy link

@ClarkTucker FYI, they do a pretty good job at describing new/changed functions. For example, the release notes for ros2 crystal regarding rmw changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants