-
Notifications
You must be signed in to change notification settings - Fork 132
Add world with moving platform #83
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d4038c3
add moving platform world
mbjd e54f085
moving platform: initial pose
mbjd 04219ed
moving platform: increase mass & inertia
mbjd 93587c1
wip: platform controller plugin
mbjd 73cb2ec
remove plugins from sdf
mbjd db0941b
split world and model
mbjd c05a84e
add back velocity plugin
mbjd 56709f6
bind plugin to model
mbjd 156e6f6
stop binding to specific link
mbjd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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> | ||
mbjd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</model> | ||
</sdf> |
This file contains hidden or 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> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the navsat sensor is not needed. See my comments in PX4/PX4-Autopilot#24471