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

Nothing jumps to mind as a problem in your code. Does Hello World run on the arduino mega? If it does, I suggest you break the system down to try & discover exactly what's breaking it, and why.

Some suggestions: - Publish "Hello" in your main loop and when you stop seeing it come out in ROS is the exact time when the system died - Turn the motor by hand (vs sending a command). If it crashes when you turn it by hand then it's the encoder interrupts, as you suspect. If not, then something else is going on. - Blink the arduino LED in your main loop. Does it keep blinking when the serial port read failure happens? If not, Arduino has crashed.

Hope this helps

Paul