Comments (10)
Hi Harish, Two things, (1) Do you have the PID example working? and (2) Can you post a minimum working example I can test? That error signifies there is something wrong with the network connection between the python interface and the Gazebo plugin. More specifically it means it didn't receive the entire command. Also if you are only giving it a single command you may not notice it moving. Each step is only 0.001 seconds. Try putting it in a loop.
from gymfc.
The PID example is running and when I added the env.render() command in the PID scripts then I was getting proper result. I got the error when I was running in the python command line after importing gym and gymfc. These are the following commands I gave:
import gymfc
import gym
env=gym.make(' model name')
env.render()
action=np.array([0.2,0.2,0.3,0.3])
env.step(action)
Hope you can find out the problem with this information.
from gymfc.
Try adding a delay of a couple of seconds after the render command .
from gymfc.
@wil3 sorry for the silly question it worked fined when I ran it in loop.
Is there a way to remove the ball joint of drone and world so that I can get the translational motion and also the feedback of its translations speeds.
Thank you
from gymfc.
@Kuppharish Glad you got it working. Looking at your example make sure in the future you call env.reset()
before taking any steps. This clears some bookkeeping variables, resets the simulator and samples a new target.
As for your second question, the FDMPacket does include linear velocity and position information, https://github.com/wil3/gymfc/blob/master/gymfc/envs/gazebo_env.py#L49 so you can access this through the observation variable in GazeboEnv. To remove the ball joint you need to create a new world file. Gazebo world and model files are in SDF format, you can find more information about them here, http://sdformat.org/spec. I don't plan on implementing this unless my research brings me in that direction but if you get it working submit a pull request would be a cool addition. Good luck!
from gymfc.
Same issue Could u please help me how you solve that issu eMy code is
import os
import time
os.environ["OPENAI_LOG_FORMAT"] = "stdout,log,csv,tensorboard"
os.environ["OPENAI_LOGDIR"] = os.path.join(os.path.dirname(file), "../tensorboard")
import gym
import gymfc
from baselines import run
env_id ='AttFC_GyroErr-MotorVel_M4_Ep-v0'
env = gym.make(env_id)
while True:
env.reset
env.render()
run.main()
gym fc environment is stucked and not showing anything just quadcopter is In standby position
@wil3 sorry for the silly question it worked fined when I ran it in loop.
Is there a way to remove the ball joint of drone and world so that I can get the translational motion and also the feedback of its translations speeds.
Thank you
from gymfc.
gym fc environment is stucked and not showing anything just quadcopter is In standby position
Of course it is, that's what you are telling it to do, reset then render. When pasting code in github make sure to use syntax highlighting otherwise the format will be messed up. Then use the 'Preview' to make sure it looks the way you want.
from gymfc.
The PID example is running and when I added the env.render() command in the PID scripts then I was getting proper result. I got the error when I was running in the python command line after importing gym and gymfc. These are the following commands I gave:
import gymfc
import gym
env=gym.make(' model name')
env.render()
action=np.array([0.2,0.2,0.3,0.3])
env.step(action)Hope you can find out the problem with this information.
gym fc environment is stucked and not showing anything just quadcopter is In standby position
Of course it is, that's what you are telling it to do, reset then render. When pasting code in github make sure to use syntax highlighting otherwise the format will be messed up. Then use the 'Preview' to make sure it looks the way you want.
i get that but what about The issur i have mentioned quadcopter is not showing any action ???
from gymfc.
Actually the quad-copter is stuck in the space.It is not showing any action/maneuvers.I've been using following
import os
import time
os.environ["OPENAI_LOG_FORMAT"] = "stdout,log,csv,tensorboard"
os.environ["OPENAI_LOGDIR"] = os.path.join(os.path.dirname(__file__), "../tensorboard")
import gym
import gymfc
from baselines import run
env_id ='AttFC_GyroErr-MotorVel_M4_Ep-v0'
env = gym.make(env_id)
env.render()
run.main()
from gymfc.
Each time step is 0.001 seconds. You aren't going to visually see any change after doing a single step. Think of step
as the simulation clock, the simulation is only going to progress as you call this function. It's much more helpful to be logging your actions and rates and then producing graphs to verify behavior.
Actually the quad-copter is stuck in the space.It is not showing any action/maneuvers.
Just like your initial post it is doing exactly as you programmed, create and then render the environment. I'm not sure why you expect an action to occur without calling step. I suggest reading the tech report if you haven't already, review the PID controller code , the Gazebo plugin if you are still confused.
from gymfc.
Related Issues (20)
- Ask for help: Attitude controller instead of angle_rate controller HOT 1
- Bug: there are some bugs in continous.py HOT 1
- error: Failed to compile Gazebo plugin HOT 6
- Failing to run the simulation HOT 1
- Failed to launch quadcopter HOT 2
- Aircraft SDF file at location examples doesnot exist.
- Failing to train without internet connection. HOT 1
- the empty world model HOT 1
- libcurl: (6) Could not resolve host: fuel.ignitionrobotics.org HOT 3
- Feature Request: migrate from gym to gymnasium HOT 1
- terminate called after throwing an instance of 'sad::runtime_error' HOT 1
- How does neuroflight deal with gravity? HOT 1
- PID tunning for pid_example. HOT 4
- iPython HOT 4
- AWS-robomaker compatibility HOT 2
- Gymfc v0.1.0 HOT 1
- Motor output usage larger than simulation HOT 1
- Protobuf exception when running tests/test_step_sim.py HOT 2
- help with running pid example HOT 4
- the ppo_baselines train problem HOT 10
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 gymfc.