PxController - Confine to ground | Setting the velocity?

I’m trying to use a PxController for my player character, but it’s not behaving in any way as I thought it would and I’m somewhat lost.
I’ve tried the same with a capsule controller and a box controller, both have the same behavior.

local mat = physx.CreateMaterial(0.5,0.5,0.1) -- Calls 'createMaterial' of the global physx::PxPhysics object
local controller = physx.CreateCapsuleController(mat,{
	height = 64,
	radius = 18,
	material = mat,
	contactOffset = 0.01
}) -- Calls 'createController' of the global physx::PxControllerManager object
local actor = controller:GetActor()

The code is written in lua, but all these functions do is call the equivalent physx functions.

To move the test-controller, I’m using the following code, which is run every time the world is simulated (Not every frame):

local dir = Vector(math.sin(CurTime()),0,math.cos(CurTime())) -- Have the controller move in a circle, CurTime() is time that has passed since the start of the program
local disp = dir *10 *DeltaTime() -- DeltaTime() is the time that has passed since the last simulation
local vel = actor:GetLinearVelocity()
local speed = vel:Length()
if(speed > 0) then print(math.abs(speed *DeltaTime() -disp:Length())) end -- Prints the difference of the actor's actual speed and the speed it should have

Now, there are a couple of things that are rather odd.
The actor does move in a circle as it should and collides with the world just fine. I noticed however that if I move the controller upwards, it moves away from the ground. I was assuming that calling move() was supposed to move the controller in a realistic fashion, in reality you can’t just walk upwards. How do I actually restrict the movement in relation to the ground and the controller’s up direction? (Disregarding things like jumping for the moment)

My second problem is regarding line 13 of the lower code snippet. Disp is the displacement vector in which the actor is supposed to be moved in. The way I see it, the actor’s speed and the displacement length should be exactly the same, so the difference should be 0 in all cases, but it isn’t. There’s a small deviation which can range from close to zero to around 0.07, which seems rather high to be a precision error.
The actor is on completely even ground, what am I missing?