-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add cave world generator #454
Conversation
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
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.
It worked for me! I just left one minor comment about Ignition-fuel-tools4
.
subt_ign/CMakeLists.txt
Outdated
@@ -26,7 +26,8 @@ set(IGN_GAZEBO_VER ${ignition-gazebo2_VERSION_MAJOR}) | |||
|
|||
file(MAKE_DIRECTORY ${CATKIN_DEVEL_PREFIX}/include) | |||
|
|||
find_package(ignition-common3 REQUIRED) | |||
find_package(ignition-common3 REQUIRED COMPONENTS graphics) | |||
find_package(ignition-fuel_tools4 REQUIRED) |
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.
So far master
uses Ignition Blueprint and that contains ignition-fuel-tools3
. Just checking if this is expected...
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.
good catch, fixed in 3972783
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
t.tileType; | ||
|
||
ss << " <include>\n"; | ||
ss << " <static>true</static>\n"; |
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.
Should all tiles be static?
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.
yes they should be static. The models are actually already marked as static in the model.sdf file so this is probably redundant. I added this to be consistent with the existing world files.
math::Quaterniond(0, 0, IGN_PI/2)*rot); | ||
} | ||
ss << " <include>\n"; | ||
ss << " <static>true</static>\n"; |
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.
Should all caps be static?
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.
yes same as the tiles
Update: Updated code to work with both Cave Type A and Type B tiles. Added an extra
-t <type>
arg that lets user specify the type of cave to create:anastomotic
- creates world using Type A tiles,rectilinear
- creates world using Type B tiles, andcurvilinear
- creates world using Type A and Type B tiles. Also updated PR description.Added
world_generator_cave
that generates a world from type A and type B tiles. The tool constructs a world from a collection of prefab world sections and certain individual tiles. Note that the code is currently specific to Cave Type A and Type B Tiles.Some options are available:
You can generate a different world by setting a different seed value and minimum tile count.
Note the optional
g
arg that lets users generate a world sdf with GUI plugin, which is useful for viewing the world without launching the whole subt stack. Leave out theg
arg when generating the final world.Example usage:
If you do not have the Cave Type A and Type B tiles in your fuel cache, the tool will go and download them as it needs to compute bounding box info for these tiles in order to do intersection checks.
View the world using ign-gazebo
Signed-off-by: Ian Chen ichen@osrfoundation.org