Troubleshooting: Rosbuild to Catkin migration

Migrating from Rosbuild to Catkin can be accomplished using the ros-industrial catkinize script as described in Quickly migrating from Rosbuild to Catkin. Although this script attempts to replace rosbuild commands with catkin ones, some errors arise when compiling using the catkin_make command. This troubleshooting guide covers steps to take after catkinizing a package.

Update messages and services

  • If your package contains custom messages, update the add_msg_files(...)  and  generate_messages(...) commands in the CMakeLists.txt file. Ensure  that the message_generation package is included in your find_package(...) call and that the message_runtime package is includes in the catkin_package() call in your CMakeLists.txt file. Finally, update the associated package.xml file, ensuring that message_generation and message_runtime dependencies are listed.
  • If your package includes services, update the add_service_files(...) command in the CMakeLists.txt file.

Update maintainers, dependencies and libraries

  • Ensure that all maintainers in the package.xml file have a valid email address.
  • Install any missing package dependencies.
  • Ensure that you first call add_executable(...) then target_link_libraries(...) in the CMakeLists.txt file.
  • Make sure the catkin path can be found by adding include_directories(include ${catkin_INCLUDE_DIRS}) to the CMakeLists.txt file.
  • Make sure the catkin libraries can be found by adding target_link_libraries(${catkin_LIBRARIES}) to the CMakeLists.txt file.
  • Add any missing library paths in the CMakeLists.txt file Eg. link_directories(/usr/local/lib). Similarly, add any missing include paths i.e. include_directories(. /usr/local/include).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s