Packages are the main unit for organizing software in ROS. A package may contain ROS runtime processes (nodes), a ROS-dependent library, datasets, configuration files, or anything else that is usefully organized together. Packages are the most atomic build item and release item in ROS. Meaning that the most granular thing you can build and release is a package.
When possible, the default name of a node should follow from the name of the executable used to launch the node. This default name can be remapped at startup to something unique.
To follow REP-144, each sensor will get its own package with one or more nodes to be executed. Following this scheme it will be possible to use the sensors in other projects and work with existing packages such as packages from the navigation stack.
Standard Units of Measure and Coordinate Conventions
Please see REP 103 for documentation on the standard units of measure and coordinate conventions followed here.
Packages and Nodes
Create a new Catkin package
$ catkin create pkg PKG_NAME [--catkin-deps [DEP [DEP ...]]]
For example the
grove_ultrasonic_ranger package is created with the following command:
fjp@ubuntu:~/git/diffbot/ros/src$ catkin create pkg grove_ultrasonic_ranger --catkin-deps rospy roscpp sensor_msgs Creating package "grove_ultrasonic_ranger" in "/home/fjp/git/diffbot/ros/src"... Created file grove_ultrasonic_ranger/CMakeLists.txt Created file grove_ultrasonic_ranger/package.xml Created folder grove_ultrasonic_ranger/include/grove_ultrasonic_ranger Created folder grove_ultrasonic_ranger/src