ARISE-Initiative / robosuite

robosuite: A Modular Simulation Framework and Benchmark for Robot Learning
https://robosuite.ai
Other
1.24k stars 396 forks source link

How to control the robot arm to reach the specified position within the specified time #242

Closed kaixindelele closed 2 years ago

kaixindelele commented 3 years ago

Hi, I am building a table tennis system and I want to control the robot arm to reach the specified position and attitude at the specified end speed and at the specified time based on "OSC_POSE" control. My current configuration is as follows.

{
    "type": "OSC_POSE",
    "input_max": 1,
    "input_min": -1,
    "output_max": [0.05, 0.05, 0.05, 0.5, 0.5, 0.5, 0.5],
    "output_min": [-0.05, -0.05, -0.05, -0.5, -0.5, -0.5],
    "kp": 150,
    "damping_ratio": 1,
    "impedance_mode": "fixed",
    "kp_limits": [0, 300],
    "damping_ratio_limits": [0, 10],
    "position_limits": null,
    "orientation_limits": null,
    "uncouple_pos_ori": true,
    "control_delta": true,
    "interpolation": null,
    "ramp_ratio": 0.2
}

When I have action=1, what is the end velocity unit of the robot arm and can I get its trajectory equation? Which parameters are related to it?

Your controller is too complex, looking forward to giving some directional guidance, thank you very much~

roberto-martinmartin commented 2 years ago

For a trajectory following task, I'd recommend going beyond a pose controller and use a more complex motion generation procedure. A pose controller is useful to reach the desired pose but there are no guarantees on "how" will you reach it (what will be your velocity and acceleration) except in asymptotic convergence. You should look at the literature on splines. Splines are interpolation curves defining the equations of motion (position, velocity, acceleration) to connect via points in simple polynomial form. The via points are the constraints you want to impose on the trajectory: initial and final position, velocity and/or acceleration, or even additional via points with position/velocity/acceleration in between. Depending on the order/degree of the spline (for example, cubic), you can impose more or fewer constraints.

We use splines to interpolate when changing the desired pose, so that the motion is smoother.

Once you have computed a full trajectory, you can try to control the arm to achieve that trajectory accurately.

In any case, the OSC controller is very probably not enough for what you are trying to obtain, which is a motion with concrete derivatives of the pose (vel, acceleration) at the converging point.

Good luck!