Aruco Code and UVG/UAV Logic Fixes

This commit is contained in:
2026-02-20 12:19:44 -05:00
parent 50ef3f0490
commit e2f805f3f3
22 changed files with 667 additions and 1143 deletions

View File

@@ -29,6 +29,7 @@
</plugin>
<plugin filename="gz-sim-scene-broadcaster-system"
name="gz::sim::systems::SceneBroadcaster">
<state_hertz>25</state_hertz>
</plugin>
<plugin filename="gz-sim-imu-system"
name="gz::sim::systems::Imu">
@@ -142,81 +143,35 @@
</model>
<!-- ===================== UAV: ArduPilot Iris ===================== -->
<!-- Uses the ArduPilot iris_with_gimbal model which includes:
- ArduPilotPlugin (connects to SITL)
- IMU sensor
- Gimbal with camera
- Rotor dynamics / LiftDrag
-->
<!-- Starts on top of the UGV. Body top z=0.18 + iris legs 0.195 = 0.375 -->
<include>
<uri>model://iris_with_gimbal</uri>
<pose degrees="true">0 0 0.195 0 0 90</pose>
<pose degrees="true">0.0 0.0 0.4 0 0 90</pose>
</include>
<!-- ===================== UGV: Driveable Rover ===================== -->
<!-- Dynamic 4-wheel skid-steer, drone takes off from it, then it drives -->
<include>
<uri>model://custom_ugv</uri>
<name>ugv</name>
<pose>0.0 0.0 0 0 0 0</pose>
</include>
<!-- ===================== UGV: Target Vehicle ===================== -->
<!-- The drone should search for this vehicle and land on it -->
<model name="ugv_target">
<!-- ===================== TARGET ArUco Tag (ID 1) ===================== -->
<!-- On the ground — the UAV searches for this, then UGV drives here -->
<model name="target_tag_1">
<static>true</static>
<pose>5.0 5.0 0 0 0 0</pose>
<!-- Main body (blue box) -->
<link name="base_link">
<pose>0 0 0.2 0 0 0</pose>
<visual name="body">
<geometry><box><size>1.0 0.7 0.3</size></box></geometry>
<material>
<ambient>0.2 0.2 0.7 1</ambient>
<diffuse>0.2 0.2 0.8 1</diffuse>
</material>
</visual>
<collision name="body_collision">
<geometry><box><size>1.0 0.7 0.3</size></box></geometry>
</collision>
</link>
<!-- ArUco landing tag on top -->
<link name="aruco_tag">
<pose>0 0 0.36 0 0 0</pose>
<visual name="aruco_visual">
<geometry><box><size>0.5 0.5 0.005</size></box></geometry>
<pose>8 -6 0.005 0 0 0</pose>
<link name="link">
<visual name="v">
<geometry><box><size>0.5 0.5 0.01</size></box></geometry>
<material>
<ambient>1 1 1 1</ambient>
<diffuse>1 1 1 1</diffuse>
<pbr>
<metal>
<albedo_map>tags/land_tag.png</albedo_map>
</metal>
</pbr>
<pbr><metal><albedo_map>tags/aruco_DICT_4X4_50_1.png</albedo_map></metal></pbr>
</material>
</visual>
</link>
<!-- Wheels (visual only since static) -->
<link name="wheel_fl">
<pose>0.35 0.38 0.1 1.5708 0 0</pose>
<visual name="v"><geometry><cylinder><radius>0.1</radius><length>0.06</length></cylinder></geometry>
<material><ambient>0.15 0.15 0.15 1</ambient><diffuse>0.15 0.15 0.15 1</diffuse></material>
</visual>
</link>
<link name="wheel_fr">
<pose>0.35 -0.38 0.1 1.5708 0 0</pose>
<visual name="v"><geometry><cylinder><radius>0.1</radius><length>0.06</length></cylinder></geometry>
<material><ambient>0.15 0.15 0.15 1</ambient><diffuse>0.15 0.15 0.15 1</diffuse></material>
</visual>
</link>
<link name="wheel_rl">
<pose>-0.35 0.38 0.1 1.5708 0 0</pose>
<visual name="v"><geometry><cylinder><radius>0.1</radius><length>0.06</length></cylinder></geometry>
<material><ambient>0.15 0.15 0.15 1</ambient><diffuse>0.15 0.15 0.15 1</diffuse></material>
</visual>
</link>
<link name="wheel_rr">
<pose>-0.35 -0.38 0.1 1.5708 0 0</pose>
<visual name="v"><geometry><cylinder><radius>0.1</radius><length>0.06</length></cylinder></geometry>
<material><ambient>0.15 0.15 0.15 1</ambient><diffuse>0.15 0.15 0.15 1</diffuse></material>
</visual>
</link>
</model>
<!-- ===================== VISUAL MARKERS ===================== -->