-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add world with moving platform (#83)
New world moving_platform to simulate takeoff/landing on moving vehicle. Depends on MovingPlatformController plugin introduced in PX4/PX4-Autopilot#24471. Launch using: PX4_GZ_MODEL_POSE=0,0,2.2,0,0,0 PX4_GZ_WORLD=moving_platform make px4_sitl gz_standard_vtol
- Loading branch information
Showing
4 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sdf_parsing/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<model> | ||
<sdf version="1.9">model.sdf</sdf> | ||
</model> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<sdf version="1.9"> | ||
<model name="flat_platform"> | ||
<link name="platform_link"> | ||
<visual name="platform_visual"> | ||
<geometry> | ||
<box> | ||
<size>5 5 0.1</size> | ||
</box> | ||
</geometry> | ||
<material> | ||
<ambient>0.3 0.3 0.3 1</ambient> | ||
<diffuse>0.3 0.3 0.3 1</diffuse> | ||
<specular>0.1 0.1 0.1 1</specular> | ||
</material> | ||
</visual> | ||
<collision name="platform_collision"> | ||
<geometry> | ||
<box> | ||
<size>5 5 0.1</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<pose>0 0 2 0 0 0</pose> | ||
<inertial> | ||
<mass>10000</mass> | ||
<inertia> | ||
<ixx>10000</ixx> | ||
<iyy>10000</iyy> | ||
<izz>10000</izz> | ||
</inertia> | ||
</inertial> | ||
<sensor name="navsat_sensor" type="navsat"> | ||
<always_on>1</always_on> | ||
<update_rate>30</update_rate> | ||
</sensor> | ||
</link> | ||
<!-- plugin for sending direct velocity commands --> | ||
<plugin | ||
filename="gz-sim-velocity-control-system" | ||
name="gz::sim::systems::VelocityControl"> | ||
</plugin> | ||
<plugin | ||
filename="libMovingPlatformController.so" | ||
name="custom::MovingPlatformController"> | ||
</plugin> | ||
</model> | ||
</sdf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<sdf version="1.9"> | ||
<world name="moving_platform"> | ||
<physics type="ode"> | ||
<max_step_size>0.004</max_step_size> | ||
<real_time_factor>1.0</real_time_factor> | ||
<real_time_update_rate>250</real_time_update_rate> | ||
</physics> | ||
<gravity>0 0 -9.8</gravity> | ||
<magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field> | ||
<atmosphere type="adiabatic"/> | ||
<scene> | ||
<grid>false</grid> | ||
<ambient>0.4 0.4 0.4 1</ambient> | ||
<background>0.7 0.7 0.7 1</background> | ||
<shadows>true</shadows> | ||
</scene> | ||
<model name="ground_plane"> | ||
<static>true</static> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<plane> | ||
<normal>0 0 1</normal> | ||
<size>1 1</size> | ||
</plane> | ||
</geometry> | ||
<surface> | ||
<friction> | ||
<ode/> | ||
</friction> | ||
<bounce/> | ||
<contact/> | ||
</surface> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<plane> | ||
<normal>0 0 1</normal> | ||
<size>500 500</size> | ||
</plane> | ||
</geometry> | ||
<material> | ||
<ambient>0.8 0.8 0.8 1</ambient> | ||
<diffuse>0.8 0.8 0.8 1</diffuse> | ||
<specular>0.8 0.8 0.8 1</specular> | ||
</material> | ||
</visual> | ||
<pose>0 0 0 0 -0 0</pose> | ||
<inertial> | ||
<pose>0 0 0 0 -0 0</pose> | ||
<mass>1</mass> | ||
<inertia> | ||
<ixx>1</ixx> | ||
<ixy>0</ixy> | ||
<ixz>0</ixz> | ||
<iyy>1</iyy> | ||
<iyz>0</iyz> | ||
<izz>1</izz> | ||
</inertia> | ||
</inertial> | ||
<enable_wind>false</enable_wind> | ||
</link> | ||
<pose>0 0 0 0 -0 0</pose> | ||
<self_collide>false</self_collide> | ||
</model> | ||
<include> | ||
<uri>model://moving_platform</uri> | ||
</include> | ||
<light name="sunUTC" type="directional"> | ||
<pose>0 0 500 0 -0 0</pose> | ||
<cast_shadows>true</cast_shadows> | ||
<intensity>1</intensity> | ||
<direction>0.001 0.625 -0.78</direction> | ||
<diffuse>0.904 0.904 0.904 1</diffuse> | ||
<specular>0.271 0.271 0.271 1</specular> | ||
<attenuation> | ||
<range>2000</range> | ||
<linear>0</linear> | ||
<constant>1</constant> | ||
<quadratic>0</quadratic> | ||
</attenuation> | ||
<spot> | ||
<inner_angle>0</inner_angle> | ||
<outer_angle>0</outer_angle> | ||
<falloff>0</falloff> | ||
</spot> | ||
</light> | ||
<spherical_coordinates> | ||
<surface_model>EARTH_WGS84</surface_model> | ||
<world_frame_orientation>ENU</world_frame_orientation> | ||
<latitude_deg>47.397971057728974</latitude_deg> | ||
<longitude_deg> 8.546163739800146</longitude_deg> | ||
<elevation>0</elevation> | ||
</spherical_coordinates> | ||
</world> | ||
</sdf> |