A series of problems I met while reinstalling navigation stack

asked 2017-07-21 14:37:07 -0500

jla555 gravatar image

I ran into a series of problems while trying to do some modification to base_local_planner.

At the beginning, I get example code about DWA planner from my supervisor and try to do some modification on it. Before running the example code, I installed the navigation stack and the example worked really well. Then, I find that I have to modify some parts of base_local_planner, so I uninstalled both ros-kinetic-navigaiton package using apt-get remove and put the navigation source code from github directly into my catkin_ws/src. After catkin_make, it compiled itself successfully but the planner did not work well - it ran into obstacles.

In the meantime I find there is still a base-local-planner package remained so I removed it, too. Unfortunately, after that the whole package wouldn't go through compiling and it said:

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "move_base_msgs"
  with any of the following names:

    move_base_msgsConfig.cmake
    move_base_msgs-config.cmake



   Add the installation prefix of "move_base_msgs" to CMAKE_PREFIX_PATH or set
      "move_base_msgs_DIR" to a directory containing one of the above files.  If
      "move_base_msgs" provides a separate development package or SDK, be sure it
      has been installed.
    Call Stack (most recent call first):



     simple_navigation_goals/CMakeLists.txt:7 (find_package)

-- Could not find the required component 'move_base_msgs'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "move_base_msgs"
  with any of the following names:

    move_base_msgsConfig.cmake
    move_base_msgs-config.cmake



Add the installation prefix of "move_base_msgs" to CMAKE_PREFIX_PATH or set
  "move_base_msgs_DIR" to a directory containing one of the above files.  If
  "move_base_msgs" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  simple_navigation_goals/CMakeLists.txt:7 (find_package)


-- Configuring incomplete, errors occurred!

I have no idea about how to solve this, so I just try to recover what it was a few hours ago. I succeeded to install the base-local-planner again but fail to install ros-kinetic-navigation stack.

liujingyu@liujingyu-Surface-Pro-4:~/catkin_ws$ sudo apt-get install ros-kinetic-navigation
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ros-kinetic-navigation : Depends: ros-kinetic-map-server but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Then I tried to install ros-kinetic-map-server but:

liujingyu@liujingyu-Surface-Pro-4:~/catkin_ws$ sudo apt-get install ros-kinetic-map-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done

Some packages could not be installed. This may mean that you have
requested an impossible situation or ...
(more)
edit retag flag offensive close merge delete

Comments

A comment (but for the future): it wasn't necessary to remove the binary pkg in order to work with the source in your workspace. Workspace pkgs have higher priority than the binary ones, so even if you have both, workspace pkgs will be used. This is called overlaying.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-22 01:50:32 -0500 )edit

As to your build problems: just cloning some sources into your workspace is (almost) never enough. See #q252478 for one Q&A describing the general work flow for compiling packages from sources.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-22 01:51:54 -0500 )edit

Hi,thank you for your answer! I have solved this problem a few days ago. Firstly, I think the reason why there are always some lost package is that I deleted the base_local_planner package in my root folder. My supervisor help me solve this problem. He reinstalled ROS on my PC.

jla555 gravatar image jla555  ( 2017-07-27 14:33:50 -0500 )edit

As I remember, he said there are also some source address lost so he did some software updating, and then reinstalled the ROS and navigation package, then I can get the original code running and built successfully again by the package in root folder.

jla555 gravatar image jla555  ( 2017-07-27 14:38:14 -0500 )edit

Yeah, the next time I didn't remove the binary package but just creating a new workspace and built the modified base_local_planner in it. After that, I did source ~/<work_space_name>/devel/setup.bash to change my ROS_PACKAGE_PATH variable, and catkin_make the dwa_mobs_planner in another workspace

jla555 gravatar image jla555  ( 2017-07-27 14:44:00 -0500 )edit

This time the dwa_mobs_planner was built on the modified base_local_planner successfully.

jla555 gravatar image jla555  ( 2017-07-27 14:46:16 -0500 )edit