# Multiple ( Rangefinder/ distance sensor ) Radar on px4 without companion

**URL:** <https://discuss.px4.io/t/multiple-rangefinder-distance-sensor-radar-on-px4-without-companion/40271>\
**Category:** PX4 Autopilot\
**Created:** [August 19, 2024, 8:13pm UTC](https://discuss.px4.io/t/multiple-rangefinder-distance-sensor-radar-on-px4-without-companion/40271 "2024-08-19T20:13:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bunny](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/3d9bf3/32.png) [@Bunny](https://discuss.px4.io/u/Bunny)\
**Post date:** [August 19, 2024, 8:13pm UTC](https://discuss.px4.io/t/multiple-rangefinder-distance-sensor-radar-on-px4-without-companion/40271/1 "2024-08-19T20:13:02Z")

</div>

Hey,

I want to perform collision avoidance using radar in multiple direction. But I don’t know how to configure multiple radars for different ports and orientation. I do not want to use a companion computer for this. I would prefer detail steps on how to achieve this.

Info:  
Using px4 1.15.0 on Cube orange with QGC.

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [August 20, 2024, 1:39am UTC](https://discuss.px4.io/t/multiple-rangefinder-distance-sensor-radar-on-px4-without-companion/40271/2 "2024-08-20T01:39:31Z")

</div>

Doe the radars allow individual I2C addressing?

---

<div class="post-metadata">

**Author:** ![Bunny](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/3d9bf3/32.png) [@Bunny](https://discuss.px4.io/u/Bunny)\
**Post date:** [August 20, 2024, 1:46pm UTC](https://discuss.px4.io/t/multiple-rangefinder-distance-sensor-radar-on-px4-without-companion/40271/3 "2024-08-20T13:46:42Z")

</div>

I am using Ainstein US-D1 Standard Radar Altimeter. It only has UART and CAN interface.

---

<div class="post-metadata">

**Author:** ![Bunny](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/3d9bf3/32.png) [@Bunny](https://discuss.px4.io/u/Bunny)\
**Post date:** [August 23, 2024, 1:31pm UTC](https://discuss.px4.io/t/multiple-rangefinder-distance-sensor-radar-on-px4-without-companion/40271/4 "2024-08-23T13:31:07Z")

</div>

@JulianOes is there a way to do this? can I create multiple Ainstein radar drivers to achieve this? Or is there any other solution?  
I would really appreciate any help in this.

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [August 25, 2024, 2:39am UTC](https://discuss.px4.io/t/multiple-rangefinder-distance-sensor-radar-on-px4-without-companion/40271/5 "2024-08-25T02:39:24Z")

</div>

Ah, I assume you have to use CAN because you won’t have enough UARTs available, unless you build your own multiplexer.

So then the question is whether you can set up the radars to different CAN (DroneCAN?) ids, so that you can distinguish them.

---

<div class="post-metadata">

**Author:** ![Bunny](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/3d9bf3/32.png) [@Bunny](https://discuss.px4.io/u/Bunny)\
**Post date:** [August 26, 2024, 5:49pm UTC](https://discuss.px4.io/t/multiple-rangefinder-distance-sensor-radar-on-px4-without-companion/40271/6 "2024-08-26T17:49:43Z")

</div>

@JulianOes I will look into the CAN ids. But before that i think i have 2-3 UART ports available which could be enough for me. In that case can create another Ainstein radar drivers to achieve this?

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [August 30, 2024, 2:47am UTC](https://discuss.px4.io/t/multiple-rangefinder-distance-sensor-radar-on-px4-without-companion/40271/7 "2024-08-30T02:47:53Z")

</div>

You would start the driver for each UART in that case, yes.

---

<div class="post-metadata">

**Author:** ![Bunny](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/3d9bf3/32.png) [@Bunny](https://discuss.px4.io/u/Bunny)\
**Post date:** [September 2, 2024, 5:25pm UTC](https://discuss.px4.io/t/multiple-rangefinder-distance-sensor-radar-on-px4-without-companion/40271/8 "2024-09-02T17:25:04Z")

</div>

@JulianOes I replicated the the code in src/driver for uland radar. Do you know what else I am supposed to change in the source code? Are there any official steps?
