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
Add Gazebo model for Swan-K1-HWing #77
Add Gazebo model for Swan-K1-HWing #77
Conversation
@srmainwaring ready to merge? maybe squash the commits? |
@tridge let me take a look - it's been a while. I marked this as draft for some reason and will need to recall why? |
9d40dca
to
2b79b01
Compare
2b79b01
to
8ab3354
Compare
Still an issue with the stability - it appears similar to the problem with the Gazebo model for the Omnicopter. It may be due to the prop modelling - where thrust is generated by treating the rotors as lifting surfaces and applying the lift and drag forces directly to the rotor links. This does cause noise in the joints and that may be more of an issue for certain frame configurations - it is hard to pin down. An alternative approach is to calculate the prop thrust and torque directly and apply this to the motor links. The rotor spinning is then for visualisation only, not for physics. There is a plugin available in the upstream gz-sim7 package that is similar to the original RotorS plugin - will investigate whether applying this results in a flyable model. Tasks
Figure: fully configured model as X-frame with motors canted in towards fuselage and out to wingtips. CoM ahead of main wing centre of pressure and markers for centres of pressure for wingtips and vertical stabiliser lift-drag contributions. |
8ab3354
to
670fc8f
Compare
1. add initial model for base / fuselage 2. add mesh for engine and spinner 3. reorient and recentre fuselage mesh - Orientation should be for normal flight mode (ROS convention x-forward, y-left, z-up) 4. update texture name in motor mesh 5. add ENU axis to runway for orientation 6. add IMU sensor and link 7. fix scaling error in exported fuselage mesh 8. enable IMU link and reorient plane vertically in world 9. add system plugins JointStatePublisher and ApplyJointForce for motors 10. add ardupilot plugin and reassign motor positions to match wiki - Assign servos according to docs for NYT QUAD X Motor Tailsitter - Correct plugin comments 11. add sphere collision for legs - Add sphere collisions for legs to improve performance - mesh collisions need to be replaced. 12. add prop visuals and materials - Add prop materials and visuals - Add PBS material for the fuselage 13. add param file from RF model 14. update prop visuals - Use CCW and CW props visuals as required 15. update param file - Set SERVOX_FUNCTION as for x-frame, quad - Set Q_TAILSIT_MOTMX 4 16. update motor and prop collisions and prop orientation - Temp set prop colours to assist identifying 17. add initial draft of prop lift-drag plugins 18. update motor link and joint poses - Set motor link relative to joint - Position joints and rotate into place - Align motor axis to local +z (simplifies lift-drag plugin config) 19. update inertials - Reduce mass of fuselage and motors 20. update example world name and increase motor joint damping 21. convert motors to NYT QUAD X Motor Tailsitter config - Change lift directions on props for altered config - Add box collision to allow arming in horizontal orientation - Update params (AHRS_ORIENTATION, Q_FRAME_TYPE, Q_TAILSIT_MOTMX) 22. cant motors from vertical by 10 deg - cant motors towards wingtips 23. add lift drag and visual markers for wings and winglets 24. revert frame type back to X-Quad - Motor angle directions are suitable for X-Quad config - Revert to Q_FRAME_TYPE = 1 - Update RC input limits 25. conservative tune VTOL mode - Tune Q_A_RAT_RLL_*, Q_A_RAT_PIT_*, Q_A_RAT_YAW_* - Set I = P = 0.05, D = 0, SMAX = 50 - Disable rudder arm / disarm - Set ARSPD_TYPE = 0 (no airspeed sensor) - Set RC2_REVERSED = 0 (was reversed) 26. update for ignition to gz migration. 27. update the Swan-K1 model - Add vertical stabilisers. - Update the prop PID controller settings - NB: the command limits. - Add RTF control to the world file. 28. update the Swan-K1 params - Auto-tuned VTOL params. - Match settings from AP defaults. 29. Gazebo: Add model for Swan-K1-HWing - Update Swan-K1 params, modify forward flight to VT transition params. - Update Swan-K1 document. - Update Swan-K1 model visuals. - Update Swan-K1 documentation. Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
3329b1f
to
9b78be1
Compare
@tridge - I'll merge this as I've resolved the main issue with the prop model. It's flying with a large AoA in forward flight - which could be resolved by increasing the cruise speed, but I think the real issue is more likely to be short comings in the aerodynamics model. It's operational though, tuned with the Lua VTOL script and running the onboard FFT notch filter - so a nice test ground for a few newer features. |
This draft PR adds a Gazebo model for the Swan-K1-HWing
Figure: Swan-K1 in forward flight. Updated so user content available to reference in model documentation.
Usage
Ignition and the plugins should be installed as per the ardupilot_gazebo wiki instructions.
Run Gazebo