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

Revision history [back]

Hi @chrissunny94, make sure you add #define ROSSERIAL_ARDUINO_TCP before including the file "ros.h".

Like this:

#define ROSSERIAL_ARDUINO_TCP
#include "ros.h"
IPAddress server(192, 168, 0, 100);
const uint16_t serverPort = 11411;
nh.getHardware()->setConnection(server, serverPort);

This should solve the error: ‘class ArduinoHardware’ has no member named ‘setConnection’.

Thanks!