- A ROS node is any program that uses ROS to publish/subscribe to topics, calls or provides services etc. ROS nodes
#include
some ROS headers (C++) or import
ROS modules (Python) and call functions defined there, like ros::init()
/ rospy.init_node()
, publish()
and so on. Some ROS nodes are "ROS drivers", others do path planning/sensor data processing/whatever. - A ROS driver is a ROS node that makes a piece of hardware accessible from ROS. For example, it talks to a laser scanner and publishes the output of the device as ROS messages.
- Sometimes, the actual Linux hardware driver is part of the ROS driver node; however, it's better to separate the hardware driver and the ROS communication part. In that case, the Linux driver is usually provided as a ROS-agnostic library, and the ROS driver simply performs API calls to that library and converts the results to ROS messages. In that case, it is called a ROS wrapper.
As an example, the sicktoolbox is a standalone Linux device driver library for SICK laser scanners. If you search the source code, you won't find any mention of ROS in the actual source files. The sicktoolbox_wrapper is a ROS package that contains several ROS nodes, for example sicklms
. If you look at the source code (sicklms.cpp), you can see that it's a ROS node that uses the sicktoolbox API (by calling GetSickScan()
) and publishes the result as a ROS message, so it's a ROS wrapper:
#include "ros/ros.h"
[...]
ros::init(argc, argv, "sicklms");
[...]
sick_lms.GetSickScan(range_values, intensity_values, n_range_values, n_intensity_values);
[...]
pub->publish(scan_msg);