LiDAR Lite V3HP always returning 0 m/s velocity

Hi,

I’ve problem with LiDAR Lite V3HP.

I can’t measure the velocity with it, cause it’s always returning the 0 value.

Object on which i was doing a tests in quite big and sensor can measure the distance between them, so i guess it is fine.

Do you have any tip why I can get proper value of object velocity?

Share the code being used and maybe someone can help out

Sure.

I’m using code from [this repository. It’s in Lidar_Lite.py file.

In short I’m using default setting [LiDAR Lite V3HP sensor.

While object in front of sensor is moving, I try to read a velocity from 0x09 register.

Function for reading velocity is:

    def get_velocity(self) -> int:
        """
        The velocity measurement is the difference between the current
        measurement and the previous one, resulting in a signed (2’s complement)
        8-bit number in cm. Positive velocity is away from the device. This can
        be combined with free running mode for a constant measurement frequency.
        The default free running frequency of 10 Hz therefore results in a
        velocity measurement in .1 m/s.

        Returns
        ----------
        int
            Velocity in m/s.
            Positive value is returned when object is moving away from sensor.
            Negative value is returned when object is moving towards sensor.
        """

        vel = self.read_reg("VELOCITY")
        return self.signed(vel)

In my case it’s always returning 0 value.

The speed with which I pass the object in front of the sensor does not matter, and so the reading is 0 .](https://learn.sparkfun.com/tutorials/lidar-lite-v3-hookup-guide?_ga=2.119252361.122531728.1622056494-1162600219.1607511913)](LiDAR-Lite · PyPI)

To verify the Lidar Lite is working correctly, can you try connecting it to an Arduino as detailed in our [hookup guide?](LIDAR-Lite v3 Hookup Guide - SparkFun Learn)

I already did, as on below picture.

https://cdn.sparkfun.com/r/600-600/asse … ors_bb.jpg

Still I was getting 0m/s.

Might it be due to too fast time sampling? I’m using default setting of a sensor.

Sounds like there’s something wrong with your sensor.

If you purchased the sensor directly off our website, just [fill in the form on this page with your order number and the URL to this forum post and we can replace it for you.

If you purchased from a distributor or Amazon you will need to let them know you have a defective product and arrange with them for an exchange.](Return Policy - SparkFun Electronics)

ok, thx for feedback

Hi, guys,

I found the reason why this is happening.

Well, the LiDAR V3HP does not support velocity measurement, only the LIDAR Lite V3 does.

I recommend to check exactly what type of sensor you have.

I hope this answer will help someone:)

Very helpful, thanks!