ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
It reads (bytes) from whatever is currently templated as being the "hardware" that rosserial
uses for communication with the (ROS) host. It's a member variable of which the type depends on the Hardware
template argument.
To make it more concrete: if the NodeHandle
is specialised for an Arduino, it'll probably use the (first) serial port to read from / write to. If it were an embedded device that has an ethernet port, it'd probably be a TCP or UDP socket file handle. Etc, etc.
Edit:
So is this statement correct? The "hardware" is the Arduino?
Well, to be precise: hardware
actually points to whatever the underlying platform uses to transmit and receive bytes. For Arduinos, that's typically:
See rosserial_arduino/src/ros_lib/ArduinoHardware.h for the Arduino "serial type" class and rosserial_arduino/src/ros_lib/ros.h for the Arduino specialisation of the rosserial
template (note that it could use the serial and the TcpHardware
types).
Edit 2:
And for example the
uint32_t ms = hardware_.time();
function reads the clock from the Arduino and not from the host?
It's defined here, as a member of ArduinoHardware
and calls millis()
, so it would seem so, yes.
Asked: 2019-03-05 09:47:36 -0500
Seen: 189 times
Last updated: Mar 05 '19