How to get Packages built for ROS Kinetic working in ROS Melodic?
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:
- Which files in any ROS package do depend on the version of ROS?
- Which segments in files referred in Question 1 do depend on the version of ROS?
- How does the environment of the ROS version affect these segments referred in Question 2?
- 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 ...
First google result pointed me here where someone had the same error message.
@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.........
..............................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 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 : Please see Edit 2 in the Question.
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.Please stop suggestion a manual workflow.
Read the documentation for
rosinstall_generator
and use that.@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.