Skip to content

Fix fatal typo in joint velocity controller torque compensation#795

Open
mass2010chromium wants to merge 1 commit intoARISE-Initiative:masterfrom
mass2010chromium:master
Open

Fix fatal typo in joint velocity controller torque compensation#795
mass2010chromium wants to merge 1 commit intoARISE-Initiative:masterfrom
mass2010chromium:master

Conversation

@mass2010chromium
Copy link

What this does

Fix a fatal typo in joint velocity controller (name conflict with flag for using torque compensation)

How it was tested

Tested using the following configuration file:

{
    "type": "BASIC",
    "body_parts": {
        "arms": {
            "right": {
                "type": "JOINT_VELOCITY",
                "input_max": 1,
                "input_min": -1,
                "output_max": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                "output_min": [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0],
                "kp": 150,
                "damping_ratio": 1,
                "input_type": "delta",
                "interpolation": null,
                "ramp_ratio": 0.2,
                "gripper": {
                    "type": "GRIP"
                }
            }
        }
    }
}

Test script:

import os

import numpy as np

import robosuite
from robosuite.controllers import load_composite_controller_config

# Point this to the above file
controller_file = os.path.join(os.path.dirname(__file__), "panda_joint_controller.json")
controller_config = load_composite_controller_config(controller=controller_file)

freq = 20
episode_length=800
env = robosuite.make(
    "Stack",
    robots=["Panda"],
    gripper_types="default",
    controller_configs=controller_config,
    env_configuration="opposed",    # What are the options?
    has_renderer=False,
    #render_camera="frontview",
    has_offscreen_renderer=True,
    control_freq=freq,
    horizon=episode_length,
    use_object_obs=False,
    use_camera_obs=True,
    camera_names="agentview",
    camera_heights=80,
    camera_widths=80,
)

print(env.action_spec)  # Should be 8 dimensional due to 7 joint + gripper

Crashes with old, works with new.

How to checkout & try? (for the reviewer)

Run the provided test script using the provided json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant