Ask Your Question

Revision history [back]

First, I would suggest never putting nh.spinOnce() calls in your setup() function -- spinning when the program is not entirely configured could lead to problems.

However, the bigger problem is that it would also appear that you are using "Serial.x" function calls when interfacing with your sensor, however, ROSSerial would also be using the first serial port to send data to the PC (unless you have a different ros.h, configuring a different serial port for the ros node handle to use, if so, please post those details as they are likely the culprit).