Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SabaGhorbani opened this issue Oct 12, 2024 · 12 comments
Open

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

SabaGhorbani opened this issue Oct 12, 2024 · 12 comments

Comments

@SabaGhorbani
Copy link

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
Copy link

you should adjust ee frame offset.

@SabaGhorbani
Copy link
Author

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
Copy link

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
Copy link
Author

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
Copy link

try changing this

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

to

offset=OffsetCfg(
    pos=[0.0, 0.0, -0.50],
),

@SabaGhorbani
Copy link
Author

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
Copy link

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
Copy link
Author

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
Copy link

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
Copy link
Author

SabaGhorbani commented Oct 17, 2024

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
Copy link

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
Copy link
Author

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

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

No branches or pull requests

2 participants