isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
2.07k stars 834 forks source link

[Question] UR10e + RG2 Gripper is not training end-to-end #1225

Open SabaGhorbani opened 1 week ago

SabaGhorbani commented 1 week ago

Question

Hi everyone,

I've recently started working with IsaacLab, focusing on the management-based code. I created an End-to-End RL solution similar to the Panda robot for object lifting. The robot reaches the object, but the grasping part isn't training properly. I tested the Panda end effector on the UR10e, but it hasn't been successful. I’ve adjusted nearly all the parameters, but it's still not working as effectively as it does with the Panda.

Can anyone help me troubleshoot this issue?

Screenshot from 2024-10-13 00-54-23

WangYCheng23 commented 1 week ago

you should adjust ee frame offset.

SabaGhorbani commented 1 week ago

I have adjusted the end-effector frame, but interestingly, it touches the object and then moves above it, and the end-effector is not closing when it should to function properly. I even replaced the end-effector with another and ensured it was working correctly, but during the best training outcome, the gripper passes through the object and rises above it. In other cases, the gripper closes, touches the cube, and then attempts to move the cube higher.

It's unusual—unlike the training process with the Panda robot, this behavior seems off.

WangYCheng23 commented 1 week ago

In the figure, it appears that your end-effector (EE) frame is positioned above the end-effector itself. You should consider reducing the Z-offset value of the EE frame.

SabaGhorbani commented 1 week ago

Yes, I understand your point. I've uploaded a video here to help clarify the issue. When I decrease the value, instead of grasping the wall, it just passes through the ball, which is quite puzzling for me. I’ve modified the following code (EE):

    marker_cfg = FRAME_MARKER_CFG.copy()
    marker_cfg.markers["frame"].scale = (0.1, 0.1, 0.1)
    marker_cfg.prim_path = "/Visuals/FrameTransformer"
    self.scene.ee_frame = FrameTransformerCfg(
        prim_path="{ENV_REGEX_NS}/Robot/base_link",
        debug_vis=False,
        visualizer_cfg=marker_cfg,
        target_frames=[
            FrameTransformerCfg.FrameCfg(
                prim_path="{ENV_REGEX_NS}/Robot/wrist_3_link",
                name="end_effector",
                offset=OffsetCfg(
                    pos=[0.0, 0.0, 0.10],
                ),

Screencast from 2024-10-14 20-13-13.webm

WangYCheng23 commented 1 week ago

try changing this

offset=OffsetCfg(
    pos=[0.0, 0.0, 0.10],
),

to

offset=OffsetCfg(
    pos=[0.0, 0.0, -0.50],
),
SabaGhorbani commented 1 week ago

I changed the offset to [0.0, 0.0, -0.50], but the gripper stay very far from cube.

Screencast from 2024-10-15 21-58-05.webm

WangYCheng23 commented 1 week ago

try tuning the value of the offset gently. However, the best way to find a accurate offset value is to grab the ee frame to a suitable place in isaasim app(click stop button during training)

SabaGhorbani commented 1 week ago

Thank you very much for the idea. So, you think the main issue is tuning the offset, which should be adjusted very precisely. Actually, I have changed it several times, but I’m not sure how accurate it needs to be. Can it be negative based on your last recommendation? I thought the offset is the distance from the wrist to the middle of the fingers, which I assumed couldn’t be negative.

My second question is: to find this value in IsaacSim, should I remove --headless during training and then stop the simulation? Can I move the robot manually afterward and measure the distances?

WangYCheng23 commented 1 week ago

first, check your 'ee_frame' setting, and then set 'debug vis' to True.

second, remove --headless during training and then stop the simulation. After that, drag and drop '/Visuals/EndEffectorFrameTransformer' to the place you want and remember the offset showing in the simulation.

SabaGhorbani commented 5 days ago

I think I am doing something wrong because when I drag and drop, nothing happens.

Screencast from 2024-10-18 10-46-50.webm

WangYCheng23 commented 5 days ago

1、stop simulation 2、click the frame under the ENdffectorFrameTransformer (carefully check your setting in code) Screenshot from 2024-10-18 10-04-09

your ee frame is above the robot ee. try to low down the frame to the place of gripper.

Screenshot from 2024-10-18 10-06-22

SabaGhorbani commented 5 days ago

I updated ee fram. It seems I only can move the markers:

    marker_cfg = FRAME_MARKER_CFG.copy()
    marker_cfg.markers["frame"].scale = (0.1, 0.1, 0.1)
    marker_cfg.prim_path = "/Visuals/FrameTransformer"
    self.scene.ee_frame = FrameTransformerCfg(
        prim_path="{ENV_REGEX_NS}/Robot/base_link",
        debug_vis=True,
        visualizer_cfg=marker_cfg,
        target_frames=[
            FrameTransformerCfg.FrameCfg(
                prim_path="{ENV_REGEX_NS}/Robot/wrist_3_link",
                name="end_effector",
                offset=OffsetCfg(
                    pos=[0.0, 0.0, 0.1],
                ),
            ),

Screencast from 2024-10-18 13-42-55.webm

WangYCheng23 commented 22 hours ago

I updated ee fram. It seems I only can move the markers:

    marker_cfg = FRAME_MARKER_CFG.copy()

    marker_cfg.markers["frame"].scale = (0.1, 0.1, 0.1)

    marker_cfg.prim_path = "/Visuals/FrameTransformer"

    self.scene.ee_frame = FrameTransformerCfg(

        prim_path="{ENV_REGEX_NS}/Robot/base_link",

        debug_vis=True,

        visualizer_cfg=marker_cfg,

        target_frames=[

            FrameTransformerCfg.FrameCfg(

                prim_path="{ENV_REGEX_NS}/Robot/wrist_3_link",

                name="end_effector",

                offset=OffsetCfg(

                    pos=[0.0, 0.0, 0.1],

                ),

            ),

Screencast from 2024-10-18 13-42-55.webm

stop the simulation and move it by changing properties

SabaGhorbani commented 2 hours ago

Thank you. I have tried many different options in the properties, but the end-effector does not move. I’m not sure how to solve this issue. I also tested various offsets from -0.5 to 0.5, but it has not improved the situation.