ros-drivers / velodyne

ROS support for Velodyne 3D LIDARs
http://ros.org/wiki/velodyne
Other
649 stars 645 forks source link

Add Configurable Packets/Revolution Value #245

Closed JWhitleyWork closed 5 years ago

JWhitleyWork commented 5 years ago

Is your feature request related to a problem? Please describe. When the Velodyne is configured to use a custom start or end FOV, the default packet rate is not acceptable.

Describe the solution you'd like Add one of two features:

  1. Number of packets per revolution is configurable by the user.
  2. The start/end FOV parameters can be input by the user and the number of packets per revolution is calculated automatically.

Additional context This has been suggested before in #244, #33, and others.

JWhitleyWork commented 5 years ago

I'm not positive, but the cut_at_specified_angle feature may fix this. Testing...

Oyssster commented 4 years ago

May I ask if you are in a simulation environment or the real velodyne lidar?

JWhitleyWork commented 4 years ago

@Oyssster This really only applies to using the real lidar because the RP varies somewhat.

nshahrestani commented 3 years ago

@JWhitleyWork Does the "cut_at_specified_angle" feature fix this? If so, would you mind describing how to set it?

JWhitleyWork commented 3 years ago

@nshahrestani Please do not bump old threads.

In this case, I do not believe the cut_at_specified_angle fixes the problem.

mantkiew commented 9 months ago

I have just encountered another problem with VLS-128 whereby the sensor is outputting a smaller number of packets per revolution even despite having a 0-359 FOV set. There also seems to be a discrepancy between the number used in the driver and the manual:

Driver:

packet_rate = 6253.9;

Whereas the manual specifies on page 52-53:

Single return mode: 1 packet/0.1658 ms ≈ 6030.5 packets/second. Total packet rate is approximately 6030.5 data packets/second + 94 position packets/second = 6124.5 packets/second, approximately. Remember, this is an average.

So, is the 6253.9 including both data and position or is it only for data packets? Also, where did the value come from?

The issue #33 applies here as I was operating the lidar in low temperature and despite maintaining the set RPM (I tested with 300, 600, 660, and 1200), the number of packets was only 5700.

So, it seems that (as others have also mentioned), these packets rates are not really that constant and they vary widely depending on the outside temperature. I think that we need to have a more dynamic algorithm that determines the actual packet rate based on the azimuth of the incoming packets - we can simply count them until they complete the full revolution.

For others encountering this issue, the symptoms are as follows:

  1. The velodyne packets frequency in ROS drops below the expected one
  2. The lidar sends less packets but the driver waits for the set number and therefore the single ring covers more than 360 degrees.
  3. You can reduce the packet number in the code but if you reduce it too much, there will be a visible rotating gap in the ring.