Maintainer: nate AT openrobotics DOT org
Build | Status |
---|---|
Test coverage | |
Ubuntu Noble | |
Homebrew | |
Windows |
Gazebo Fuel Tools is composed by a client library and command line tools for interacting with Gazebo Fuel servers.
http://github.com/gazebosim/gz-fuel-tools
See the installation tutorial.
Make sure GZ_CONFIG_PATH
is set to the right install location so that gz fuel
will work.
Default is /usr/local/share/gz
.
For a complete list of commands run gz fuel -h
on the command line.
List all models
$ gz fuel list -t model -r | head
https://fuel.gazebosim.org/anonymous/test_model_595389531
https://fuel.gazebosim.org/anonymous/test_model_122023392
https://fuel.gazebosim.org/anonymous/test_model_429486665
https://fuel.gazebosim.org/anonymous/test_model_887243621
https://fuel.gazebosim.org/anonymous/test_model_084900530
https://fuel.gazebosim.org/anonymous/test_model_240061059
https://fuel.gazebosim.org/anonymous/test_model_464734097
https://fuel.gazebosim.org/anonymous/test_model_658598990
https://fuel.gazebosim.org/anonymous/test_model_834617935
https://fuel.gazebosim.org/anonymous/test_model_380348669
Download a model
$ gz fuel download -u https://fuel.gazebosim.org/1.0/OpenRobotics/models/Ambulance -v 4
Downloading model:
Name: Ambulance
Owner: openrobotics
Server:
URL: https://fuel.gazebosim.org
Version: 1.0
Download succeeded.
Private access tokens
Private models and worlds can be downloaded using access tokens.
Access tokens are generated on app.gazebosim.org
. After logging in,
go to Settings->Access Tokens
.
An access token can be used with CLI commands via the --header
option:
$ gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/ambulance --header 'Private-Token: <access_token>'
Or, an access token can be stored in a ~/.gz/fuel/config.yaml
file. The token is then
automatically used by the command line tool and API calls. Use the configure
helper
tool create your ~/.gz/fuel/config.yaml
file.
$ gz fuel configure
C++ Get List models
// Create a client (uses https://fuel.gazebosim.org by default)
gz::fuel_tools::ClientConfig conf;
gz::fuel_tools::FuelClient client(conf);
gz::fuel_tools::ModelIter iter = client.Models();
while (iter)
{
std::cout << "Got model: " << iter->Identification().Name() << "\n";
}
Upload a model
Create an account on https://app.gazebosim.org/ and log in.
Create a private token at https://app.gazebosim.org/settings#access_tokens. Store the generated token someplace safe.
The private token can then be used to upload a model:
gz fuel upload -m ~/path_to_model --header 'Private-token: <TOKEN>'
On ubuntu run
sudo apt install ruby-ffi libzip-dev libcurl-dev libjsoncpp-dev
Create the notion of "asset repository" or similar. An asset repository abstracts an entity that can store assets. It can be local or remote. This is the interface for "asset repository":
Think about how to detect when new versions of remote models have been uploaded.
Add Gazebo Fuel command line utilities for:
How to test the client library: