I need help !! How do i use an IR sensor to detect an incoming vehicle

Hello guys!

So my project is an autonomous boe-bot using an Arduino.
I have 3 main functionalities to implement..
1.Lane keeping
2. T-junction
3.Highway Scenario

So my circuit has 3 IR sensors- left,right and center.
I am using the same IR sensors to perform detection and checking the distance(using zones of the IR sensor)
I have implemented the lane-keeping using the right sensor.. and made the boebot stay in zone 1. so it is able to manoeuvre.

For the T junction I am using an obstacle detection logic. Saying as long as there is an object on the left there is no left turn(since we have an inner circle boundary which is tall).
If there is no wall on the left, if there is no obstacle in the center and if the right has an obstacle(outer boundary), then a random function to choose either center or straight path.

When this robot moves alone .. it moves perfectly. But when I add traffic( other boebots which just do lane following), they all collide. This should not happpen.
Out of 5 boe bots, one of them is assigned to be the intelligent autonomous decision making vehicle.
The other 4 are dumb traffic which follow lane and create congestion.

How do I make my intelligent robot detect the incoming traffic and avoid a collision?
If i implement the same detect logic using IR sensor, the boebot stops at the corners since it identifies is an obstacle.

I am limited because i have only IR sensors.. :frowning:

Can anyone help me out?? I need a fresh perspective on this...

I am attaching a diagram of my track..

Let me know if you need any more information.

tjunction left n right.png

tjunction left.png

Sure as hell they collide. Neither in your diagrams nor in your logic you have taken care of moving objects. Nor did you do with your 3-sensor-array - it has more blind spots than not.

We have only IR sensors and we have boundaries for our track, we have no way of distinguishing between a boundary wall and an incoming vehicle... We have already implemented the three sensor array.
We have tried using another sensor as well but it doesn't work since it is also IR :confused: :cry:

Well, then back to the drawing board.