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
Multi-UAV launch using single xacro file #19074
Comments
@NishanthARao You can directly connect to the udp ports defined in the mavlink interface: https://github.com/PX4/PX4-SITL_gazebo/blob/2750fe233c6a38dbe60e545ac0ec878d6ac20b1e/models/iris/iris.sdf.jinja#L454 Since urdf does not support the latest SDF syntaxes, we have deprecated xacro from the PX4 tool chain and am now using jinja templates to template the sdf files. You can generate sdf files from urdf files that are generated from xacro files. |
@Jaeyoung-Lim I see. So I need to specify 4 different mavros interfaces in the same sdf file?
|
mavros does not attach to a link, but a communication interface e.g. a UDP port. You can pass the address of the UDP port through fcu_url : https://github.com/mavlink/mavros/blob/b0297e39947a4dd6f60213370c864b9139254b37/mavros/launch/px4.launch#L5
It has four rotors |
@Jaeyoung-Lim I'm sorry if the earlier post isn't clearly described. My thoughts are as follows.
|
Mavros does not have any knowledge whether your vehicle is a simulated vehicle or a real vehicle and is just communicating through the udp port. The information of the sensors are passed through a gazebo transport, using the mavlink interface. For your case, you need to write the sdf file so that each sensors can keep track of each of the submodels, and then your rigid link between them keep attach all the submodels in some form. If you are not sure how to attach gazebo plugins on sdf/urdf files, you can follow tutorials such as https://gazebosim.org/tutorials?tut=ros_gzplugins
The iris model is a quadrotor. Please try running the model. |
Thank you for your guidance on this and your quick response. Further, it is surprising to see that there are 8 rotor channels for a quadrotor which doesn't make any sense. I will get back to this issue once I figure out the UDP port connections. Once again, @Jaeyoung-Lim Thanks a lot for your time and info! |
@Jaeyoung-Lim I have written a single sdf file that contains two iris (in the same .sdf file). How can I proceed to launch this in Gazebo with mavros and PX4 SITL? |
Greetings all.
I have a complex system that consists of 4 UAVs that are attached to a single payload via rigid links. Thus, I have written a SINGLE .xacro file that contains the description of the 4 UAVs with payload and link connections. For your reference, it looks similar to this example. I need to use mavros and QGroundControl to talk to these 4 drones via mavlink.
I saw the multi_uav launch file provided by default, but that launches single UAV files in seperate namespace. This doesn't help in my case, as I have a single .xacro file for all the 4 UAVs. How can I connect the mavros nodes and get mavros topics (in seperate namespaces) for all the 4 drones?
Thanks in advance. I would be grateful for your help and suggestions.
The text was updated successfully, but these errors were encountered: