Skip to content
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

[gazebo] Cyberzoo model #2230

Merged
merged 25 commits into from
May 30, 2018
Merged

[gazebo] Cyberzoo model #2230

merged 25 commits into from
May 30, 2018

Conversation

tomvand
Copy link
Contributor

@tomvand tomvand commented Feb 6, 2018

New TU Delft Cyberzoo world and props for Gazebo:

cyberzoo_preview1
cyberzoo_preview2
cyberzoo_all_props
cyberzoo_preview_orangeavoid

@kirkscheper
Copy link
Member

oew... not sure its a good idea to include large gazebo models here... It should probably be downloaded during the make or included in a submodule which can be optionally checked out.

@gautierhattenberger advice here?

@tomvand
Copy link
Contributor Author

tomvand commented Feb 6, 2018

FYI, the gazebo folder is now 22.8MB

@podhrmic
Copy link
Member

podhrmic commented Feb 6, 2018

Looking nice! What about git lfs? That would be a good place to store things. Or a separate repo as @kirkscheper suggested (perhaps similar to https://github.com/AggieAir/Models) and some script that downloads this on demand...

@noether
Copy link
Member

noether commented Feb 6, 2018

Wow, it looks very similar to the real one xD

@gautierhattenberger
Copy link
Member

I also think it shouldn't be in the main repository. So either an external one or git lfs (I didn't know before). We could also use a variable env to specify a non standard path for Gazebo models. Otherwise we may end up with a lot of submodules.

@tomvand
Copy link
Contributor Author

tomvand commented Feb 7, 2018

Ok, so by now there are 4 different options to include these (and future) models:

  1. Add as submodule. Advantages: all models are downloaded automatically and there is a form of version control that keeps the right versions of fdm_gazebo, airframes, flight plans and models together. Disadvantages: the submodules might get cluttered unless all models are stored in a single repo (e.g. paparazzi/gazebo_models). Alternatively, this can partially be solved by placing the gazebo submodules in a different directory (conf/simulator/gazebo, sw/ext/gazebo_models/...), although this will not prevent .gitmodules from growing. All models get downloaded, which will increase disk usage of paparazzi (optional submodules might be possible by setting update=none and ignore=all in .gitmodules, but I've never tried this...). Shallow clones for submodules should be used to prevent downloading earlier revisions as well.
  2. Git LFS. Avoids the need to make a separate repo and submodules, while still providing version control. Requires users to install git lfs if they want to use the gazebo models, but once installed they should be easy to check out. As with the submodules all models will be downloaded, but not their history. Github provides 1 GB of storage and 1 GB/month of bandwidth for LFS, which allows only 45 checkouts per month @22MB before the bandwidth is reached.
  3. Download manually (or simple script). This option gives the most control over which models get downloaded. Once downloaded, the models can be placed outside paparazzi with an env variable pointing towards them, or perhaps in var or a gitignored folder under conf/simulator/gazebo. However, this solution can result in missing dependencies (e.g. the course2017_avoid_orange_cyberzoo.xml flightplan refers to the cyberzoo world that might not be installed). Version conflicts could be prevented by pointing a download script provided with paparazzi at a specific commit inside the model repo (almost like a manual submodule...)
  4. Download automatically during make. Very similar to submodules. Like submodules and LFS, all models will be downloaded. Pointing the download script at a specific version of the model repo prevents version conflicts.

I think adding this as a submodule would be the best solution in the long run, as it works out-of-the-box, prevents missing dependencies and is included in the version control. I do not think clutter will be a big problem as I do not expect the number of large gazebo models to grow quickly. If the disk usage or total download size should be kept to a minimum, option 3 would also be possible. What are your views on this?

@dewagter
Copy link
Member

dewagter commented Feb 8, 2018 via email

@gautierhattenberger
Copy link
Member

I'm not in favor of options 2 and 4. For option 3, there is also the paparazzi_pkgman.py tool that could be used, although I'm not completely sure what you can/cannot do with this.
If we go for option 4, fetching this submodule should not be automatic I think.

@OpenUAS
Copy link
Contributor

OpenUAS commented Mar 28, 2018

+1 as Submodule (Shallow). As discussed, Gazebo v8.x is not a long-term version support v9 is till 2023 (see http://gazebosim.org/#status). Since this is the first time to use Gazebo for the TU course, IMHO let's start with v9 no need for backwards compatibility. I've converted ~50% of functions as eval to see how it would take. Someone who is into Gazebo it should be trivial. see https://bitbucket.org/osrf/gazebo/src/default/Migration.md Sorry Tom, no time left for full conversion this month to help out. And really the size is not so large as not to be stuffed in github as submodule. See project where e.g. README PDF are already 30MB. For the course branch removew e.g the # in the default build.

- All new models are moved to the tudelft/gazebo_models repository, which is included as a submodule in sw/ext/tudelft_gazebo_models/
- Changed vehicle and world SDF loading to use URI's, these can be used with multiple search paths
- Added gzclient_launcher.sh script that sets up environment variables before launching gzclient. This prevents errors if the user forgets to add the paths to .bashrc. Added as a tool to control_panel_example.xml
@tomvand
Copy link
Contributor Author

tomvand commented May 30, 2018

Finally had time to work on this again :). I have removed the new models from this pull request and pushed them to a new repository that is included as a submodule. The submodule can be downloaded manually if required using git submodule update --init -- sw/ext/tudelft_gazebo_models/

I made minor changes to the code to support multiple model and world folders. I also added a helper script to launch gzclient with the correct environment variables.

In short:

  • All new models are moved to the tudelft/gazebo_models repository, which is included as a submodule in sw/ext/tudelft_gazebo_models/
  • Changed vehicle and world SDF loading to use URI's, these can be used with multiple search paths
  • Added gzclient_launcher.sh script that sets up environment variables before launching gzclient. This prevents errors if the user forgets to add the paths to .bashrc. Added as a tool to control_panel_example.xml

@OpenUAS
Copy link
Contributor

OpenUAS commented May 30, 2018

Taken all remarks into consideration and all fine, thanks!

@OpenUAS OpenUAS merged commit c870e27 into paparazzi:master May 30, 2018
@tomvand tomvand mentioned this pull request May 30, 2018
biancabndris pushed a commit to biancabndris/paparazzi that referenced this pull request Aug 29, 2018
* First steps towards detailed cyberzoo model. Got transparency working.

* Fix ambient lighting of cyberzoo_solid

* Import improved model

* Fix optitrack cameras

* Fix lighting colors

* Fix optitrack camera color

* Add orange pole and traffic mat objects

* Fix orange_pole2 smoothing errors

* Fix cyberzoo origin

* Add first draft of cyberzoo surroundings

* Add updated cyberzoo surroundings and outside walls

* Minor fixes to surroundings

* Create cyberzoo world

To-do: set origin coordinates and rotate environment

* Set world coordinates and rotation, fix naming conflict

* Add cyberzoo world with orange poles for orange_avoider

* Remove old cyberzoo model, fix dependencies

* Add daylight in windows on outer walls

* Separate cyberzoo model into layers

Makes it easier to hide parts of the model in the GUI.

* Add cyberzoo surroundings to main model in separate layers

* Restore cyberzoo floor collision box

* Add cyberzoo props

* Minor tweaks to models

* Compress textures

Reduced texture dimensions. Size of model folder is now approx.
20 MB instead of 60+ MB.

* Remove origin marker from worlds

* Move CyberZoo models to submodule

- All new models are moved to the tudelft/gazebo_models repository, which is included as a submodule in sw/ext/tudelft_gazebo_models/
- Changed vehicle and world SDF loading to use URI's, these can be used with multiple search paths
- Added gzclient_launcher.sh script that sets up environment variables before launching gzclient. This prevents errors if the user forgets to add the paths to .bashrc. Added as a tool to control_panel_example.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants