ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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 ...
(more)
edit retag flag offensive close merge delete

Comments

1

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

l4ncelot gravatar image l4ncelot  ( 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 Vyas gravatar image Shaunak 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 Vyas gravatar image Shaunak 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 image l4ncelot  ( 2018-10-12 02:08:56 -0500 )edit

@l4ncelot : Please see Edit 2 in the Question.

Shaunak Vyas gravatar image Shaunak 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 image l4ncelot  ( 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 image gvdhoorn  ( 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 image l4ncelot  ( 2018-10-12 06:02:46 -0500 )edit

@l4ncelot :

Here is the package you need. Do the same thing like with other catkin package i.e. clone to workspace, build, source.

I have already cloned the same to my workspace. This error comes after sourcing the workspace with this package only.

Shaunak Vyas gravatar image Shaunak Vyas  ( 2018-10-12 06:07:22 -0500 )edit

It's always good to know how things work, but with the workflow recommended in this answer, future readers as well as @Shaunak Vyas potentially spend hours resolving missing pkg errors. That is not very productive and in addition we don't want newcomers to get used to such a workflow. We have ..

gvdhoorn gravatar image gvdhoorn  ( 2018-10-12 06:07:35 -0500 )edit

.. a hard enough time teaching new ROS users to not build everything from source. So if you must build from source, and the target pkg and some of it's dependencies are not available in a particular distribution, use rosinstall_generator.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-12 06:08:33 -0500 )edit

This error comes after sourcing the workspace with this package only.

this is me nitpicking, but you still don't source any workspace here. That comes after things have built successfully.

You're trying to build your workspace.

Those are very differen things.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-12 06:09:16 -0500 )edit

@gvdhoornSo if you must build from source, and the target pkg and some of it's dependencies are not available in a particular distribution, use rosinstall_generator

I do not think rosinstall_generator will resolve this as my rosdep install ... command is successful.

Shaunak Vyas gravatar image Shaunak Vyas  ( 2018-10-12 06:19:35 -0500 )edit

@gvdhoorn point taken.

l4ncelot gravatar image l4ncelot  ( 2018-10-12 06:23:49 -0500 )edit

@Shaunak Vyas:

as my rosdep install ... command is successful.

That surprises me, as if it would be successful, it would have installed kobuki_description for you.

Are you still adding -r to the rosdep command line?

If so, it's ignoring uninstallable packages.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-12 06:25:55 -0500 )edit

@gvdhoorn I am not adding -r. My whole command is :

rosdep install -y --from-paths src --ignore-src --rosdistro melodic  --os=ubuntu:bionic

Which gives output

#All required rosdeps installed successfully

without even a single warning.

Shaunak Vyas gravatar image Shaunak Vyas  ( 2018-10-12 06:33:29 -0500 )edit

What is the output of dpkg -l | grep kobuki-description?

Or did you already clone that package into your workspace?

gvdhoorn gravatar image gvdhoorn  ( 2018-10-12 06:42:27 -0500 )edit

It is already cloned in my workspace.

Shaunak Vyas gravatar image Shaunak Vyas  ( 2018-10-12 06:45:38 -0500 )edit

@gvdhoorn@l4ncelot : Please see Edit 3 in the question.

Shaunak Vyas gravatar image Shaunak Vyas  ( 2018-10-13 03:51:18 -0500 )edit

You basically ran into the "you can try building pkgs on newer ROS releases, and they should work, provided their dependencies did not change significantly in the newer ROS version" exception.

Unfortunately Gazebo 9 is rather different from Gazebo 7 in important areas. That is why you are ..

gvdhoorn gravatar image gvdhoorn  ( 2018-10-13 08:32:46 -0500 )edit

.. seeing compiler errors for that package.

If you don't need that particular package, you could just ignore it.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-13 08:33:21 -0500 )edit

I need it.

Shaunak Vyas gravatar image Shaunak Vyas  ( 2018-10-13 10:42:12 -0500 )edit

Hi @Shaunak Vyas, sounds like you are down to Gazebo 7 vs 9 errors. I recently encountered the same issue and fixed it on my fork. Perhaps that will help get you going.

jarvisschultz gravatar image jarvisschultz  ( 2018-10-14 17:16:57 -0500 )edit

@jarvisschultz : I am not opening gazebo as of now. I am working with RViz for mapping and navigation. I am in touch with the developer of Chefbot Mr Lentin Joseph now.

Shaunak Vyas gravatar image Shaunak Vyas  ( 2018-10-17 04:15:34 -0500 )edit

In the meanwhile, if anyone can refer me a book/link explaining how to build an ROS package targeting Autonomous Robot with Kinect from scratch, I would be grateful.

Shaunak Vyas gravatar image Shaunak Vyas  ( 2018-10-17 04:16:19 -0500 )edit

The bug report you submitted on the turtlebot_create_desktop package is specifically a Gazebo version issue. Doesn't matter if you're not using Gazebo, whatever you are doing is trying to compile Gazebo plugins

jarvisschultz gravatar image jarvisschultz  ( 2018-10-17 07:42:26 -0500 )edit

@jarvisschultz : I completely agree with you. Anyways, Mr Lentin Joseph has asked me to solve this problem on my own by studying ROS. It was a silly mistake that I have done by not understanding the concepts thoroughly and starting up with irrelevant questions.

Shaunak Vyas gravatar image Shaunak Vyas  ( 2018-10-19 00:35:00 -0500 )edit

I will give answer to my own question soon. Thank you so much everyone for getting involved into the conversation.

Shaunak Vyas gravatar image Shaunak Vyas  ( 2018-10-19 00:35:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

Comments

1

@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 image gvdhoorn  ( 2018-10-11 03:58:35 -0500 )edit

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

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

Question Tools

2 followers

Stats

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

Seen: 5,428 times

Last updated: Oct 13 '18