rosidl_generator_py UnsupportedTypeSupport: Could not import 'rosidl_typesupport_c' for package

asked 2019-09-09 04:50:59 -0500

clungzta gravatar image

I've used awslabs/ros2-migration-tools to convert a ROS1 package (namely, vision_msgs) into a ROS2 package with the same name for use on my Robot.

Note: I am running multi-distro, dashing and melodic. Dashing setup is sourced when the below occurs.

Build was successful, the messages do show under ros2 msg list.
I'm now stuck trying to import the messages into Python. Where the following error occurs:

rosidl_generator_py.import_type_support_impl.UnsupportedTypeSupport: Could not import 'rosidl_typesupport_c' for package 'vision_msgs'

The below is my CMakeLists.txt:

cmake_minimum_required(VERSION 3.5)
project(vision_msgs)

# Add support for C++14
if(NOT CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 14)
endif()

find_package(ament_cmake REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(geometry_msgs REQUIRED)
set(INCLUDE_DIRS ${ament_cmake_INCLUDE_DIRS} ${std_msgs_INCLUDE_DIRS}
  ${sensor_msgs_INCLUDE_DIRS} ${rosidl_default_generators_INCLUDE_DIRS}
  ${geometry_msgs_INCLUDE_DIRS})
include_directories(${INCLUDE_DIRS})
set(LIBRARY_DIRS ${ament_cmake_LIBRARIES} ${std_msgs_LIBRARIES}
  ${sensor_msgs_LIBRARIES} ${rosidl_default_generators_LIBRARIES}
  ${geometry_msgs_LIBRARIES})
set(LIBS ${ament_cmake_LIBRARIES} ${std_msgs_LIBRARIES} ${sensor_msgs_LIBRARIES}
  ${rosidl_default_generators_LIBRARIES} ${geometry_msgs_LIBRARIES})
rosidl_generate_interfaces(${PROJECT_NAME} "msg/BoundingBox2D.msg" "msg/BoundingBox3D.msg" "msg/Classification2D.msg"
  "msg/Classification3D.msg" "msg/Detection2DArray.msg" "msg/Detection2D.msg"
  "msg/Detection3DArray.msg" "msg/Detection3D.msg" "msg/ObjectHypothesis.msg"
  "msg/ObjectHypothesisWithPose.msg" "msg/VisionInfo.msg"
  DEPENDENCIES std_msgs sensor_msgs geometry_msgs)

install(DIRECTORY include/${PROJECT_NAME}/
  DESTINATION include/${PROJECT_NAME}
  FILES_MATCHING
  PATTERN "*.h")

if(CATKIN_ENABLE_TESTING)
  add_subdirectory(test)
endif()

ament_export_dependencies(ament_cmake)
ament_export_dependencies(std_msgs)
ament_export_dependencies(sensor_msgs)
ament_export_dependencies(rosidl_default_generators)
ament_export_dependencies(geometry_msgs)
ament_export_include_directories(${INCLUDE_DIRS})

ament_package()

Am I missing something which is resulting in insufficient type support?

edit retag flag offensive close merge delete

Comments

Not an answer, but just noting here that vision_msgs has a branch for ROS 2: Kukanani/vision_msgs/ros2.

Does that not work for you, hence the attempt with awslabs/ros2-migration-tools?

gvdhoorn gravatar imagegvdhoorn ( 2019-09-09 05:03:25 -0500 )edit

Thank you. I missed that (hence, my attempt with the migration tool). I shall try now.

clungzta gravatar imageclungzta ( 2019-09-09 05:07:45 -0500 )edit