aidudezzz / deepworlds

Examples and use cases using the deepbots framework (https://github.com/aidudezzz/deepbots) with the Webots robot simulator.
GNU General Public License v3.0
50 stars 23 forks source link

Panda - fix coordinate system #61

Closed KelvinYang0320 closed 2 years ago

KelvinYang0320 commented 2 years ago

I switch Panda Goal Reaching example to ENU that is the new default coordinate system on Webots R2022a. Since we only need to consider the relative position, we don't need to modify our code except the wbt file.

Check if it works correctly without training:

  1. Download the pretrained agent into the following folder: /deepworlds/examples/panda/panda_goal_reaching/controllers/robot_supervisor_manager/tmp/ddpg.

Directories structure:

\tmp
  \ddpg
    \Actor_ddpg
    \Critic_ddpg
    \TargetActor_ddpg
    \TargetCritic_ddpg
  1. Please add message = [message[0], message[2], -message[1]] between these two line. The pretrained agent is trained in NUE, so we need a coordinate transformation (ENU(x, y, z) -> NUE(x, z, -y)).

  2. You should be able to see that the agent works correctly.