ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 / 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.

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.

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:

  • hardware RS232
  • software RS232 (some pins)
  • Serial-over-USB

See rosserial_arduino/src/ros_lib/ArduinoHardware.h for the Arduino specialisation of the rosserial template.

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:

  • hardware RS232
  • software RS232 (some pins)
  • Serial-over-USB

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.

template (note that it could use the serial and the TcpHardware types).

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:

  • hardware RS232
  • software RS232 (some pins)
  • Serial-over-USB

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, so it would seem so, yes.

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:

  • hardware RS232
  • software RS232 (some pins)
  • Serial-over-USB

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.