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

Gazebo: add X-UAV Mini Talon V-Tail #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

srmainwaring
Copy link
Collaborator

An X-UAV Mini Talon V-Tail plane

mini-talon-auto2

Usage

Gazebo and the plugins should be installed as per the ArduPilot Gazebo Plugin instructions.

Update the GZ_SIM_RESOURCE_PATH to include these models:

export GZ_SIM_RESOURCE_PATH=$GZ_SIM_RESOURCE_PATH:\
$HOME/SITL_Models/Gazebo/models:\
$HOME/SITL_Models/Gazebo/worlds

Run Gazebo

gz sim -v4 -r vtail_runway.sdf

Run ArduPilot SITL

sim_vehicle.py -v ArduPlane -f JSON --add-param-file=$HOME/SITL_Models/Gazebo/config/mini_talon_vtail.param --console --map

Tasks

  • Confirm original CAD model authors permission for usage.
  • Add ArduPilot livery.

@srmainwaring srmainwaring self-assigned this Jul 6, 2023
@srmainwaring srmainwaring marked this pull request as draft July 6, 2023 00:21
@srmainwaring srmainwaring marked this pull request as ready for review August 30, 2023 22:05
@imamim
Copy link

imamim commented Nov 4, 2023

Hello, thank you for your work. As you shared, I tested the mini-talon model in the Gazebo Garden simulation with my own Dronekit test code. I will explain both the process and the results below:

Setup

  • I used Plane-4.3 Branch of main ArduPilot code. I hope we don't experience any errors because of this. Because with the current version of ArduPilot, I could not connect to the plane with DroneKit. I think there is an error there. (May be later i try with Plane 4.4)

  • Apart from that, I start the simulation and SITL as mentioned above.

  • The test code I wrote is to arm and takeoff to a height of 30 meters. Then do the loiter for 30 seconds. I think there is no problem with the code. I only change TKOFF_ALT parameters of vehicle.

Test

As a result of my testing, I am sharing a few graphics and BIN files as follows:

There is a resultant path:
result_map

Also we can look at TECS Controller and Attitude Controller and L1 controller for Loitering:

Height
Attitude_Control
Speed

Which this seems as Roll Controller and L1 controller give a good performance. But in the TECS controller and Pitch controller cause an oscillation. It cannot be said that the performance of the pitch controller is good either. Additionally, since the height adjustment is not made properly, there is probably an oscillation in the speed output.

You can access the log file from the link below. I think the problem is obvious, but I don't know how to proceed. I'm looking forward to your help :)

Log File

@srmainwaring
Copy link
Collaborator Author

Hi @imamim, thanks for the detailed analysis. The model was put together to help some students looking to simulate a plane for a competition: https://discuss.ardupilot.org/t/v-tail-gazebo-sitl-qgroundcontrol/103198 and so contained the basic model and integration but was not fully tuned.

IIRC the simulated prop thrust may be on the low side, so some of the physics params in the SDF file may need tweaking to address that before the ArduPilot tune is completed.

As there is no airspeed sensor the FCU is using the default TRIM_THROTTLE = 45 in automatic modes which is going to be too low to maintain altitude - this could explain the pitch oscillations you are seeing.

I'll take another look and see if I can get the issues you note resolved and the PR merged.

- Add body link and visual and collision meshes.
- Add wheel link.
- Add wheel link - cleanup.
- Add aileron links.
- Add rudder links.
- Update position controller PIDs.
- Add rudder links - cleanup.
- Position motor and prop.
- Add motor link and thrust controller.
- Rename cockpit frame to forward deck.
- Rename rudder to ruddervator.
- Change control surface limits.
- Add ArduPilot plugin configured for v-tail.
- Add initial ArduPilot param file.
- Add doc.
- Update wheel link orientation and inertial.
- Move mesh origin to geometric centre.
- Update inertial.
- Update motor link inertial.
- Update base link inertial.
- Add cp visuals for main wing.
- Add lift-drag plugin for main wing.
- Switch order of wheel collision and visual elements.
- Update aileron link orientation and inertial.
- Move mesh origin to geometric centre.
- Update inertial and controller PIDs.
- Update motor velocity controller PIDs.
- Update lift-drag plugin for main wing.
- Update lift-drag plugin for v-tail.
- Add visuals for v-tail centre of pressure.
- Move mesh origin to geometric centre.
- Update inertial and controller PIDs.
- Add lift-drag plugins for v-tail and ruddervator.
- Add notes.
- Switch to lift-drag for prop thrust.
- Use motor / pusher inertial from zephyr.
- Increase gains on position controllers.
- Update params autotuning roll and pitch.
- Update doc.

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
Haris-Alsaman

This comment was marked as spam.

@julled
Copy link

julled commented May 8, 2024

@srmainwaring very cool you added this model!
Do you still plan to improve the model parameters to make it more stable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants