This is a flapping wing simulation code.
It is runned on webots.
It includes translational lift, translation drag, rotational lift and added mass 4 kinds of aerodynamic forces.
It is robotic application oriented.
And this branch is for trajectory tracking.
Blade element is coded into file such like SimpleFlapper0Tail_H20BLE_X_pos.npy, which can be generated by https://github.com/Chainplain/BladeEleBuilder
You can use following steps to test your own algorithm:
-
Download webots https://cyberbotics.com/, the version we use is R2021a https://github.com/cyberbotics/webots/releases/tag/R2021a. However, we are pretty sure that you can run it on any version after that. Note that version higher than R2023a, the function
addForceWithOffsetis different from that in previous version. Specifically, whether the pararelativeis setTrueorFalse, the force is resolved in the rigid body frame. I have no idea, it is a bug or somthing "property". This version simulation is supposed to be resolved in the world frame, such that the force adding part should be refractured when using 2023a or higher version. -
Load the worldfile, which is already marked.
-
Choose the controller of the robot called the Flapper as SimpleFlapGamma_SensorFusion, which is also provided here. This is the controller file, you can rewrite the corresponding classes which are given in other files. Note that the controller python function name should be the same as the container folder.
-
If everything is fine, using the following world file: https://github.com/Chainplain/FlappingwingSimu/blob/version2.0/SimpleFlapFirstMaster_Test_Position_Trajecory_Tracking%20.wbt it can be runned right away.
- webots https://github.com/cyberbotics/webots
- numpy
- scipy
- random
- linecache
please cite as
@article{qian2024toward,
title={Toward Practical Autonomous Flight Simulation for Flapping Wing Biomimetic Robots With Experimental Validation},
author={Qian, Chen and Fang, Yongchun and Jia, Fan and Yan, Jifu and Liang, Yiming and Li, Tiefeng},
journal={IEEE Transactions on Automation Science and Engineering},
year={2024},
publisher={IEEE}
}


