Missing rosidl type support for custom message in Python [Eloquent]
What I am trying to achieve: within my workspace, create a ament_cmake
package with custom messages called navigation_msgs
and publish them in an ament_python
package.
What works: ros2 interface show navigation_msgs/EulerAttitude
correctly displays my message. I am also able to import the message in Python from navigation_msgs.msg import EulerAttitude
. Furthermore, within the same package I can publish built-in messages like geometry_msgs
(Vector3
)
What does not work: when trying to ros2 run pub_node not_working
I get a typesupport
error (the trace is below). It is raised when I call create_publisher
in the NotWorkingNode
constructor.
Setup: Ubuntu 18.04 with ROS3 Eloquent from APT. ros2 doctor
works. (in fact the problem if the same with Dashing, also from APT.)
How to reproduce: attached code is a minimal workspace with ros2 run pub_node working
and ros2 run pub_node working
. working
should work and notworking
should give the error.
TCantelobre@1044617:~/bug$ ros2 run pub_node notworking Traceback (most recent call last): File "/opt/ros/eloquent/lib/python3.6/site-packages/rosidl_generator_py/import_type_support_impl.py", line 40, in import_type_support return importlib.import_module(module_name, package=pkg_name) File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 658, in _load_unlocked File "<frozen importlib._bootstrap>", line 571, in module_from_spec File "<frozen importlib._bootstrap_external>", line 922, in create_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed ImportError: /home/TCantelobre/bug/install/navigation_msgs/lib/libnavigation_msgs__rosidl_typesupport_fastrtps_c.so: undefined symbol: rosidl_typesupport_fastrtps_c__get_message_type_support_handle__std_msgs__msg__Header During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/TCantelobre/bug/install/pub_node/lib/pub_node/notworking", line 11, in <module> load_entry_point('pub-node==0.0.0', 'console_scripts', 'notworking')() File "/home/TCantelobre/bug/install/pub_node/lib/python3.6/site-packages/pub_node/not_working.py", line 28, in main not_working_node = NotWorkingNode() File "/home/TCantelobre/bug/install/pub_node/lib/python3.6/site-packages/pub_node/not_working.py", line 16, in __init__ self.publisher = self.create_publisher(EulerAttitude, "attitude", 100) File "/opt/ros/eloquent/lib/python3.6/site-packages/rclpy/node.py", line 1094, in create_publisher check_for_type_support(msg_type) File "/opt/ros/eloquent/lib/python3.6/site-packages/rclpy/type_support.py", line 29, in check_for_type_support msg_type.__class__.__import_type_support__() File "/home/TCantelobre/bug/install/navigation_msgs/lib/python3.6/site-packages/navigation_msgs/msg/_euler_attitude.py", line 27, in __import_type_support__ module = import_type_support('navigation_msgs') File "/opt/ros/eloquent/lib/python3.6/site-packages/rosidl_generator_py/import_type_support_impl.py", line 42, in import_type_support raise UnsupportedTypeSupport(pkg_name) rosidl_generator_py.import_type_support_impl.UnsupportedTypeSupport: Could not import 'rosidl_typesupport_c' for package 'navigation_msgs'
Quick comment, I can't upload the files because I don't have enough reputation... would be happy to put them in a Google Drive or something if necessary. Looking forward to hearing from you!
Any solution to this problem, as I am also facing the same while building custom msg in dashing , using cyclonedds rmw ?
I also do have the same issue, however I am creating a custom service using eloquent, not a message using dashing. Has there been any progress concerning this question?