Move a 3d rigidbody to its facing direction

I have the following scene:

enter image description here

I want the robot to move to each facing direction, so I tried:

rigidbody.AddForce(rigidbody.transform.TransformDirection(Vector3.up* speed));

And the robot is moving up like jumping.

I tried:

rigidbody.AddForce(rigidbody.transform.TransformDirection(Vector3.forward* speed));

but the robot is falling down

enter image description here

Any idea how can I solve this?

The system so far is doing exactly what it should. One comment: rigidbody.AddForce(transform.forward*speed) is shorter than what you have written.

In the first case, pushing it up makes it jump up. FYI: up is +Y, which is the green arrow. In the second case, it helps to understand what the system sees. The robot probably has a capsule collider (or maybe a tall box collider.) So it counts as being like a floor-lamp on a curved base, like a rich guy might own. If you put your hand midway and push forward, of course it moves forwards and tips over. That’s terrific – just like shoving a real floor-lamp or turned-off robot.

In general, the physics system assumes the objects are dead, super-stiff shapes, unless you check a box or code something different. If you give it a wider flat base, it will tip less and wobble more. Or a flat base and a physics material to lower friction will slide more and wobble less.

Now, if you want the robot to never tip over or wobble, you can “cancel” part of the physics simulation. In this case, look at the rigid body (which is what makes it move) and there are some checks to disable rotation. Trying each one should give a feel for them.