robotlearn / pyrobolearn

PyRoboLearn: a Python framework for Robot Learning
Apache License 2.0
402 stars 62 forks source link

Reaching environment is not showing any change in response to action #54

Closed deepakraina99 closed 3 years ago

deepakraina99 commented 3 years ago

I am testing it using the following code in reaching.py

# Test
if __name__ == "__main__":
    from itertools import count
    import pyrobolearn as prl

    # create simulator
    sim = prl.simulators.Bullet()

    # create environment
    env = ReachingManipulationEnv(sim, control_mode = 'torque')
    action = env.action
    action.data = np.array([1,0,0,20,0,0,0])
    print("\nAction: {}".format(action))
    # run simulation
    for _ in count():
        # print(action)
        env.step(action, sleep_dt=1./240)

Please guide me on what I am missing here. Thanks.

deepakraina99 commented 3 years ago

Basically, all environments in PRL shows no movement when loaded. How the action (joint position change, velocity change, etc.) are being applied in these environments?

lrozo commented 3 years ago

Please check pyrobolearn/examples/enviroments/inverted_pendulum for a full example on how to define and use environments.