Trying to add a target to the ant environment #398
Replies: 1 comment
-
Hi @eleninisioti, hope you were able to resolve the issue, but happy to take a look otherwise |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to extend the ant environment to contain a red ball that the ant needs to navigate to. For this, I thought of taking inspiration from the reacher environment, which has a target the arm needs to reach. So I slightly modified the ant.xml file by adding a new body called target and adding two zero elements in the init_qpos tag:
and I slightly modified the ant.py file with the target logic following reacher.py:
As you can see in the code above I have set the location of the target to (20,-40) for debugging and I am tracking the metrics target_x and target_y, seeing that they take random values (for example [target_x, target_y] may be [-47,-134] at the first evalution and [71,332] in the second).
I do not deeply understand the physics dynamics for now, so probably I am doing something wrong by imitating reacher. For example, I have assumed that the position of the target is at index -2 of pipeline_state.x, but this may not be the case.
Beta Was this translation helpful? Give feedback.
All reactions