strange behavior on my first robot with L298

change power to one battery 9V ?

No.

yes, i used a 6 batteries 1.5V together with this rectangular box.

Your battery may be OK. When I said "rectangular smoke alarm batteries" I meant one of the small batteries with the snaps on top. A pack of 6 1.5 batteries could be enough. I can't say for sure until I know what exact batteries that you are using and the current demands of what the batteries are powering.

Do you have a multi-meter? Monitor the battery voltage while your circuit is running. Is the voltage 9V or near? Does the battery voltage remain relatively steady or drop slowly?