-
Notifications
You must be signed in to change notification settings - Fork 480
Conversation
@lamping7 Thank you for this. I'll add comments here. As a reader knowing very little about ROS and gazebo I found this confusing - all these questions occurred to me/I could not answer from the update:
What I "guess":
So to use this the steps would be exactly the same except you must install xmlstarlet and step 3 would instead be:
Right? Might be helpful to duplicate the section that starts "The launch file multi_uav_mavros_sitl.launchdoes the following," with the new launch file? You could then explain exactly how it works and how you extend it to have more items. Sorry if I am being dim. |
Those are good points/questions. Let me try to cover them briefly and we can continue to discuss what I'm missing here.
This is described by Gazebo. Basically, URDF is standard for ROS and SDF was created to overcome the limitations of URDF in being able to describe additional features for the simulation and robots. We already link to this page that describes this. http://gazebosim.org/tutorials/?tut=ros_urdf There's also this one if you think we should include it http://sdformat.org/ I'm not inclined to repeat this info. I'd rather let the sources explain it.
You got it. I can point out this little difference if you think we should. The result is 3 vehicles, just like the other launch file (multi_uav_mavros_sitl.launch). So, I'm not sure if a whole "does the following" is worth doing as it will be mostly a repeat.
This doesn't really deal with this, but PX4 doesn't support different vehicles at once. It really isn't setup for multi-vehicle as is with the current structure how run-time data is setup. PX4/PX4-Autopilot#9046 I did this as a hack to fix this for my use lamping7/Firmware@15325ff
The same exact way it's done for the for the other one. Additionally, TCP not UDP and the startup structure changed a bit not too long ago so you don't need make rCS copies as it can dynamically setup the ports there. |
HI @lamping7 Thanks for that. I think I'm getting my head around this a bit better. A simpler set of questions:
Why would you use this approach rather than the xacro approach? From what you've said you can't do multiple different vehicle types as a PX4 benefit so it isn't that. Looking at this, the main difference would be ease of extending. IN the old way you needed to take copy of an existing iris rcS startup file but in the new version you don't need to. Also now you don't need to specify port numbers in the model, which seems a cleaner model interface. So to update this I would answer the above question, and show exactly how this is launched:
I'm not completely convinced that extending to another vehicle is exactly the same as for the other approach. After all, you've already said you don'tneed the step "create a startup file, and change the file as follows:" So perhaps I'd explicitly state that. |
I understand what you're saying. Perhaps a larger rewrite and structure changes would explain all of this better as the current version has some outdated info that confuse this more. The simple answer to your why is: sitl_gazebo, and by extension px4, only offer one xacro model. People often what to use the sdf ones (which there are many) and this new launch file let's them do that the same way the existing one did. I'll work on a larger change to this page. |
We can go in circles here forever - what is the benefit of having multiple SDF files as opposed to a sincle xacro? I'm guessing that this allows you to do something that having just one Xacro file does not. Or it could be that it is just a better abstraction of a vehicle ... or whatever. Note that it is perfectly possible that there is no real benefit - people just "prefer" to do it this way. If that is the case we could just say that.
That would be good. The structure of the current page works for me, but if it is not accurate then it does not form a good foundation for this addition. |
PS, sorry to be so picky. It is just that I see my job as being that of a newbie coming to the doc. If I don't understand the point, then no one will. |
I don't mind. And I don't know. All I know is that we have sdf models and people wanted to simulate multiple of them and this allows you to do that. |
In that case, we just say that. For this section we can do something like the text below (what do you think?). Note this still has a TBD for extending the model, and I still think it would be great if you could fix any errors in the current method text first). Multiple Vehicles using SDF ModelsDevelopers can alternatively simulate multiple vehicles using vehicle models defined in Gazebp SDF files (instead of using models defined in the ROS Xacro file, as discussed in the rest of this topic). The steps are:
This method is similar to using the xacro except that the SITL/Gazebo port number is automatically inserted by xmstarlet for each spawned vehicle, and does not need to be specified in the SDF file. To add a new vehicle, simply ... (TBD!) |
Did suggestion above for docs make sense? #825 (comment) The only bit that would then need to be added would be explanation of how to add a new vehicle. I'd still like fixes to the rest of the doc, but I think with this structure perhaps this could go in and the other fixes could be done separately? Will be led by you! |
49425e9
to
17efe76
Compare
17efe76
to
19c313e
Compare
Have at look at the most recent commit @hamishwillee |
Thank you @lamping7 - much appreciated, as usual! I will do some tidy up of the markdown as a post process now I have merged. My assumption is that you will, at your convenience, do further updates to tidy errors you know about in the rest of the doc :-) |
Thank you soooo much for this PR @lamping7 !! :))) |
Added some words on PX4/PX4-Autopilot#12306 for #823. @hamishwillee fell free to send me a note on slack. I'm sure more info here could be helpful, but It will be easier to know what else to include after you prompt me with questions.