Skip to content

03. Initial Project Configuration

Davood Dorostkar edited this page Jul 21, 2021 · 1 revision

Structure

You have a package.xml and a CMakeLists.txt inside every project.
package.xml holds dependencies' list. CMakeLists.txt holds settings of the project. You can simply comment/uncomment settings that are already included.
Make sure you have these settings in both files respectively:


Main definitions

<name>messagesWithPython</name>

<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>
project(turtlesimSimpleCommand)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  geometry_msgs
)

catkin_package(
  CATKIN_DEPENDS roscpp rospy std_msgs
)

include_directories(
  ${catkin_INCLUDE_DIRS}
)

target_link_libraries(driver
  ${catkin_LIBRARIES}
)

Configuration of specific situations (service, message,...) are described in their page.