Closed Ryanf55 closed 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, 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.
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
colcon
gz sim iris_viewer.sdf
, click run. There's a little black box, which is the "vehicle", which is a NavSat sensor and NavSat-named box entity. The NavSat sensor will fall due to gravity. No worries!ros2 run ardupilot_gazebo_sitl_viewer SitlViewerNode
gz topic -e -t /navsat
, which is updated by the ArduPilot FDMIssue
Relates to #90