Ask Your Question

How to get Packages built for ROS Kinetic working in ROS Melodic?

asked 2018-10-11 00:13:41 -0500

updated 2018-10-13 03:52:31 -0500

I have cloned packages for an ROS based robot called Chefbot from This Github repository and copied the chefbot folder from the cloned files, into my catkin workspace src folder as per the instructions of the developer. This project is based on ROS Kinetic and I am running ROS Melodic. When I source my updated workspace after doing this, I am getting the following error output:

shaunak@robokits:~/catkin_ws$ rosdep install -y --from-paths src --ignore-src --rosdistro melodic  --os=ubuntu:bionic
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
chefbot_bringup: Cannot locate rosdep definition for [depthimage_to_laserscan]
chefbot_gazebo: Cannot locate rosdep definition for [create_node]
chefbot_description: Cannot locate rosdep definition for [create_description]

I also tried rosdep install --from-paths src --ignore-src --rosdistro=melodic -y -r to ignore the errors and initiate catkin_make_isolated --force-cmake(I am not using catkin_make as it does not work for other packages) but it throws an error of not being able to process the package. I am sure that the packages run without errors in ROS Kinetic. So I have to resolve this particular package's ROS version compatibility issue which is actually not there as per The Discussion Here, I am convinced with it and hence I have a few questions:

  1. Which files in any ROS package do depend on the version of ROS?
  2. Which segments in files referred in Question 1 do depend on the version of ROS?
  3. How does the environment of the ROS version affect these segments referred in Question 2?
  4. What can be done to make the environment of the ROS flexible so that the segments and hence the files do not get affected with the version-change?

The questions may sound silly as I am a beginner, but I have been facing the issues considering a fact that ROS Melodic is the latest release. In fact, there is not a problem with a version-change in general, but sometimes this kind of issue pops up where things are not happening with other developer's open source package with different ROS version. So the answers to these questions may be helpful.

Edit 1 with reference to the Answer 1 (below) from @l4ncelot :

I followed the steps suggested in Answer 1 by cloning the package depthimage_to_lasercan from the source link given Here to my catkin workspace, sourcing the workspace and then applying catkin_make, but I am getting the following error output:

error: expected constructor, destructor, or type conversion before  ' ( ' token
 PLUGINLIB_DECLARE_CLASS(depthimage_to_laserscan, DepthImageToLaserScanNodelet,  
 depthimage_to_laserscan::DepthImageToLaserScanNodelet, nodelet::Nodelet);
depthimage_to_laserscan/CMakeFiles/DepthImageToLaserScanNodelet.dir/build.make:62: recipe for target 'depthimage_to_laserscan/CMakeFiles/DepthImageToLaserScanNodelet.dir/src/DepthImageToLaserScanNodelet.cpp.o' failed

This seems to be more of a syntax error which I am not able to solve. I went to the Bug / feature tracker link of the package given Here, but could not get much out of it.

Edit 2 with reference to comment from @l4ncelot :

Comment Number 4 -->

@Shaunak Vyas doesn't matter if it's has been released yet or not. Just get the ...
edit retag flag offensive close merge delete


First google result pointed me here where someone had the same error message.

l4ncelot gravatar imagel4ncelot ( 2018-10-12 01:34:52 -0500 )edit

@l4ncelot: Alread done. If you got to #27 link given there, you will find comment from @jarvisschultz stating Also added depthimage_to_laserscan to rosinstall.........

Shaunak Agastya Vyas gravatar imageShaunak Agastya Vyas ( 2018-10-12 01:59:48 -0500 )edit

..............................which directs Here. If you see the uri of the updated depthimage_to_laserscan package with patch carefully, it is the same as given Here

Shaunak Agastya Vyas gravatar imageShaunak Agastya Vyas ( 2018-10-12 02:03:58 -0500 )edit

@Shaunak Vyas doesn't matter if it's has been released yet or not. Just get the pull request (or edit you code by yourself according to this commit) and it should fix the error.

l4ncelot gravatar imagel4ncelot ( 2018-10-12 02:08:56 -0500 )edit

@l4ncelot : Please see Edit 2 in the Question.

Shaunak Agastya Vyas gravatar imageShaunak Agastya Vyas ( 2018-10-12 05:46:26 -0500 )edit

The error from edit 2 tells you it can't find kobuki_description package. Here is the package you need. Do the same thing like with other catkin package i.e. clone to workspace, build, source.

l4ncelot gravatar imagel4ncelot ( 2018-10-12 05:56:16 -0500 )edit

Please stop suggestion a manual workflow.

Read the documentation for rosinstall_generator and use that.

gvdhoorn gravatar imagegvdhoorn ( 2018-10-12 05:57:57 -0500 )edit

@gvdhoorn yeah I know that. But I think it's better to go through this manually to actually see what's going on and to learn how to read error messages and fix them manually. Automatic work is great, but beginner would have no idea what's going on behind the scene IMO.

l4ncelot gravatar imagel4ncelot ( 2018-10-12 06:02:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-10-11 03:46:16 -0500

l4ncelot gravatar image

Let's break down those errors messages.

chefbot_bringup: Cannot locate rosdep definition for [depthimage_to_laserscan]

This error basically tells you "while searching for the dependencies for package chefbot_bringup I couldn't find rosdep definition for depthimage_to_laserscan". If you look at wiki page of depthimage_to_lasercan package here you can see that the package is not release for melodic. This is the reason why rosdep couldn't find the definition.

rosdep command looks for the dependencies in package.xml file in each project. Have a look here where the depthimage_to_lasercan is defined.

What you need to do right now is to build the depthimage_to_lasercan from source from github (clone the package from git to your catkin workspace, catkin_make command and don't forget to source the workspace in the end).

The same idea applies for the remaining 2 packages.

edit flag offensive delete link more



@l4ncelot is essentially correct.

One tool that can help generate "trees" of dependencies for you and help you checkout the sources of them is rosinstall_generator.

gvdhoorn gravatar imagegvdhoorn ( 2018-10-11 03:58:35 -0500 )edit

@gvdhoorn : Please see Edit 1 and Edit 2 in Question.

Shaunak Agastya Vyas gravatar imageShaunak Agastya Vyas ( 2018-10-12 05:48:33 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-10-11 00:13:41 -0500

Seen: 2,360 times

Last updated: Oct 13 '18