Huge communication delay (latency) between ROS and HLP!!

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Huge communication delay (latency) between ROS and HLP!!

WAVE_Autonomous
Hi,

I'm using AscTec Pelican, with atom board. I want to perform a simple system ID test to figure out motor time constant and communication delay by issuing individual motor speeds from ROS. From ROS I'm sending commands at 1KHz, the serial communication is setup the maximum possible baudrate (921600)! I am sending actual motor speeds from HLP to ROS at 1Khz. The communication latency was 0.3sec!!! At this time the other ros messages like /fcu/imu was published at a rate of 500hz, fcu/rc was published at 20hz, etc etc.. At first I reduced the rate of /fcu/imu package from 500hz to 100hz to check if the latency get reduced, but there was no difference. Next, in the "fcu_parameters.yaml" file I setup rate of every topic to 0.0 except two of my custom topic that contain information of 4 double sized motor speed data. Again no difference in latency was observed!! Next, I changed the firmware code, and removed at the HLP end wherever the data was send to the ROS end, except only the the motor speed read and read message. For example, I commented out,

// --- send data to UART 0 ------------------------------------------------
  if (checkTxPeriod(subscription.imu))
  {
    // commented to reduce the communication delay
    //sendImuData();
  }

  if (checkTxPeriod(subscription.rcdata))
  {
// commented to reduce the communication delay
//    sendRcData();
  }

  if (checkTxPeriod(subscription.gps))
  {
  // commented to reduce the communication delay
  //  sendGpsData();
  }

and where ever any serial communication was being performed between HLP and ROS. Again I got the exact same 0.3sec latency!! I tried reducing the rate of reading motor speed back from 1Khz to 100Hz and even 10Hz, to reduce the latency, again the latency was 0.3sec!!

Seems there is some thing wrong somewhere, as 0.3 sec delay is huge!! Here is the picture of the response with the delay,

 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Huge communication delay (latency) between ROS and HLP!!

andre@asctec
Hi,

if your chart is correct, you are giving a step input to the system from 0 to 5. I am not sure about the units here. Anyway, if you are really going from a stand still motor (speed 0) to any other value, 0.3s is absolutely reasonable.
It takes significantly longer to spin up the motors than to go from one speed to another. Could you redo the test please with a step from maybe 1 to 10, so that the motors are always running?

Cheers,
Andre
Andre Ryll
AscTec Application Engineer
Loading...