Writing ROS programs
1. Creating a workspace and a package
Creating a workspace: $ mkdir
Creating a package: $ catkin_create_pkg agitr
2. A simple program
(1) Writing source file,
named hello.cpp, belongs in your package folder, right next to package.xml and CMake-Lists.txt.
(2) Compiling the Hello program.
Declaring dependencies.
To list dependencies, edit the CMakeLists.txt in your package directory.
$ find_package(catkin REQUIRED COMPONENTS roscpp)
list dependencies in the package manifest (package.xml), using the build-
_depend and run_depend elements:
_depend and run_depend elements: