Skip to content
Snippets Groups Projects
Commit d075ef64 authored by David Tiede's avatar David Tiede
Browse files

Create Hello World

parent d30b9d7c
No related branches found
No related tags found
No related merge requests found
......@@ -133,22 +133,22 @@ include_directories(
## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
# add_executable(${PROJECT_NAME}_node src/intro_package_node.cpp)
add_executable(${PROJECT_NAME}_intro_package src/intro_package.cpp)
## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
set_target_properties(${PROJECT_NAME}_intro_package PROPERTIES OUTPUT_NAME intro_package PREFIX "")
## Add cmake target dependencies of the executable
## same as for the library above
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Specify libraries to link a library or executable target against
# target_link_libraries(${PROJECT_NAME}_node
# ${catkin_LIBRARIES}
# )
target_link_libraries(${PROJECT_NAME}_intro_package
${catkin_LIBRARIES}
)
#############
## Install ##
......
#include <ros/ros.h>
int main(int argc, char** argv)
{
ros::init(argc, argv, "intro_package_node");
ros::NodeHandle node_handle("intro_package_ns");
ROS_INFO("HELLO WORLD");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment