0
$\begingroup$

Rosanswers logo

in src there is a package named relaxed_astar including: CMakeLists.text package.xml

This is the full cmakelists.text:

cmake_minimum_required(VERSION 2.8.3)
project(relaxed_astar)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)


## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()

################################################
## Declare ROS messages, services and actions ##
################################################

## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
##   your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
##   * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
##   * If MSG_DEP_SET isn't empty the following dependencies might have been
##     pulled in transitively but can be declared for certainty nonetheless:
##     * add a build_depend tag for "message_generation"
##     * add a run_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
##   * add "message_generation" and every package in MSG_DEP_SET to
##     find_package(catkin REQUIRED COMPONENTS ...)
##   * add "message_runtime" and every package in MSG_DEP_SET to
##     catkin_package(CATKIN_DEPENDS ...)
##   * uncomment the add_*_files sections below as needed
##     and list every .msg/.srv/.action file to be processed
##   * uncomment the generate_messages entry below
##   * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)

## Generate messages in the 'msg' folder
# add_message_files(
#   FILES
#   Message1.msg
#   Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
#   FILES
#   Service1.srv
#   Service2.srv
# )

## Generate actions in the 'action' folder
# add_action_files(
#   FILES
#   Action1.action
#   Action2.action
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
#   DEPENDENCIES
#   std_msgs
# )

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES relaxed_astar
#  CATKIN_DEPENDS roscpp rospy std_msgs
#  DEPENDS system_lib
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
# include_directories(include)
include_directories(
  ${catkin_INCLUDE_DIRS}
)


## Declare a cpp library
#add_library(relaxed_astar
 # src/${PROJECT_NAME}/relaxed_astar.cpp
# )



add_library(relaxed_astar_lib src/RAstar_ros.cpp)



## Declare a cpp executable


## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
# add_dependencies(relaxed_astar_node relaxed_astar_generate_messages_cpp)
#add_executable(relaxed_astar_node src/relaxed_astar_node.cpp)
## Specify libraries to link a library or executable target against

Also this's the full package.xml is

<?xml version="1.0"?>
<package>
  <name>relaxed_astar</name>
  <version>0.0.0</version>
  <description>The relaxed_astar package</description>

  <!-- One maintainer tag required, multiple allowed, one person per tag --> 
  <!-- Example:  -->
  <!-- <maintainer email="[email protected]">Jane Doe</maintainer> -->
  <maintainer email="[email protected]">turtlebot</maintainer>


  <!-- One license tag required, multiple allowed, one license per tag -->
  <!-- Commonly used license strings: -->
  <!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
  <license>TODO</license>


  <!-- Url tags are optional, but mutiple are allowed, one per tag -->
  <!-- Optional attribute type can be: website, bugtracker, or repository -->
  <!-- Example: -->
  <!-- <url type="website">http://wiki.ros.org/relaxed_astar</url> -->


  <!-- Author tags are optional, mutiple are allowed, one per tag -->
  <!-- Authors do not have to be maintianers, but could be -->
  <!-- Example: -->
  <!-- <author email="[email protected]">Jane Doe</author> -->


  <!-- The *_depend tags are used to specify dependencies -->
  <!-- Dependencies can be catkin packages or system dependencies -->
  <!-- Examples: -->
  <!-- Use build_depend for packages you need at compile time: -->
  <!--   <build_depend>message_generation</build_depend> -->
  <!-- Use buildtool_depend for build tool packages: -->
  <!--   <buildtool_depend>catkin</buildtool_depend> -->
  <!-- Use run_depend for packages you need at runtime: -->
  <!--   <run_depend>message_runtime</run_depend> -->
  <!-- Use test_depend for packages you need only for testing: -->
  <!--   <test_depend>gtest</test_depend> -->
  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>nav_core</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <run_depend>nav_core</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>rospy</run_depend>
  <run_depend>std_msgs</run_depend>


  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- You can specify that this package is a metapackage here: -->
    <!-- <metapackage/> -->
    <nav_core plugin="${prefix}/relaxed_astar_planner_plugin.xml"/>

  </export>
    <!-- Other tools can request additional information be placed here -->

</package>

When I run catkin_make it gives me error in the end

     [100%] Building CXX object relaxed_astar/CMakeFiles/relaxed_astar_lib.dir/src/RAstar_ros.cpp.o
In file included from /home/denso/catkin_ws/src/relaxed_astar/src/RAstar_ros.cpp:37:0:
/home/denso/catkin_ws/src/relaxed_astar/src/RAstar_ros.h:38:43: fatal error: move_base_msgs/MoveBaseAction.h: No such file or directory
 #include <move_base_msgs/MoveBaseAction.h>
                                           ^
compilation terminated.
make[2]: *** [relaxed_astar/CMakeFiles/relaxed_astar_lib.dir/src/RAstar_ros.cpp.o] Error 1
make[1]: *** [relaxed_astar/CMakeFiles/relaxed_astar_lib.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j1 -l1" failed

PLEASE CHECK THIS LINK FOR MORE INF link text

I would appreciate it if you help me out.


Originally posted by DENSO on ROS Answers with karma: 37 on 2015-08-18

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

If you have installed it (see answer from sloretz@em) you also need to find_package it. I.e., extend your find_package call to contain:

 find_package(catkin REQUIRED COMPONENTS
  costmap_2d
  move_base_msgs
  roscpp
  rospy
  std_msgs
)

And you should add them as dependencies in the package.xml as well.


Originally posted by mgruhler with karma: 12390 on 2015-08-19

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by DENSO on 2015-08-19:
Solved the problem after following sloretz@em and mig

$\endgroup$
0
$\begingroup$

Rosanswers logo

fatal error: move_base_msgs/MoveBaseAction.h: No such file or directory

Sounds like move_base_msgs is not installed. What release of ROS are you using (Indigo? Jade?). Try installing using one of these commands:

if indigo

sudo apt-get install ros-indigo-move-base-msgs

if Jade

sudo apt-get install ros-jade-move-base-msgs

Originally posted by sloretz with karma: 3061 on 2015-08-18

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by DENSO on 2015-08-18:
sorry but i still have this error

[100%] Building CXX object relaxed_astar/CMakeFiles/relaxed_astar_lib.dir/src/RAstar_ros.cpp.o
In file included from /home/user/catkin_ws/src/relaxed_astar/src/RAstar_ros.cpp:37:0:
/home/user/catkin_ws/src/relaxed_astar/src/RAstar_ros.h:63:39: fatal error: costmap_2d/costmap_2d_ros.h: No such file or directory
compilation terminated.
make[2]: *** [relaxed_astar/CMakeFiles/relaxed_astar_lib.dir/src/RAstar_ros.cpp.o] Error 1
make[1]: *** [relaxed_astar/CMakeFiles/relaxed_astar_lib.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.