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

could not create publisher/subscription: Type support not from this implementation #541

Closed
TSC21 opened this issue Jun 9, 2021 · 9 comments
Labels
bug Something isn't working more-information-needed Further information is required

Comments

@TSC21
Copy link

TSC21 commented Jun 9, 2021

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • binaries
  • Version or commit hash:
    • rmw-fastrtps 5.0.0-2focal.20210519.024652
  • DDS implementation:
    • FastDDS 2.3.1 in ROS2 Galactic
  • Client library (if applicable):
    • rclcpp in ROS2 Galactic

Steps to reproduce issue

The ROS2 packages are being cross-compiled using https://github.com/ros-tooling/cross_compile, which supposedly configures the build environment correctly. They are then deployed to an arm64 platform and run there.

I am not able to start any node when setting RMW_IMPLEMENTATION=rmw_fastrtps_cpp in ROS2 Galactic, throwing the error bellow. The same doesn't happen with ROS2 Foxy.

Expected behavior

Being able to start the nodes and use the ROS2 CLI to echo topics, etc.

Actual behavior

The bellow shows when starting a ROS2 node with a publisher:

terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
what():  could not create publisher: Type support not from this implementation. Got:
    error not set
    error not set
while fetching it, at /tmp/binarydeb/ros-galactic-rmw-fastrtps-cpp-5.0.0/src/publisher.cpp:115, at /tmp/binarydeb/ros-galactic-rcl
-3.1.2/src/rcl/publisher.c:114

Additional information

If the type support is not from "this" implementation, what should it be then? Does it mean that one has to build the packages with the rmw_implementation set in the CMakeLists.txt file of the package, targeting then RMW we are going to use the package on? (for example, if I build in Galactic, the default rmw_implementation will be rmw_cyclonedds_cpp). Or is that not relevant here? (shouldn't be IMO)

@MiguelCompany

@TSC21
Copy link
Author

TSC21 commented Jun 14, 2021

Any feedback that can be provided here?

@hidmic hidmic added the bug Something isn't working label Jun 14, 2021
@1r0b1n0
Copy link
Contributor

1r0b1n0 commented Aug 25, 2021

Hi, I had the same problem on one of my projects.
To use a ROS2 workspace with fastDDS, its library must be present during compilation. Having installed fastDDS during runtime is not enough.
My solution was to simply recompile the workspace after installing "ros-galactic-rmw-fastrtps-cpp".

@clalancette
Copy link
Contributor

@MiguelCompany any thoughts on what might be happening here?

@MiguelCompany
Copy link
Collaborator

@clalancette I think the scenario may be as follows:

  • A user installs galactic-core from packages
  • The user creates a package with message definitions and builds
    • As only rmw_cyclonedds_cpp is installed, and it only requires the introspection type support, only that type support is generated
  • The user then installs the rmw_fastrtps_cpp package, and sets RMW_IMPLEMENTATION=rmw_fastrtps_cpp
  • When the publisher is created, the introspection type support is passed in, giving the error

Something that can be tried, apart from @1r0b1n0 suggestion of rebuilding the workspace, is to use RMW_IMPLEMENTATION=rmw_fastrtps_dynamic_cpp, which expects the introspection type support to be passed in.

@TSC21 Could you try that approach?

@clalancette clalancette added the more-information-needed Further information is required label Sep 30, 2021
@huichengongzi
Copy link

huichengongzi commented Dec 10, 2021

Hi, I had the some problem in my project. reprodection as that:
1, apt-get install ros-galactic-rmw-fastrtps-cpp
2, export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
3, ros run ...
Solution are that:
1, clean my project
2, colon build
3, ros run ...
it can work fine.

@zjeffer
Copy link

zjeffer commented Mar 19, 2022

Deleting the build & install folders and then rebuilding the package with ros-galactic-rmw-fastrtps-cpp installed fixed the issue, thank you @huichengongzi @1r0b1n0

@ZhenshengLee
Copy link

ZhenshengLee commented May 5, 2022

this issue happens in ros2 source build too.

clean cmake build cache and rebuild ros2 solves this issue.

@EduPonz
Copy link

EduPonz commented May 5, 2022

@clalancette We have also verified that what @MiguelCompany describes is what happens. I think this issue may be closed

@clalancette
Copy link
Contributor

Sounds good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working more-information-needed Further information is required
Projects
None yet
Development

No branches or pull requests

9 participants