ArduPilot / ardupilot_gazebo

Plugins and models for vehicle simulation in Gazebo Sim with ArduPilot SITL controllers
GNU Lesser General Public License v3.0
81 stars 76 forks source link

Add sitl viewer to use ArduPilot FDM #91

Closed Ryanf55 closed 4 months ago

Ryanf55 commented 4 months ago

Purpose

Add a basic program to show how to update the gazebo UI through the protobuf interface with data from ROS.

Looking for feedback. I kept it as a separate package because it depends on rclcpp and the gazebo transport.

This allows you to use gazebo to show the Ardupilot SITL FDM state, but add other things in gazebo. It's useful if you don't want to write all your own physics in gazebo and don't care much about accurate flight dynamics.

I took the protobuf approach because I didn't want to write a plugin. A plugin seems like overkill.

Run Instructions

Issue

Relates to #90

srmainwaring commented 4 months ago

@Ryanf55, this adds a build dependency on ROS, and this repo is intentionally ROS independent. Perhaps we could move the feature to the ardupilot_gz repo?

Ryanf55 commented 4 months ago

@Ryanf55, this adds a build dependency on ROS, and this repo is intentionally ROS independent. Perhaps we could move the feature to the ardupilot_gz repo?

Done! I wasn't sure if the design intent here was to have the repo independent, or just the package independent. The reason I PR'd it here was the high level purpose of each package is connecting gazebo and ArduPilot through some transport was the same, but you could skip ROS by using CMake directly in ardupilot_gazebo, or with --packages-up-to.

Please take a look at the linked PR in ardupilot_gazebo now. I'll close this.