Closed srmainwaring closed 2 years ago
I tried to switch 3rd vehicle from alti to iris, and the iris model doesn't connect to mavproxy. How to debug / resolve?
I tried to switch 3rd vehicle from alti to iris, and the iris model doesn't connect to mavproxy. How to debug / resolve?
Hi @JohnVorwald, it's customary not to add help requests to closed issues and PRs. The best place to ask for help is ArduPilot Discourse. Can you open a request there, provide details of your environment and what you are trying to do. The more information (details of commands, code changes), the more likely it is someone will be able to reproduce and help.
Good morning, @srmainwaring . I described the error here: https://discuss.ardupilot.org/t/combine-two-working-models-for-gz-sim/111313/3
This draft PR provides an example for simulating a quadplane landing on the back of a truck semi-trailer unit.
It has a dependency on https://github.com/ArduPilot/SITL_Models/pull/61 which is cherry-picked into this PR. When #61 has been merged this PR can be rebased and moved to review.
https://user-images.githubusercontent.com/24916364/151050925-e33c7441-7e68-430f-9622-8ddd8b7f61f3.mov
Usage
You must run the SITL launch script before starting Ignition Gazebo as it generates the world file for the simulation.
Run ArduPilot SITL
Change to the root directory where ArduPilot is installed (
$ARDUPILOT_HOME
), then run the launch script:This will create a number of directories under the ardupilot root directory. There is a directory for each vehicle that contains the
eeprom.bin
for each SITL instance, additional parameter files for configuring theSYSID_THISMAV
and follow mode. For the tractor unit there is also a scripts directory containing the custom mixer.The
worlds
directory contains a generated SDF world file that configures each model to have the correct ports and assembles the tractor - trailer units from their component parts.Run Gazebo
Run MAVProxy
In another terminal run the
MAVProxy
launch script supplying as an argument the number of vehicles being simulated:Enable position forwarding:
Controlling the vehicles
There are 3 vehicles:
vehicle 1
is the truck tractor unit. This can be set to follow a mission in auto mode.vehicle 2
is the truck trailer unit. It is configured as a rover, but does not respond to commands and exists to publish the position of the trailer CoM which will generally have a different pose (position + yaw) and twist (angular and linear velocity) to the tractor unit.vehicle 3
is the quadplane which is initially situated on the trailer unit just behind the CoM.Notes
The truck is speed limited to 5 m/s in AUTO mode by overriding
WP_SPEED
in the launch script.The quadplane model is now an Alti Transition QuadPlane
The MAVProxy wiki contains more information about using SITL with multiple vehicles: