Skip to content
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

GazeboDrone project added to connect a gazebo drone to the AirSim drone #3754

Merged
merged 5 commits into from
Jun 7, 2021

Conversation

jonyMarino
Copy link
Collaborator

@jonyMarino jonyMarino commented Jun 1, 2021

Fixes: #2380

About

This CMake project allows connecting a gazebo drone to the AirSim drone, using the gazebo drone as a flight dynamic model (FDM) and AirSim to generate sensor data.

How Has This Been Tested?

Following the added Readme.md
and running PX4 with make px4_sitl gazebo_iris together with QGroundControl.
Airsim using the compiled Blocks binary.

Screenshots (if appropriate):

airsim-gazebo.mp4

@jonyMarino jonyMarino marked this pull request as ready for review June 2, 2021 18:30
Copy link
Contributor

@zimmy87 zimmy87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good other than some minor comments

GazeboDrone/src/main.cpp Outdated Show resolved Hide resolved
GazeboDrone/src/main.cpp Outdated Show resolved Hide resolved
GazeboDrone/src/main.cpp Outdated Show resolved Hide resolved
@zimmy87 zimmy87 merged commit ee61869 into microsoft:master Jun 7, 2021
@nkbeebe
Copy link

nkbeebe commented Jun 9, 2021

Is it feasible to replace the gazebo drone for a fixed wing model, to run the physics behind a plane, but still use AirSim for the data collection?

@jonyMarino
Copy link
Collaborator Author

@nkbeebe. Yes, you can do that. It would be great if someone contributes with an API method to set the rotors' angular velocity. Take a look at this tutorial on how to change the drone mesh: https://youtu.be/Bp86WiLUC80. You need to get the mesh of the vehicle you are trying to simulate. You would help the community a lot if you post a video on youtube on how to run AirSim with FixedWing in the way you decide to do it. Keep me updated please.

@nkbeebe
Copy link

nkbeebe commented Jun 10, 2021

But is that using Gazebo physics of a drone? Akin to simply replacing the Gazebo drone with a plane, but moving the plane as a drone would? My question is more of using the physics engine of a Gazebo plane, alongside the mesh. So the plane moves in the dynamics a Gazebo plane would move - not a gazebo drone would.

@jonyMarino
Copy link
Collaborator Author

Yes, I have understood your question. I'm not 100% sure if it is going to work, I think so. The GazeboDrone project subscribes to the pose updates of the drone and sends them to the AirSim drone through setVehiclePose, so if you use a plane in gazebo and the GazeboDrone project, can subscribe to its pose, then it will work.

@nikitabeebe
Copy link

nikitabeebe commented Jun 13, 2021

Sorry if this is a simple question, but following the readme for this merge, I need to have UE4 running with the original AirSim build using clang, then once that is up along with gazebo, I can use the command ./GazeboDrone to then start that simulation? And for the build step, what directory am I creating a new build directory? I ask because when I run this command, I get a "The source directory "/Users/nikitabeebe/Documents/GitHub/airsim" does not appear to contain CMakeLists.txt."

@jonyMarino
Copy link
Collaborator Author

Hi @nikitabeebe! You are correct about the order.
The build folder goes inside the GazeboDrone folder.

@nikitabeebe
Copy link

Also, does this project require the use of PX4, or can it be run without that program entirely? (Just using QGroundControl for joystick input)

@jonyMarino
Copy link
Collaborator Author

Hi @nikitabeebe! I think QGroundControl only works with PX4. But yes, you should be able to connect to gazebo without PX4 connected to it.

@nikitabeebe
Copy link

Thank you for confirming. That's what I initially thought @jonyMarino. If you could then, can you take a look at an issue request I created, as I am still unable to compile and run this project like you have demonstrated. I've tried to rule out all the issues with versions or missing dependencies, but I keep getting hung up on the make task for building the GazeboDrone...

#3874

Any input or insight into possible fixes would be a life saver!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using gzserver (Gazebo backend) with Airsim
4 participants