This is a template for ros.
First, create a package by yourself.
And then follow following method.
There are python and cpp templates in catkin_ws folder.
Copy the file into your ros pkg and change the node name.
$ cd autoCreateTemplate
$ mkdir build; cd build
$ cmake ../
$ make
add the bin PATH into your .bashrc file.
$ createRosCppTemplate <arthor_name> <node_name> <pkg_name>
This will create three folders and four files:
- launch/param_<node_name>.launch
- config/<node_name>.yaml
- src/<node_name>.cpp
- src/<node_name>.h
Add node into CMakeLists.txt.
$ createRosPyTemplate <arthor_name> <node_name> <pkg_name>
This will create three folders and three files:
- launch/param_<node_name>.launch
- config/<node_name>.yaml
- src/<node_name>.py
$ chmod +x src/<node_name>.py