-
Notifications
You must be signed in to change notification settings - Fork 480
Conversation
From #391 "Another nice to have would be how to integrate customised gazebo quadcopter models into the code base. Took me a bit to figure that out and I’m still not sure that I’m following best practices."
EDITED: Opened a separate discussion that here: #398 |
en/SUMMARY.md
Outdated
* [AirSim Simulation](simulation/airsim.md) | ||
* [Multi-Vehicle Simulation](simulation/multi-vehicle-simulation.md) | ||
* [HITL Simulation](simulation/hitl.md) | ||
* [Interfacing to ROS](simulation/ros_interface.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TSC21 I would like to move this OUT of simulation and into the ROS section. My reasoning is that even though ROS can be used with a simulator, it can also be used stand alone. The topic name would also change to something like "ROS with Gazebo Simulation". Note that I have updated the Gazebo doc to better link to this ROS doc too.
Does this make sense to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, done in 108d2ce
en/ros/README.md
Outdated
[ROS](http://www.ros.org/) (Robot Operating System) is a general purpose robotics library that can be used with PX4 for offboard control. It uses the [MAVROS](../ros/mavros_installation.md) node to communicate with PX4 via MAVLink. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI This is just because I think a section should properly introduce its content :-).
@TSC21 is MAVROS required to communicate with PX4 in ROS1 ? Can you use some other comms node?
ie My understanding is that it is needed, whether you are going over wifi or via a uart. Also that ROS2 will support both MAVROS and an approach based on RTPS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other bridges, but the current "official" supported bridge between ROS and the MAVLink protocol is MAVROS. We are extending the support for fast-RTPS (using CDR serialization and deserialization) for the ROS1 implementation. There's currently an open project on the MAVROS repo for supporting ROS2 also - even though ROS2 supports RTPS by default, you need some kind of translation from the uORB msg to the common ROS world, and that's what we are working on on MAVROS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I have captured this by adding a note to MAVROS doc about future support for RTPS, and removing the unnecessary clarification here that the communication is "via MAVLink". You can see the fix here: 6fa0b6f
@@ -157,7 +157,7 @@ sudo apt-get install clang-3.5 lldb-3.5 -y | |||
|
|||
### ROS/Gazebo | |||
|
|||
Install the dependencies for [ROS/Gazebo](../ros/README.md)) ("Kinetic"). These include Gazebo7 (at time of writing, the default version that comes with ROS). The instructions come from the ROS Wiki [Ubuntu page](http://wiki.ros.org/kinetic/Installation/Ubuntu). | |||
Install the dependencies for [ROS/Gazebo](../ros/README.md) ("Kinetic"). These include Gazebo7 (at time of writing, the default version that comes with ROS). The instructions come from the ROS Wiki [Ubuntu page](http://wiki.ros.org/kinetic/Installation/Ubuntu). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just fixing a typo - missing closing bracket
en/simulation/gazebo.md
Outdated
@@ -1,6 +1,10 @@ | |||
# Gazebo Simulation | |||
|
|||
[Gazebo](http://gazebosim.org) is a 3D simulation environment for autonomous robots. It supports standalone use (without ROS) or SITL + ROS. | |||
[Gazebo](http://gazebosim.org) is a powerful 3D simulation environment for autonomous robots that is particularly suitable for testing object-avoidance and computer vision. It can also be used for [multi-vehicle simulation](../simulation/multi-vehicle-simulation.md) and is commonly used with [ROS](../simulation/ros_interface.md), a collection of tools for automating vehicle control. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, just a better introduction and also cross linking back to the parent doc for "general simulator info".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a collection of tools for automating vehicle control.
not just that, but I guess it fits the purpose.
en/simulation/gazebo.md
Outdated
|
||
#### ROS Users | ||
Gazebo 8 setup in included in our standard build instructions: | ||
- **macOS:** [Development Environment on Mac](http://localhost:4000/en/setup/dev_env_mac.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TSC21 Does macOS installer also include ROS Kinetic? If so, does it install Gazebo 7 (the default) or Gazebo 8 (preferred).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note also that I've dropped the mention of gazebo 6. We prefer gazebo 8 as standalone and for ROS we use whatever it default to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't actually confirm that since I don't have a Mac...
en/simulation/ros_interface.md
Outdated
|
||
To connect to localhost, use this URL: | ||
## Installing Gazebo for ROS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated instructions to point to our build scripts, which include everything you need with PX4 in one easy script. Also link to the kinetic instructions for people who want to do in manually.
@TSC21 FYI, this will need an update once I know what happens with macOS standard installer. If the standard installer does not include ROS are there manual instructions that we know will work on macOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, can't tell since I never tried to install ROS on a Mac.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries - I'll ask on slack: https://px4.slack.com/archives/C0V533X4N/p1513730251000161
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, so the simple answer is "we don't support it"
|
||
In case you would like to modify the Gazebo simulation to integrate sensors publishing directly to ROS topics e.g. the Gazebo ROS laser plugin, Gazebo must be launched with the appropriate ROS wrappers. | ||
## Launching Gazebo with ROS Wrappers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TSC21 So how I interpret this is that rather than having ROS get rangefinder information from PX4 it can get it from gazebo.
- Does this work with PX4 currently?
- If so, how does the information get to ROS? - we currently have no "path" in our comms directly between ROS and gazebo - they both just talk to PX4.
- If so, where/when is this useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PX4 ROS implementation (which is an active part of SITL) has everything built in to receive and publish data in the ROS framework - but I actually don't know what is happening there cause there seems to be some data handled as ROS msgs, other as Gazebo msgs, while there is data also being handled as Mavlink msgs. @bkueng maybe you can clarify that?
But we also should consider to implement some type of interface with MAVROS (rotors_simulator
has a specific plugin to parse all the Gazebo sim data to ROS topics, but we don't do that - we use gazebo msgs only). Currently, all the data that's sent to an autopilot (being it SITL or other) is parsed first or gazebo_mavlink_interface
or on other plugins and published as gazebo msgs. handled by gazebo_ros, and that can be received on the PX4 ROS implementation.
About an iteration on the MAVROS support (that pretends to also support HIL) - PX4/PX4-SITL_gazebo-classic#131.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bkueng maybe you can clarify that?
Sorry, since I don't use ROS I don't know the internals on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok but then whoever wrote the PX4 ROS implementation can give a hand here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all sounds very inconsistent. It would be useful to understand, but I doubt we'll get a timely answer on this point. OK if I create a separate issue that this section needs update and merge the rest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does require a clarification is how the PX4 ROS implementation is done, what it accepts and how it can be applied generally (if it can be pulled out of the SITL sim environment for example).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I have posted a question #399 for that.
en/SUMMARY.md
Outdated
* [MAVROS \(MAVLink on ROS\)](ros/mavros_installation.md) | ||
* [MAVROS offboard example](ros/mavros_offboard.md) | ||
* [ROS with Gazebo Simulation](simulation/ros_interface.md) | ||
* [Gazebo Octomap](simulation/gazebo_octomap.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TSC21 Any thoughts on "right" location for Gazebo Octomap? In theory it is a generic library that you could use with PX4 for environment mapping/obstacle avoidance - and if it were well integrated for that purpose it would be part of the main px4 concepts.
In practice it is just an interesting tool for experimentation, and the documentation is tied very closely to both Gazebo and ROS. Any thoughts on whether it would be better below Gazebo, where it is below ROS, or some other location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would explicitly put it under ROS, as it is really tide more with ROS than with Gazebo (you can use outside sim).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I've moved it to same level and renamed to "OctoMap 3D Models with ROS" in sidebar and "OctoMap 3D Models with ROS/Gazebo" in the page itself. YOu can see it here: 8b5c8a7
I think we should open an issue to discuss this. It's actually a neat feature that is missing a lot of documentation about (for example, how to dimension the motor models). |
@bkueng @TSC21 Thanks for you advice. As discussed inline I have opened separate issues for the big picture open questions. I would like to merge this as it has fixed the structural issues and incorrect installation instructions I was worried about (the other issues are relatively minor/separate). Can you please review and/or approve for merging. |
This attempt to fix up some glaring holes in the ROS and gazebo docs. Specifically, aging installation instructions, and odd structure.
@TSC21 There are going to be some open questions inline. @bkueng would also appreciate your general comments. Last of all, is everything in these documents up to date - ie my questions are above the things that I saw might be wrong ... but there could be more.