RE: Unable to start VL53l0x - LIDAR distance ranger sensor | CUBE orange

Hi,

I am unable to start the subject VL53l0x distance sensor . The sensor is compiled and i can run the command vl53l0x status and it says " Not running "

Attached a picture of the commands available.

  1. Is the address of the i2c device to be given as a hex address or some other format
  2. what is internal i2c ( option -i ) & what is external i2c bus ( option -x)

Can you please create a public post?

this was a public post

Do you have a link?

Hi

https://px4.github.io/Firmware-Doxygen/dir_23bbffb6e72bc3144be61337e75c0477.html

@JulianOes Hi

Were you able to figure out this coding for the sensor.

thank you

Do you have the param enabled? Parameter Reference | PX4 User Guide

Hi
i see this parameter list indicates vl53l1x distance sensor. The one I am currently using is vl53l0x sensor.
Were you referring to the parameter " SENS_EN_VL53L1X

Also i tried to run this sensor using RasPi 3b+ with no success. I will revert once i am sure it works with Raspi.
I am assuming here that there are internal pull ups enabled for the i2c port on the Orange CUBE. I have measured 5v as power from i2c port of the CUBe and 3.4V from SDA line . .

I would check what the the difference is between the two sensors. It could be that they have a different WHO_AM_I (or other device id). If so, then you’d have to adapt the driver a bit.

Hi

I confirm here that my distance sensor works fine but we have to use the command vl53l0x START -X command thro’ mavlink console every time . What other parameters should I enable or edit to make it obstacle sensing.

Ok, are you building your own firmware for this?

If so, then you just need to add the start command to the startup script, e.g. somewhere here:

No. I am not building my own firmware as I don’t know the setup of these custom firmware.
Where is the " px4fmu_common/init.d/rc.sensors " . Is it on the SD card of the Orange CUBE f.c or do I need to custom compile the firmware !!

Also i am not able to see the parameter MPC_COL_PREV_D to enable collision prevention in QGroundControl GCS . In this case what is the use of the VL53l0x sensor

Oh I think I realized what is wrong now. The param and startup entry for this sensor is just missing, isn’t it? Sorry that took me a while.

Until that change goes into PX4, you can try to add this command to a custom startup script on the SD card.

You can just add the startup to a file extras.txt in a folder etc on your sd card.

Something like:

#!/bin/sh

vl53l0x start -X

Here are the docs: System Startup | PX4 User Guide

Can I make this thread public in the forum so that others can see it?

yes of course…let’s go public…we need your support on this as i am still hunting for a solution…i will try out your file creation and will be back in few minutes from this moment

thank you

Your start up script under /etc/extras.txt solution was not working initially … But when i removed the .txt from the filename and renamed it as extras , it works !! I could see the distance sensor graph readings.

Now the next question is while check listing the collision prevention and obstacle avoidance under QGroundControl safety menu , the drone doesn’t take off. it says obstacle sensing is not configured. i unchecked the obstacle sensing , the drone arms but it is not doing the collision prevention in POSITION flight mode … … What other parameters should i input from here .

your input is very very valuable …

thank you

Windows probably adds the .txt and you don’t see it.

1 Like