Inverse Kinematics on a fixed plane

Hi everyone,
I’m currently working on a school project with an UR5e/UR3e, we need to link it with python and ROS. For that, I need the Inverse Kinematic of the robots in a planar configuration. We’ve had troubles installing the UR drivers for ROS, so it falls on me to actually make the IK

I fixed Theta1= -π/2 | Theta5= -π/2 and Theta6=0 (Tho it could potentially move)
Which would then result in a configuration like the following picture (Apologize for the drawing quality)

In this configuration, any position the robot takes falls under these conditions:

x= -d4 | y < 0 | z> d1

This is effectively a planar robot with 3 rotations. However, it’s been really hard to actually find the formulas, I’ve tried to find the O4 coordinates with no success. And searching the internet yielded very little results, even academic papers have been dissapointing.
So yeah, I’m pretty much out of options on this, any clue to what I could realistically do?

Thanks in advance!