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. However, we are pretty sure that you can run it on any version after that. Note that version higher than R2023a, the function
addForceWithOffset
is different from that in previous version. Specifically, whether the pararelative
is setTrue
orFalse
, 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
@misc{qian2023practical,
title={Towards Practical Autonomous Flight Simulation for Flapping Wing Biomimetic Robots with Experimental Validation},
author={Chen Qian and Yongchun Fang and Fan jia and Jifu Yan and Yiming Liang and Tiefeng Li},
year={2023},
eprint={2303.04395},
archivePrefix={arXiv},
primaryClass={cs.RO}
}