-
Notifications
You must be signed in to change notification settings - Fork 342
Adds a system which enables exporting occupancy grids. #2958
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 16 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
58361a5
Adds a system which enables exporting occupancy grids.
arjo129 d2791c2
Mostly style fixes
arjo129 1c7001f
Fix convergance issues
arjo129 f64434a
style
arjo129 255aaa4
Initial UI wireframe
arjo129 c5dc155
Initial implementation of GUI
arjo129 5e0956c
Fix typo
arjo129 8afd0a8
Merge branch 'main' into arjo/feat/export_occupancy_grid
iche033 30a270d
Bring up to speed to latest gz-math changes
arjo129 4fded03
Merge branch 'arjo/feat/export_occupancy_grid' of github.com:gazebosi…
arjo129 a6ed742
Make clean example
arjo129 c2585ce
Update the bazel build script and add manual trigger
arjo129 6b4e6f9
Remove GUI and fix style
arjo129 9689687
Style
arjo129 8f602a6
Style
arjo129 b45a3d6
Merge branch 'main' into arjo/feat/export_occupancy_grid
azeey 79bc400
Address Reviewer Feedback
arjo129 be306eb
Aaaand this is why I still have a job
arjo129 efdd866
Merge branch 'arjo/feat/export_occupancy_grid' of github.com:gazebosi…
arjo129 94be81d
Revert unintended changes in gui cmake
arjo129 d6e9faa
Remove mutex
arjo129 e8c23ef
Revert unessecary change
arjo129 915efab
Move to GZ_UTILS_UNIQUE_IMPL_PTR
arjo129 423ce40
Fix compiler errors
azeey 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
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,183 @@ | ||
| <!-- | ||
| This world demonstrates the FreeSpaceExplorer system plugin. | ||
| A lidar will explore the world and generate an occupancy grid. | ||
| The occupancy grid will be published as an image on the /scan_image topic. | ||
|
|
||
| To start the exploration, run the following command in a new terminal: | ||
| gz topic -t /start_exploration -m gz.msgs.Boolean -p 'data: true' | ||
| --> | ||
| <sdf version="1.6"> | ||
| <world name="empty"> | ||
| <gui> | ||
| <plugin filename="ImageDisplay" name="Image Display"> | ||
| <topic>/scan_image</topic> | ||
| </plugin> | ||
| </gui> | ||
| <physics name="1ms" type="ignored"> | ||
| <max_step_size>0.001</max_step_size> | ||
| <real_time_factor>1.0</real_time_factor> | ||
| </physics> | ||
| <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> | ||
| <plugin | ||
| filename="gz-sim-contact-system" | ||
| name="gz::sim::systems::Contact"> | ||
| </plugin> | ||
| <plugin | ||
| filename="gz-sim-sensors-system" | ||
| name="gz::sim::systems::Sensors"> | ||
| <render_engine>ogre2</render_engine> | ||
| </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="model_with_lidar"> | ||
| <pose>-1 -1 0.5 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> | ||
|
|
||
| <sensor name='gpu_lidar' type='gpu_lidar'> | ||
| <topic>scan</topic> | ||
| <update_rate>10</update_rate> | ||
| <lidar> | ||
| <scan> | ||
| <horizontal> | ||
| <samples>640</samples> | ||
| <resolution>1</resolution> | ||
| <min_angle>0</min_angle> | ||
| <max_angle>6.28</max_angle> | ||
| </horizontal> | ||
| </scan> | ||
| <range> | ||
| <min>0.08</min> | ||
| <max>9.0</max> | ||
| <resolution>0.01</resolution> | ||
| </range> | ||
| </lidar> | ||
| <visualize>true</visualize> | ||
| </sensor> | ||
| </link> | ||
| <static>true</static> | ||
|
|
||
| <plugin | ||
| filename="gz-sim-free-space-explorer-system" | ||
| name="gz::sim::systems::FreeSpaceExplorer"> | ||
| <lidar_topic>/scan</lidar_topic> | ||
| <image_topic>/scan_image</image_topic> | ||
| <start_topic>/start_exploration</start_topic> | ||
| <width>100</width> | ||
| <height>100</height> | ||
| <resolution>0.25</resolution> | ||
| <sensor_link>link</sensor_link> | ||
| </plugin> | ||
| </model> | ||
|
|
||
| <model name="cube"> | ||
| <pose>1 1 0.5 0 0 0</pose> | ||
| <link name="box_link"> | ||
| <inertial> | ||
| <inertia> | ||
| <ixx>0.16666</ixx> | ||
| <ixy>0</ixy> | ||
| <ixz>0</ixz> | ||
| <iyy>0.16666</iyy> | ||
| <iyz>0</iyz> | ||
| <izz>0.16666</izz> | ||
| </inertia> | ||
| <mass>1.0</mass> | ||
| </inertial> | ||
| <collision name="box_collision"> | ||
| <geometry> | ||
| <box> | ||
| <size>1 1 1</size> | ||
| </box> | ||
| </geometry> | ||
| </collision> | ||
|
|
||
| <visual name="box_visual"> | ||
| <geometry> | ||
| <box> | ||
| <size>1 1 1</size> | ||
| </box> | ||
| </geometry> | ||
| <material> | ||
| <ambient>1 0 0 1</ambient> | ||
| <diffuse>1 0 0 1</diffuse> | ||
| <specular>1 0 0 1</specular> | ||
| </material> | ||
| </visual> | ||
| </link> | ||
| </model> | ||
|
|
||
| <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> | ||
|
|
||
| </world> | ||
| </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
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
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,8 @@ | ||
| gz_add_system(free-space-explorer | ||
| SOURCES | ||
| FreeSpaceExplorer.cc | ||
| PUBLIC_LINK_LIBS | ||
| gz-common::gz-common | ||
| gz-math::gz-math | ||
| gz-plugin::core | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.