Giter Club home page Giter Club logo

phoenix-drone-simulation's People

Contributors

svengronauer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

phoenix-drone-simulation's Issues

Testing under real drone

I really want to try this out, with a simple task, with a real crazyflie drone, have you any suggestion on how should i do it?

Cannot run DroneHoverSimpleEnv due to missing urdf files

Hi! I am trying to run the demos, but unfortunately encountered some problems.

When I ran python -m phoenix_drone_simulation.train --alg ppo --env DroneHoverBulletEnv-v0, everything looked fine and I got a policy checkpoint (though it did not behave as I expected). However, when I ran python -m phoenix_drone_simulation.train --alg ppo --env DroneHoverSimpleEnv-v0 or python examples/transfer_learning_drone_hover.py, I got the following error. What might be wrong in my settings?

b3Warning[examples/Importers/ImportURDFDemo/UrdfFindMeshFile.h,102]:
/home/usr/phoenix-drone-simulation/phoenix_drone_simulation/envs/assets/cf21x_sys_eq.urdf:29: cannot find './cf2.dae' in any directory in urdf path
b3Error[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,121]:
Could not parse visual element for Link:b3Error[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,121]:
base_linkb3Error[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,121]:
failed to parse linkTraceback (most recent call last):
  File "/home/usr/phoenix-drone-simulation/examples/transfer_learning_drone_hover.py", line 55, in <module>
    main()
  File "/home/usr/phoenix-drone-simulation/examples/transfer_learning_drone_hover.py", line 15, in main
    env_source = gym.make("DroneHoverSimpleEnv-v0")
  File "/home/usr/anaconda3/lib/python3.9/site-packages/gym/envs/registration.py", line 200, in make
    return registry.make(id, **kwargs)
  File "/home/usr/anaconda3/lib/python3.9/site-packages/gym/envs/registration.py", line 105, in make
    env = spec.make(**kwargs)
  File "/home/usr/anaconda3/lib/python3.9/site-packages/gym/envs/registration.py", line 75, in make
    env = cls(**_kwargs)
  File "/home/usr/phoenix-drone-simulation/phoenix_drone_simulation/envs/hover.py", line 258, in __init__
    super(DroneHoverSimpleEnv, self).__init__(
  File "/home/usr/phoenix-drone-simulation/phoenix_drone_simulation/envs/hover.py", line 49, in __init__
    super(DroneHoverBaseEnv, self).__init__(
  File "/home/usr/phoenix-drone-simulation/phoenix_drone_simulation/envs/base.py", line 123, in __init__
    self._setup_simulation(physics=physics)
  File "/home/usr/phoenix-drone-simulation/phoenix_drone_simulation/envs/base.py", line 213, in _setup_simulation
    self.drone = CrazyFlieSimpleAgent(bc=self.bc, **self.agent_params)
  File "/home/usr/phoenix-drone-simulation/phoenix_drone_simulation/envs/agents.py", line 486, in __init__
    super(CrazyFlieSimpleAgent, self).__init__(
  File "/home/usr/phoenix-drone-simulation/phoenix_drone_simulation/envs/agents.py", line 129, in __init__
    super(CrazyFlieAgent, self).__init__(
  File "/home/usr/phoenix-drone-simulation/phoenix_drone_simulation/envs/agents.py", line 68, in __init__
    self.body_unique_id = self.load_assets()
  File "/home/usr/phoenix-drone-simulation/phoenix_drone_simulation/envs/agents.py", line 367, in load_assets
    body_unique_id = self.bc.loadURDF(
pybullet.error: Cannot load URDF file.

Also, I would like to try other control modes as well. Can I set the control mode through command line argument? Or, which part of code should I modify to change it from 'PWM' to, say, 'AttitudeRate'?

Looking forward to your reply. Thanks a lot!

GPU usage

Hi thanks for the amazing codebase. I am wondering does the code use gpu during training? I did not find anything relevant on setting the device for training in the code.

PWM & observation frequency

Hi @SvenGronauer

Thank you a lot for contributing to this repo, it is really useful!

I have a question about how the frequency of PWM and observation (100hz) is determined. Is it a built-in speed of Pybullet, or it would get affected by the computer hardware speed? I also saw for the env step loop, there is something like time.sleep(0.05), time.sleep(1/60). why do we need time.sleep()? will it change the 100hz frequency?

Look forward to your reply!

Best,
Xubo

Understanding the noisy observation computation

Hi Sven,

Yet another question appeared. In the reference code below, we differentiate whether we are at 100Hz or 200Hz since the simulator runs at 200Hz while the observation frequency is only 100 Hz. But why is the low-pass filtering of the gyro (line 168) outside the if-else? The comment says that the filter is applied only with 100Hz, but right now, it is always executed.

https://github.com/SvenGronauer/phoenix-drone-simulation/blob/b43e8881f8a253b1984f97924d0fcd59311573c2/phoenix_drone_simulation/envs/circle.py#L139C1-L170C55

Or do I have a misunderstanding here?

Thanks and best wishes,
Martin

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.