Skip to content

[Feature]: How to configure CompositeController for a 5-DoF robot (OSC for xyz pitch yaw + Joint for Wrist Roll) #791

@greatwallet

Description

@greatwallet

System / Environment

OS: Ubuntu 24.04
Python Version: 3.10
Robosuite Version: 1.5.1

Description

Hi, thank you for this amazing library!
I am working on a custom 5-DoF robotic arm and trying to collect teleoperation demonstrations using a gamepad.

The Problem:
When I use OSC_POSE controller for this 5-DoF arm (already excluding the gripper dof), the Jacobian is rank-deficient. As a result, the solver struggles to handle the orientation commands (specifically the Roll of the wrist). When I input a roll command via the gamepad, the robot barely moves or the solver prioritizes position over orientation, making the wrist uncontrollable. However, there is a specific joint that controls roll directly, so I wonder if there is a way for a composite composer to deal with this.
The Goal:
I want to achieve a hybrid control scheme to make teleoperation intuitive:
Joints 0-4 (all joints): Controlled by OSC_POSE (handling X, Y, Z, pitch, yaw, roll(although roll would not be changed in this mode)).
Joint 4 (Wrist joint): Controlled by JOINT_POS directly (handling the Roll rotation manually).

What I tried:
I tried to use CompositeController to split the arm into two parts, but I am not sure if this is the correct way to split a single kinematic chain in Robosuite.
Here is my conceptual config: (in actual robosuite, I don't think 'joints' is a valid key there)

controller_config = {
    "type": "COMPOSITE",
    "robot_name": "My5DoFRobot",
    "controllers": {
        "arm_position": {
            "type": "OSC_POSE",
            "joints": [0, 1, 2, 3, 4],  # all joints for XYZ, pitch, yaw
            "kp": 150,
            "input_type": "delta"
        },
        "wrist_roll": {
            "type": "JOINT_POS",
            "joints": [4],           # Last joint for Roll
            "kp": 50,
            "input_type": "delta"
        }
    }
}

Questions:
Is it supported to split a single robot's joints into two different sub-controllers like this?
Is there a better way/best practice in Robosuite to handle 5-DoF OSC control where I want to enforce explicit control over the wrist roll?
Any advice would be appreciated. Thanks!

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions