Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the crazyflie model and simulation #256

Open
xchl19 opened this issue Dec 27, 2024 · 3 comments
Open

Questions about the crazyflie model and simulation #256

xchl19 opened this issue Dec 27, 2024 · 3 comments
Labels
bug Something isn't working question Further information is requested

Comments

@xchl19
Copy link

xchl19 commented Dec 27, 2024

Hello,

Thanks for your great work of developing the quadrotor simulatior.

I have several questions about the crazyflie model and simulation.

  1. When I check the figure of thr drone in paper and official site of bitcraze, I noticed that the order of motors are different (in the reverse order). When checking the _physics() in BaseAviary.py the sign of z_torque is different from paper https://arxiv.org/pdf/1608.05786, I wonder if the rotation direction of motors is different from the official website?

  2. I am not familar with the Euler angles in pybullet. I wonder in this simulator, what is the order of rotations axes, is it intrinsic or extrinsic rotation?

  3. When I use dyn as physics, the drones fell down to underground. Are there bugs in the dynamic?

@JacopoPan JacopoPan added the question Further information is requested label Jan 4, 2025
@JacopoPan
Copy link
Member

Hello @xchl19,

  1. the implementation here is mainly taken by the system identification works mentioned in the URDF files
<carlos url="https://arxiv.org/pdf/1608.05786.pdf" />
<julian url="https://www.research-collection.ethz.ch/handle/20.500.11850/214143" />
<mit url="http://groups.csail.mit.edu/robotics-center/public_papers/Landry15.pdf" />

not Bitcraze documentation directly, if you are using a specific firmware, you could indeed have to remap the inputs as it is done in BetaAviary and CFAviary

remapped_input = np.array([[

def _powerDistribution(self, control_t):

  1. see the "Transforms" section in PyBullet Quick Guide for the rotation order

  2. running which one of the example?

@xchl19
Copy link
Author

xchl19 commented Jan 5, 2025

Thanks a lot for your reply!

About question 3, I changed DEFAULT_PHYSICS = Physics("pyb") in pid.py into DEFAULT_PHYSICS = Physics("dyn").

@JacopoPan JacopoPan added the bug Something isn't working label Jan 5, 2025
@JacopoPan
Copy link
Member

JacopoPan commented Jan 5, 2025

Thanks @xchl19, it seems you are correct and "dyn" is not working as expected
This PR was the most recent change to its implementation but even reverting it does not seem to fix the issue, I'll need to investigate a bit deeper if something about the robot description or bullet has changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants