Are you thinking about a curved wood base on the floor ?
or the hanging bassinet ?
or a perambulator that has a spring suspension ?
A simple motor with a cam can be secured to a wooden base and push on the floor. A small movement will have the effect of motion to the occupant.
I am guessing that the little one will not be climbing out of the safety cage any time soon so like every door in the house, every drawer and cabinet that has a pinch-point, the base to floor will not have fingers any time soon.
An extremely simple finger guard can be installed faster than reading this thread. So, on the safety side, the there is no issue.
The string to a wall is another way.
The basic concept is speed. Watch a baby rocking and count the times per minute movement
That is your desired motor RPM.
The distance of movement is the distance from the axis if the motor where the string is attached.
Lots and lots of 12v motors with 50-60 RPM or even much less.
You should be able to find the hanging kind of baby swing, often with a motor that swings it and plays a lullaby if you want.
You could add a movement sensor to know when the little one is active and send you an alert, or start a gentile swinging.
The piston on the floor allows for a very soft and gentle movement but can also be set to be more aggressive.
The need for the aggressive action is to mimic a car on a road which mimics the ride jr. was on for the last 9 months of being jostled, and jolted, pushed and squished. A low speed vibrator is not hard to make, but adds more comfort for the little one to help them fall asleep.
take a string, take your rocker, get a cup and some water
tie the string to the rocker, put it over a door knob and connect the cup.
lift the cup and let 'fall'
empty and it should not move the rocker
add water until it does
lift it, let it fall
the least amount of water needed is the goal. weigh the cup.
trigonometry will tell you the distance from the center of the motor shaft to the radius point of the string attachment.
with that, you calculate the torque needed based on the weight of the cup.
that is your motor selection.
For a floor attachment, you need to move the rocker and measure the distance. Same formula applied when determining force.