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

Gazebo Simulation Enablement #20319

Merged
merged 5 commits into from
Sep 29, 2022
Merged

Gazebo Simulation Enablement #20319

merged 5 commits into from
Sep 29, 2022

Conversation

bperseghetti
Copy link
Member

Describe problem solved by this pull request

Allow multiple ways to connect and launch a px4 instance with gazebo simulator.

Describe your solution

Update to use accepted PR in Gazebo.

Test

You can run:

make px4_sitl gz_x500

Preferred:

make px4_sitl

Followed by an example setting the verbosity to 4, type, model to be spawned, and binary:

PX4_GZ_VERBOSE=4 PX4_SYS_AUTOSTART=4001 PX4_GZ_MODEL=x500-Depth ./build/px4_sitl_default/bin/px4

If you spawn inside of gazebo after another PX4 model is already spawned you can connect to it using the new spawned model name by:

PX4_SYS_AUTOSTART=4001 PX4_GZ_MODEL_NAME=<model_name_in_Gazebo> ./build/px4_sitl_default/bin/px4 -i 1

After that you can spawn another model from the px4 binary with pose set allowing full xyzrpy or any subset of it for instance with:

PX4_SYS_AUTOSTART=4001 PX4_GZ_MODEL_POSE="2, 2" PX4_GZ_MODEL=x500 ./build/px4_sitl_default/bin/px4 -i 2

@junwoo091400
Copy link
Contributor

Thanks for introducing this during the call today!

@bperseghetti
Copy link
Member Author

I think this is fully ready for review now and I recommend people trying it out. I will post a video for those that might not want to test it otherwise.

@bperseghetti
Copy link
Member Author

cut.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sim: gazebo classic Gazebo classic simulator Simulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants