Object avoidance using Pixhawk , raspberry pi and hc-sr04 us sensor


#1

How can we connect these components and develop an object avoiding drone ?


#2

Are you using APM or PX4?

For APM, this should be helpful.
For PX4, you would have to write your own algorithm to avoid obstacle.


#3

I cannot connect hc sr 04 sensor directly to flight controller and i m using pixhawk as my controller…can u provide me proper interface between the three components i listed
I tried connecting the sensor to Arduino n connecting arduino to pi but your os didn’t allowed me to download ros on my pi
Do your os has some bugs? As it makes my pi work too slow even on 64gb memory card


#4

What interface options are provided by your sensor?

RPi supports I2C/SPI devices, and you can connect sensors which support I2C/SPI.
In case, your sensor supports I2C/SPI, you should find an online an RPi compatible driver for your sensor.

Once you have a driver, you can use it to fetch data from the sensor and use FlytOS to control the drone according to the data received from the sensor.