cubloxia, you have an another problem too:
if you use 2 ultrasonic SRF04, you must choose D2 and D4 on your grovepi, because the SRF04 use 2 pins.
on your project, i see, you use connect D3 and D4, it's impossible.
The SRF04 on D3, use D3 and D4 for the communication.
The SRF04 on D4 use D4 and D5 for the communication.