Comments (2)
@tsampazk thank you for suggestion, that definitely makes much more sense! I will take further updates into account too, and hope to see them soon)
from deepbots.
Hello, thank you for your kind words! :)
The communication scheme used in Webots, means that for every simulation step a message is broadcasted and a message is received when using one robot and one supervisor. Calling handle_receiver()
again during the same step (1st call in regular get_observations()
from step()
, 2nd call - your call - inside get_reward()
) it returns None
because it already consumed the message broadcasted by the robot and there are no new messages.
I would suggest using an extra parameter in the class e.g. self.observations
, where you save the latest observation received (this can be done inside get_observations()
) and can then use it freely inside get_reward()
or is_done()
.
You can see this in action in the tutorial with the self.messageReceived
variable and as far as i can tell it is exactly the same use-case as yours. Notice that wherever it is used (e.g. in is_done()
) it is enclosed in if not None
blocks.
Also note that in the near future we will add a RobotSupervisor
class that forgoes all the emitter-receiver stuff and runs RL on a single controller. See here.
from deepbots.
Related Issues (20)
- Create documentation site
- Modify Docker
- get_timestep deprecation warning in supervisor_emitter_receiver
- Is it possible to run several simulations in parallel? HOT 1
- RobotEmitterReceiver class should inherit from Webots Robot class
- doubt about the implement of the emitter-receiver scheme HOT 9
- Usage of snake_case
- A bug of robot never moving HOT 1
- CSV handle_emitter data types
- Error in gym setup command: 'extras_require' HOT 5
- Migrating to gymnasium
- Unable to install deepbots HOT 2
- Gym Environment and using stable baselines HOT 2
- Request for Assistance with Sim2Real Transformation Using Emitter Receiver in DeepBots HOT 4
- There seems to be a bug in the step function of the robot_supervisor.py HOT 1
- Extend deepbots to support stable-baselines and implement gym-style default enviroments HOT 3
- Extend deepbots to support Evolutionary Algorithms HOT 14
- Question: how to get kinect camera information HOT 7
- [Tracker] Extension to Evolutionary Algorithms
- How to use ray to train in deepbots environment. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepbots.