# use rosserial with FastSerial.h (ArduIMU)

Hi all,

I'm trying to modify the arduimu driver to publish imu messages via rosserial but my problem is that arduimu uses FastSerial.h which is required to be included before HardwareSerial.h, but I can't include FastSerial.h before ros.h because FastSerial.h defines HardwareSerial_h which then cuases HardwareSerial.h not to be included within ros.h and therefore fails to compile. Does anyone have an idea on how to make rosserial work in combination with FastSerial.h? I tried replacing HardwareSerial with FastSerial in ros_lib's ArduinoHardware.h and it compiled but doesn't work (when trying to connect using rosrun rosserial_python serial_node.py /dev/ttyUSB1 it loses sync with the device and no topics are being published).

Thanks, Thomas

edit retag close merge delete

Sort by » oldest newest most voted

I resolved it by using arduimu v1.7 instead of v1.8 which isn't using FastSerial.h ... and maybe the fix with replacing HardwareSerial with FastSerial works because I'm still getting the same sync loss using v1.7 when I don't comment some of the imu related commands out.

more