<p>Here's an incomplete answer, but it may help.</p>
<p>Your state is read by the function <code>getExtendedObservation()</code>. This function makes two things : it calls the function <code>getObservation()</code> from <a href="https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_envs/bullet/kuka.py" rel="nofollow noreferrer">this source code</a>, gets a state, and extend this state with three components :</p>
<blockquote>
<p>relative x,y position and euler angle of block in gripper space</p>
</blockquote>
<p>But what are the 5 first components returned by <code>getObservation()</code>? From what I read, there are positions, then euler angles describing the orientation. But that would make 6 + 3 = 9 features, so there is either only 2 positions, or only 2 euler angles. You may know kuka better than me and know the answer of this one :).</p>
<p>So, to sum up :</p>
<pre><code>state = [X, Y, (Z, ) , Alpha, Gamma, (Beta, ), gripX, gripY, gripAlpha]
</code></pre>
<p>(Either Z or Beta is absent)</p>

CC BY-SA 4.0
2020-08-27T10:38:15.183Z
There's a mistake in the question. The state space for the environment is actually a 9 dimensional vector, in which case, your answer is correct. I ll rectify the typo right away. Thanks for the help!
Vedant Shah
CC BY-SA 4.0
2020-08-18T07:09:42.423Z
2020-08-23T12:31:33.933Z
2020-08-23T12:31:33.933Z
16Aghnar
<p>I trying to use DDPG augmented with Hindsight Experience Replay (HER) on <a href="https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_envs/bullet/kukaGymEnv.py" rel="nofollow noreferrer">pybullet's KukaGymEnv</a>.</p>
<p>To formulate the feature vector for the goal state, I need to know what the features of the state of the environment represent. To be precise, a typical state vector of KukaGymEnv is an object of the <code>numpy.ndarray</code> class with a shape of <code>(9,)</code>.</p>
<p>What do each of these 8 elements represent, and how can I formulate the goal state vector for this environment? I tried going through the <a href="https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_envs/bullet/kukaGymEnv.py" rel="nofollow noreferrer">source code</a> of the KukaGymEnv, but was unable to understand anything useful.</p>

<reinforcement-learning><ddpg><hindsight-experience-replay><state-spaces><pybullet>
What do the state features of KukaGymEnv represent?
Vedant Shah
# What do the state features of KukaGymEnv represent?

(Asked by: username_0 on 2020-08-18)

I trying to use DDPG augmented with Hindsight Experience Replay (HER) on [pybullet's KukaGymEnv](https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_envs/bullet/kukaGymEnv.py).

To formulate the feature vector for the goal state, I need to know what the features of the state of the environment represent. To be precise, a typical state vector of KukaGymEnv is an object of the `numpy.ndarray` class with a shape of `(9,)`.

What do each of these 8 elements represent, and how can I formulate the goal state vector for this environment? I tried going through the [source code](https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_envs/bullet/kukaGymEnv.py) of the KukaGymEnv, but was unable to understand anything useful.

**Tags:** reinforcement-learning, ddpg, hindsight-experience-replay, state-spaces, pybullet


---

## 1 answers

### Answer by username_1 on 2020-08-18. Score: 1 | Accepted answer

Here's an incomplete answer, but it may help.
Your state is read by the function getExtendedObservation(). This function makes two things : it calls the function getObservation() from this source code, gets a state, and extend this state with three components :

relative x,y position and euler angle of block in gripper space

But what are the 5 first components returned by getObservation()? From what I read, there are positions, then euler angles describing the orientation. But that would make 6 + 3 = 9 features, so there is either only 2 positions, or only 2 euler angles. You may know kuka better than me and know the answer of this one :).
So, to sum up :
state = [X, Y, (Z, ) , Alpha, Gamma, (Beta, ), gripX, gripY, gripAlpha]

(Either Z or Beta is absent)

> **Comments:**
> **username_0**: There's a mistake in the question. The state space for the environment is actually a 9 dimensional vector, in which case, your answer is correct. I ll rectify the typo right away. Thanks for the help!  

---

