azizsm:
That would be really problematic, is there a different approach that could achieve this ?
The cart would need to be able to correct / verify its position from external indicators. They could be active (such as a flashing LED that is only visible from a very narrow angle) or passive, such as marks on the floor or on the bookshelves.
If you had the computing power of a PC you might consider a vision system, but the Arduino can't do that.
...R