Comments (4)
Hello @ahforoughi, thank you for bringing this issue to our attention!
The tutorial targets the newest version of deepbots that is currently not released and changes in that version cause this issue.
I will add a notice in the tutorial until the new release.
For now you can install the dev version of deepbots from here with the following command:
pip install -i https://test.pypi.org/simple/ deepbots
Note that the version is in development and some features such as the wrappers are not functioning properly.
Otherwise, you can make the following changes in your __init__
method to fix the problem using the current deepbots release,
i marked the changed lines in the comments:
self.robot = self.supervisor.getSelf() # Fix
self.positionSensor = self.supervisor.getDevice("polePosSensor") # Fix
self.positionSensor.enable(self.timestep)
self.poleEndpoint = self.supervisor.getFromDef("POLE_ENDPOINT") # Fix
self.wheels = []
for wheelName in ['wheel1', 'wheel2', 'wheel3', 'wheel4']:
wheel = self.supervisor.getDevice(wheelName) # Fix
Let me know if it works for you and feel free to ask any additional questions! 😄
from deepbots-tutorials.
Hi,after I use your way to fix the problem,there is still a problem
Traceback (most recent call last): File "robotSupervisorController.py", line 96, in <module> env = CartpoleRobot() File "robotSupervisorController.py", line 23, in __init__ self.positionSensor.enable(self.timestep) AttributeError: 'NoneType' object has no attribute 'enable'
from deepbots-tutorials.
What's the name of your poleEndpont
? The name defined in simulator for the endpoint should be the same as in your code
self.poleEndpoint = self.supervisor.getFromDef("<name>")
from deepbots-tutorials.
What's the name of your
poleEndpont
? The name defined in simulator for the endpoint should be the same as in your code
self.poleEndpoint = self.supervisor.getFromDef("<name>")
Hi, I've fix the problem, in my environment, the getDevice
did not work properly. Finally, I found that change the self.positionSensor = self.getDevice('polePosSensor')
into self.positionSensor = self.getPositionSensor('polePosSensor')
and wheel = self.getDevice(wheelName)
into wheel = self.getMotor(wheelName)
.
My environment is Ubuntu 18.04
,Python 3.7.10
, Webots R2021a
.
from deepbots-tutorials.
Related Issues (20)
- Rename old cartpole tutorial and README
- AttributeError: 'CartpoleRobot' object has no attribute 'getSelf' HOT 1
- Ask for help to solve the problem of increasing memory. This part of the code has only been modified a little, and the memory will keep increasing during the training process. HOT 2
- Multi robot setting HOT 1
- Emitter-Receiver scheme not working HOT 7
- Update the tutorials according to latest release
- Comments on the robotSupervisorSchemeTutorial HOT 8
- NotImplementedError get_info ; 0.1.3 dev2; tutorial HOT 3
- A small detail HOT 4
- Unable to run the last step of the tutorial in Webots R2022b. HOT 3
- Usage of snake_case HOT 1
- The robots doesn't move during iteration HOT 2
- The problem about the loss function of actor network HOT 3
- A doubt for behaviors that the agent finally converged HOT 1
- poleEndPoint.getVelocity returns six NAN HOT 7
- Link for cartpole_robot_definition.txt is not working HOT 2
- A question about the method "self.robot.getPosition()" HOT 3
- Using stable_baselines3 leads to the following error HOT 2
- Short save/load model functionality tutorial
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-tutorials.