Code Monkey home page Code Monkey logo

Comments (7)

gauthamvasan avatar gauthamvasan commented on May 24, 2024 2

I'm a little unclear about the question. Are you trying one of our examples? If not, is that a simulated task?

For all our real-world robot tasks, we do inherit gym.core.Env.
For example, with the UR5 arm,

  • ReacherEnv inherits the gym core env (link)
  • The observation and actions space are defined as gym Box objects (link)

As for registering the env, it's needed only when you'd like to use env = gym.make("custom_env_name"). We did that with our DoubleInvertedPendulumEnv. (link)

I'm assuming that you're trying to use the baselines implementation of DDPG. Let me know if you have any other questions.

from senseact.

hai-h-nguyen avatar hai-h-nguyen commented on May 24, 2024

I have a different robot but I modified the code so that it can work. However, I want to try a different algorithm (DDPG + HER) as it should be faster than TRPO. HER uses gym make env function so I think I can follow your suggestion.

Another question, my code has a problem when running for a number of hours or so. The thread _sensor_handler and actuator_handler stop running after a while (even it was running fine after one hour or so). What might be the possible reasons for that?

from senseact.

hai-h-nguyen avatar hai-h-nguyen commented on May 24, 2024

This is a typical error:

WARNING:root:Agent has over-run its allocated dt, it has been 0.28047633171081543 since the last observation, 0.24047633171081542 more than allowed
Resetting
Reset done
Resetting
Reset done
Resetting
Reset done
Resetting
Reset done
Resetting

It just keeps looping between these. As the commands are not sent to the robot (the actuator_handler thread stops), the robot does not move at all. I also checked that the sensor_handler also stops running.

from senseact.

gauthamvasan avatar gauthamvasan commented on May 24, 2024

Is it possible for you to share some code snippets or elaborate on what you are trying to do?
I have seen such errors when python multi-processing code was setup incorrectly.

from senseact.

hai-h-nguyen avatar hai-h-nguyen commented on May 24, 2024

Thanks! Please look at the code at https://github.com/hhn1n15/SenseAct_Aubo. Basically right now I am trying to replicate your results (using TRPO) with a new robot (Aubo robot). I added new device aubo, created an aubo_reacher (based on ur_reacher). Most of the code stays the same.

from senseact.

armahmood avatar armahmood commented on May 24, 2024

The dt may overrun if expensive learning updates are done sequentially among many other reasons. It is not that bothersome to have it say once in every few minutes. However, if this happens more often, two options can be to compute the update more efficiently using powerful computers or make the learning updates asynchronously using a different process.

Are the handlers stopping even when you are running TRPO or PPO?

I suggest getting it learning first with TRPO or PPO using the example script before moving to HER. Getting effective learning with a new robot is no trivial job and would be glad to see this working!

from senseact.

hai-h-nguyen avatar hai-h-nguyen commented on May 24, 2024

I haven't tried DDPG+HER yet. The two handlers stops even with the original code using TRPO. Actually, the communicator stops making the two threads stop.

from senseact.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.