It comes from the neighboring Royal Palace and as you can see it is decorated with an inscription (in french language): Paine pour joie
This is a fifteenth century work because Peine (or paine) pour joie was the chivalry insignia of Don Pedro de Portugal (1429-1466) which was proclaimed king of Aragon and Count of Barcelona in 1464 during the uprising against King John II.
The meaning of Peine pour joie would be pain for joy or pain for pleasure.
Pain for pleasure. An interesting sentence from the BDSM standpoint and an interesting fifteenth century object to be incorporated to the virtual museum of BDSM