rickstaa / ros-gazebo-gym

Framework for integrating ROS and Gazebo with gymnasium, streamlining the development and training of RL algorithms in realistic robot simulations.
https://rickstaa.dev/ros-gazebo-gym/
MIT License
26 stars 2 forks source link

Incorrect offset application when using `end-effector` control #97

Open rickstaa opened 5 months ago

rickstaa commented 5 months ago

Bug Report: Incorrect Offset Application in EE Commands and Configurations

Description

In our codebase, while the ee_frame_offset is accurately applied when retrieving the end-effector (EE) position, it appears not to be correctly handled in two specific scenarios:

  1. Sending EE Commands to MoveIt: When the control type is set to end-effector, the offset seems to be improperly applied, potentially leading to inaccuracies in the command execution.

  2. Retrieving EE Joint Configuration: The retrieval of the EE joint configuration might not correctly account for the offset.

Due to current time constraints, a detailed examination and fix of this issue are beyond my current capacity.

[!IMPORTANT] This problem is also present when the hand is attached and control_type is set to end-effector because we automatically apply the offset of the panda_EE frame (see panda_env.py#L411-L432).

Reproduction Steps

  1. Set control_type to end-effector.
  2. Define an offset in the panda_reach.yaml configuration file.
  3. Insert a breakpoint at Line 960 in panda_env.py.
  4. Execute the start_panda_training.launch from the ros-gazebo-gym-examples package.
  5. Upon reaching the breakpoint, verify if the EE_frame aligns with the specified ee_position at the function's start.
  6. Anomalies have been noted, especially when the panda arm's rotation causes an inverse application of the offset.

Expected Behavior

The system should accurately apply the ee_frame_offset in all scenarios, ensuring that the end-effector's position and orientation are correctly calculated relative to the specified offset, even when the control type is end-effector and during the retrieval of the EE joint configuration.

System Information

Additional Context

This issue is critical for ensuring accurate end-effector positioning and movement, particularly in precise manipulation tasks. Immediate attention to rectify these discrepancies is highly recommended.