Please provide a minimal example of MCU Command: `queue_step`?


I’m trying to acheive a low response time equivalent of LinuxCNC’s Python Interface jog command, which has this signature: jog(command, jjogmode, joint_num_or_axis_index, velocity[, distance]])

So, I think I need to send MCU Commands: MCU commands - Klipper documentation

For example, if I wanted to run these steps on the X-axis motor:
x_step_durations = [2000 - pow(10*i, 1/2) for i in range(200)] # in micros

I’d send 200 MCU Commands:
queue_step oid={oid} interval={duration} count=1 add=0

I don’t know how to get oid, and I don’t know how to go about sending this message. I was hoping to get a minimal example of how to do that from a Python script.

Also, I understand that there is step compression - is that something I could feed this list to, and get something more optimized?

Or, is my question naive or lazy in some way? Is there another approach entirely I should be taking?