forked from gazebosim/gz-sim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport gazebosim#1748: Adds a tool for environment data visualizati…
…on and custom environmental sensors (gazebosim#1798) This PR adds a tool to visualize Scalar Environmental Data. It also adds custom sensors. Signed-off-by: Arjo Chakravarty <[email protected]>
- Loading branch information
Showing
27 changed files
with
1,558 additions
and
11 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,17 @@ | ||
timestamp,humidity,x,y,z | ||
0,80,-1,-1,-1 | ||
0,80,-1,-1, 1 | ||
0,80,-1, 1,-1 | ||
0,80,-1, 1, 1 | ||
0,90, 1,-1,-1 | ||
0,90, 1,-1, 1 | ||
0,90, 1, 1,-1 | ||
0,90, 1, 1, 1 | ||
1,90,-1,-1,-1 | ||
1,90,-1,-1, 1 | ||
1,90,-1, 1,-1 | ||
1,90,-1, 1, 1 | ||
1,90, 1,-1,-1 | ||
1,90, 1,-1, 1 | ||
1,90, 1, 1,-1 | ||
1,90, 1, 1, 1 |
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,112 @@ | ||
<?xml version="1.0" ?> | ||
<!-- This example show cases how to load and unload environmental data. --> | ||
<sdf version="1.6"> | ||
<world name="environmental_sensor_example"> | ||
<plugin | ||
filename="gz-sim-physics-system" | ||
name="gz::sim::systems::Physics"> | ||
</plugin> | ||
<plugin | ||
filename="gz-sim-user-commands-system" | ||
name="gz::sim::systems::UserCommands"> | ||
</plugin> | ||
<plugin | ||
filename="gz-sim-scene-broadcaster-system" | ||
name="gz::sim::systems::SceneBroadcaster"> | ||
</plugin> | ||
<!-- The system is added to the world, so it handles all environmental data in the world--> | ||
<plugin | ||
filename="gz-sim-environmental-sensor-system" | ||
name="gz::sim::systems::EnvironmentalSystem"> | ||
</plugin> | ||
|
||
<plugin | ||
filename="gz-sim-environment-preload-system" | ||
name="gz::sim::systems::EnvironmentPreload"> | ||
<data>environmental_data.csv</data> | ||
<dimensions> | ||
<time>timestamp</time> | ||
<space> | ||
<x>x</x> | ||
<y>y</y> | ||
<z>z</z> | ||
</space> | ||
</dimensions> | ||
</plugin> | ||
|
||
<light type="directional" name="sun"> | ||
<cast_shadows>true</cast_shadows> | ||
<pose>0 0 10 0 0 0</pose> | ||
<diffuse>0.8 0.8 0.8 1</diffuse> | ||
<specular>0.2 0.2 0.2 1</specular> | ||
<attenuation> | ||
<range>1000</range> | ||
<constant>0.9</constant> | ||
<linear>0.01</linear> | ||
<quadratic>0.001</quadratic> | ||
</attenuation> | ||
<direction>-0.5 0.1 -0.9</direction> | ||
</light> | ||
|
||
<model name="ground_plane"> | ||
<static>true</static> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<plane> | ||
<normal>0 0 1</normal> | ||
<size>100 100</size> | ||
</plane> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<plane> | ||
<normal>0 0 1</normal> | ||
<size>100 100</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> | ||
</link> | ||
</model> | ||
|
||
<model name="model_with_sensor"> | ||
<pose>0 0 0.05 0 0 0</pose> | ||
<link name="link"> | ||
<inertial> | ||
<mass>0.1</mass> | ||
<inertia> | ||
<ixx>0.000166667</ixx> | ||
<iyy>0.000166667</iyy> | ||
<izz>0.000166667</izz> | ||
</inertia> | ||
</inertial> | ||
<collision name="collision"> | ||
<geometry> | ||
<box> | ||
<size>0.1 0.1 0.1</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<box> | ||
<size>0.1 0.1 0.1</size> | ||
</box> | ||
</geometry> | ||
</visual> | ||
<!-- Here's our custom sensor --> | ||
<sensor name="custom_sensor" type="custom" gz:type="environmental_sensor/humidity"> | ||
<always_on>1</always_on> | ||
<update_rate>30</update_rate> | ||
</sensor> | ||
</link> | ||
</model> | ||
|
||
</world> | ||
</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
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
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
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
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
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
Oops, something went wrong.