-
Notifications
You must be signed in to change notification settings - Fork 804
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
multiple autopilots in one SITL gazebo #59
Comments
Is there an example of how to get this running properly? In my case I have a mavros_node and px4 executable running for each model. What I'm seeing is the Gazebo models flying around erratically when one of them is given a takeoff command. I'm guessing this is due to both Gazebo models using the same PX4 node. I've been trying to set up the UDP ports for each model / mavros / PX4 appropriately, but I'm not having much luck. Any ideas or working examples? Thanks. |
Wrote a swarm simulator using PX4 that runs pong a while ago. We had a basic simulator that worked with Rviz. tfoote made a PR to get multiple PX4 gazebo simulators in it: 3drobotics/swarm#1. More info http://diydrones.com/profiles/blogs/swarming-with-solos-and-ros. The hack we used to make multiple simulators work was by running multiple instances of the PX4 simulator and manually assigning different ports to each copter, the launch file ran a script that passed in the custom port into another launch file so the process could be dynamic. Let me know if you have any other questions, hopefully that repo can be a useful starting point. |
There is this file: https://github.com/PX4/Firmware/blob/master/Tools/sitl_multiple_run.sh Not sure where the docs are, or if and how it works. |
@mickey13 how to add another autopilots on one SITL gazebo. |
@cynthiamoon You might need to make a copy of px4_firmware/posix-configs/SITL/init/model for each of your models and set the UDP ports manually for each model that you have in the simulation. Not sure what particular issue you're seeing at the moment, but this was a hurdle for me. |
@mickey13 Can you implement multi - aircraft control on gazebo? |
@cynthiamoon see https://github.com/osrf/uctf where we're simulating many vehicles with one gazebo instance. Each drone gets it's own plugin with specific ports, and the ardupilot connects to the plugin via udp. |
@tfoote can I run this project use ROS indigo and Gazebo6 ? |
Early versions were tested on gazebo7. There are some changes in gazebo8 that make it much easier. In it's current state I wouldn't suggest trying to use it on older versions of gazebo. But we plan to turn it into a pure plugin which might be backportable in the future. |
@tfoote I read the tutorial. https://github.com/osrf/uctf/blob/master/doc/install_binary/readme.md |
@cynthiamoon That means you either have not added the package to your path or you're not on xenial. For the binary installs we only support xenial. |
Does anyone have success?? thanks. |
Here is a PR, in PX4 repo, that solves this issue, |
Solved in PX4/PX4-Autopilot#7235. Check devguide docs also on how to proceed. |
@tfoote I run as the readme.md in uctf. But when I type "/opt/sasc/bin/fti_env.sh fti.py -d enp0s25 -z". The terminal shows "WARNING: With great power comes great responsibility! |
@YCH188 if this is specific to the uctf repo you should probably open a ticket there. 'enp0s25' is the default ethernet device on our testing machine. You'll need to modify that to reference your network device. |
.i want to run multiple autopilots in one SITL gazebo.i know different physical objects in Gazebo must have different names.i don't know how to add another autopilots on one SITL gazebo.
i use Px4 firmware.
The text was updated successfully, but these errors were encountered: