5 seconds Time Lag for machine to react to command

asked 2018-09-14 18:25:33 -0500

We are using ROS with Arduino. When inputting command, it take about 5 seconds for the machine to react to the command. We are not sure why there is such a long lag.

edit retag flag offensive close merge delete


which command? how are you connected to the arduino? you should provide a little bit more information..

alsora gravatar image alsora  ( 2018-09-14 19:14:38 -0500 )edit

We are using a miniPC-P4 (running ROS) connected by USB cable to the Arduino. We have discovered when we sent command (like start and stop a motor). It takes roughly 5 secs before the motor turns on or off. We are thinking the ROS may be causing the delay.

lumatas gravatar image lumatas  ( 2018-09-14 20:13:59 -0500 )edit

We are thinking the ROS may be causing the delay.

Could well be true, but with the absolute minimum of information that you provide us, it could be anything.

You'll have to either:

  • verbally describe your setup with much more detail
  • show us some code

In the past, tight loops on ..

gvdhoorn gravatar image gvdhoorn  ( 2018-09-15 01:46:28 -0500 )edit

.. the Arduino side, not calling ros::spinOnce() at appropriate times, blasting msgs at the Arduino at 10kHz, not using the correct (or maximum supported) baudrate and more such things have resulted in similar observations.

We're going to need more information to be able to say anything.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-15 01:49:53 -0500 )edit