Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gz-fuel-tools8' into remove-fuel-ignition-clientconfig
Browse files Browse the repository at this point in the history
Nate Koenig committed Oct 6, 2022
2 parents b46b6a1 + 7b6ce8a commit 7df811b
Showing 8 changed files with 172 additions and 127 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})
#============================================================================
# Configure the project
#============================================================================
gz_configure_project(VERSION_SUFFIX pre1)
gz_configure_project(VERSION_SUFFIX)

#============================================================================
# Set project-specific options
92 changes: 91 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -4,10 +4,100 @@

## Gazebo Fuel Tools 8.x

### Gazebo Fuel Tools 8.0.0 (202X-XX-XX)
### Gazebo Fuel Tools 8.0.0

1. Update test infrastruture
* [Pull request #245](https://github.com/gazebosim/gz-fuel-tools/pull/245)
* [Pull request #246](https://github.com/gazebosim/gz-fuel-tools/pull/246)
* [Pull request #269](https://github.com/gazebosim/gz-fuel-tools/pull/269)
* [Pull request #270](https://github.com/gazebosim/gz-fuel-tools/pull/270)

1. Ignition to Gazebo rename.
* [Pull request #248](https://github.com/gazebosim/gz-fuel-tools/pull/248)
* [Pull request #251](https://github.com/gazebosim/gz-fuel-tools/pull/251)
* [Pull request #256](https://github.com/gazebosim/gz-fuel-tools/pull/256)
* [Pull request #259](https://github.com/gazebosim/gz-fuel-tools/pull/259)
* [Pull request #262](https://github.com/gazebosim/gz-fuel-tools/pull/262)
* [Pull request #264](https://github.com/gazebosim/gz-fuel-tools/pull/264)
* [Pull request #267](https://github.com/gazebosim/gz-fuel-tools/pull/267)
* [Pull request #268](https://github.com/gazebosim/gz-fuel-tools/pull/268)
* [Pull request #272](https://github.com/gazebosim/gz-fuel-tools/pull/272)
* [Pull request #275](https://github.com/gazebosim/gz-fuel-tools/pull/275)
* [Pull request #282](https://github.com/gazebosim/gz-fuel-tools/pull/282)
* [Pull request #287](https://github.com/gazebosim/gz-fuel-tools/pull/287)
* [Pull request #295](https://github.com/gazebosim/gz-fuel-tools/pull/295)
* [Pull request #296](https://github.com/gazebosim/gz-fuel-tools/pull/296)
* [Pull request #297](https://github.com/gazebosim/gz-fuel-tools/pull/297)

1. Bumps in versions for Garden and removal of deprecations
* [Pull request #224](https://github.com/gazebosim/gz-fuel-tools/pull/224)
* [Pull request #229](https://github.com/gazebosim/gz-fuel-tools/pull/229)
* [Pull request #239](https://github.com/gazebosim/gz-fuel-tools/pull/239)
* [Pull request #247](https://github.com/gazebosim/gz-fuel-tools/pull/247)

1. Improve documentation
* [Pull request #298](https://github.com/gazebosim/gz-fuel-tools/pull/298)
* [Pull request #299](https://github.com/gazebosim/gz-fuel-tools/pull/299)
* [Pull request #300](https://github.com/gazebosim/gz-fuel-tools/pull/300)

## Gazebo Fuel Tools 7.x

### Gazebo Fuel Tools 7.1.0 (2021-08-16)

1. Ignition to Gazebo server rename effort
* [Pull request #263](https://github.com/gazebosim/gz-fuel-tools/pull/263)

1. Remove redundant namespace references
* [Pull request #284](https://github.com/gazebosim/gz-fuel-tools/pull/284)

1. Change `IGN_DESIGNATION` to `GZ_DESIGNATION`
* [Pull request #278](https://github.com/gazebosim/gz-fuel-tools/pull/278)

1. Ignition -> Gazebo docs
* [Pull request #276](https://github.com/gazebosim/gz-fuel-tools/pull/276)

1. Remove unused files (`bitbucket-pipelines`, `docs`)
* [Pull request #273](https://github.com/gazebosim/gz-fuel-tools/pull/273)

1. Disable failing windows tests
* [Pull request #266](https://github.com/gazebosim/gz-fuel-tools/pull/266)

1. Disable staging-fuel.ignitionrobotics.org test
* [Pull request #257](https://github.com/gazebosim/gz-fuel-tools/pull/257)

1. Add missing header guard for `Interface.hh`
* [Pull request #249](https://github.com/gazebosim/gz-fuel-tools/pull/249)

1. SDF from path helper
* [Pull request #233](https://github.com/gazebosim/gz-fuel-tools/pull/233)

1. Add Ubuntu Jammy CI
* [Pull request #236](https://github.com/gazebosim/gz-fuel-tools/pull/236)

1. Fix trailing slashes in failing tests
* [Pull request #237](https://github.com/gazebosim/gz-fuel-tools/pull/237)

1. Print error when unzipping fails to save a file
* [Pull request #235](https://github.com/gazebosim/gz-fuel-tools/pull/235)

1. More checks when manipulating file system in tests
* [Pull request #227](https://github.com/gazebosim/gz-fuel-tools/pull/227)

1. Move test cache to build folder
* [Pull request #222](https://github.com/gazebosim/gz-fuel-tools/pull/222)

1. Improve and fix `ResultType` tests
* [Pull request #225](https://github.com/gazebosim/gz-fuel-tools/pull/225)

1. Fix `cmdfuel` ruby script generation on Windows with MSVC
* [Pull request #219](https://github.com/gazebosim/gz-fuel-tools/pull/219)

1. `FuelClient.cc`: include `<deque>`
* [Pull request #213](https://github.com/gazebosim/gz-fuel-tools/pull/213)

1. APIs for retrieving models in parallel
* [Pull request #199](https://github.com/gazebosim/gz-fuel-tools/pull/199)

### Gazebo Fuel Tools 7.0.0 (2021-09-28)

1. Depend on gz-msgs8
74 changes: 14 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -33,16 +33,16 @@ 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.ignitionrobotics.org/anonymous/test_model_595389531
https://fuel.ignitionrobotics.org/anonymous/test_model_122023392
https://fuel.ignitionrobotics.org/anonymous/test_model_429486665
https://fuel.ignitionrobotics.org/anonymous/test_model_887243621
https://fuel.ignitionrobotics.org/anonymous/test_model_084900530
https://fuel.ignitionrobotics.org/anonymous/test_model_240061059
https://fuel.ignitionrobotics.org/anonymous/test_model_464734097
https://fuel.ignitionrobotics.org/anonymous/test_model_658598990
https://fuel.ignitionrobotics.org/anonymous/test_model_834617935
https://fuel.ignitionrobotics.org/anonymous/test_model_380348669
https://fuel.gazebosim.org/1.0/09ubberboy90/models/box%205cm
https://fuel.gazebosim.org/1.0/accurrent/models/mbari%20tethys%20lrauv
https://fuel.gazebosim.org/1.0/adlarkin/models/construction%20cone%20label%20test
https://fuel.gazebosim.org/1.0/aknyunus0/models/shoe
https://fuel.gazebosim.org/1.0/aknyunus0/models/mens_asv_billfish_boat_shoe_in_tan_leather_wmuj5pbwanc
https://fuel.gazebosim.org/1.0/amangupta/models/start
https://fuel.gazebosim.org/1.0/amelhassan/models/backpack
https://fuel.gazebosim.org/1.0/amrelsersy/models/house%203
https://fuel.gazebosim.org/1.0/amrelsersy/models/coro_mike_sensor_config_2
https://fuel.gazebosim.org/1.0/andreamcr/models/stecca%20centrale
```

**Download a model**
@@ -76,30 +76,13 @@ Create an account on
[https://app.gazebosim.org/](https://app.gazebosim.org/) and log
in.

While logged in, obtain the JWT token of the account from the browser.
In Chrome and Firefox, this can be done by opening Developer Tools (
`Ctrl+Shift+I`). Click on the Console tab, and type in
```
localStorage.id_token
```
This will print out the token.
Create a private token at
[https://app.gazebosim.org/settings#access_tokens](https://app.gazebosim.org/settings#access_tokens). Store the generated token someplace safe.

The token can also be obtained through the Developer Tools GUI.
Click on the Application tab in Chrome (or Storage tab in Firefox), and expand
the Local Storage item.
In Firefox versions < 71.0, this may be under Web Developer, then Storage
Inspector.
Click on the URL displayed, and select Key `id_token`.
Its Value can be copied.

The JWT token can then used to upload the model:
The private token can then used to upload a model:
```
gz fuel upload -m ~/path_to_model --header 'authorization: Bearer <JWT TOKEN>'
gz fuel upload -m ~/path_to_model --header 'Private-token: <TOKEN>'
```

Note that the `upload` command only works for models currently, not worlds.
** Upload a model **

## TODO

See issues beginning with [Fuel backend] in the title. Here are two examples.
@@ -162,32 +145,3 @@ sudo apt install ruby-ffi libzip-dev libcurl-dev libjsoncpp-dev
* Directly against the real backend (staging?)
* Clone, and compile a local backend?
* Mocking the backend has the problem of not being in sync with the real backend and missing potential issues.

# Known issue of command line tools

In the event that the installation is a mix of Debian and from source, command
line tools from `gz-tools` may not work correctly.

A workaround for a single package is to define the environment variable
`GZ_CONFIG_PATH` to point to the location of the Gazebo library installation,
where the YAML file for the package is found, such as
```
export GZ_CONFIG_PATH=/usr/local/share/gz
```

However, that environment variable only takes a single path, which means if the
installations from source are in different locations, only one can be specified.

Another workaround for working with multiple Gazebo libraries on the command
line is using symbolic links to each library's YAML file.
```
mkdir ~/.gz/tools/configs -p
cd ~/.gz/tools/configs/
ln -s /usr/local/share/gz/fuel4.yaml .
ln -s /usr/local/share/gz/transport7.yaml .
ln -s /usr/local/share/gz/transportlog7.yaml .
...
export GZ_CONFIG_PATH=$HOME/.gz/tools/configs
```

This issue is tracked [here](https://github.com/gazebosim/gz-tools/issues/8).
26 changes: 13 additions & 13 deletions src/cmd/cmdfuel.rb.in
Original file line number Diff line number Diff line change
@@ -83,12 +83,12 @@ SUBCOMMANDS = {
'delete' =>
"Delete simulation resources \n"\
" \n"\
" gz fuel delete [options] \n"\
" gz fuel delete [options] \n"\
" \n"\
"Available Options: \n"\
" -u [--url] arg URL of the server that should receive \n"\
" the model. If unspecified, the server will be\n"\
" https://fuel.ignitionrobotics.org. \n"\
" https://fuel.gazebosim.org. \n"\
" --header arg Set an HTTP header, such as \n"\
" --header 'Private-Token: <access_token>'. \n" +
COMMON_OPTIONS,
@@ -100,7 +100,7 @@ SUBCOMMANDS = {
" \n"\
"Available Options: \n"\
" -u [--url] arg Full resource URL, such as: \n"\
" https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Ambulance\n"\
" https://fuel.gazebosim.org/1.0/openrobotics/models/Ambulance\n"\
" --header arg Set an HTTP header, such as \n"\
" --header 'Private-Token: <access_token>'. \n"\
" -j [--jobs] arg Number of parallel downloads (default: 1, \n"\
@@ -114,13 +114,13 @@ SUBCOMMANDS = {
'edit' =>
"Edit a simulation resource \n"\
" \n"\
" gz fuel edit [options] \n"\
" gz fuel edit [options] \n"\
" \n"\
"Available Options: \n"\
" -m [--model] arg Path to directory containing the model. \n"\
" -u [--url] arg URL of the server that should receive \n"\
" the model. If unspecified, the server will be\n"\
" https://fuel.ignitionrobotics.org. \n"\
" https://fuel.gazebosim.org. \n"\
" -p [--private] Use this argument to make the model private. \n"\
" -b [--public] Use this argument to make the model public. \n"\
" --header arg Set an HTTP header, such as \n"\
@@ -130,14 +130,14 @@ SUBCOMMANDS = {
'list' =>
"List simulation resources \n"\
" \n"\
" gz fuel list [options] \n"\
" gz fuel list [options] \n"\
" \n"\
"Available Options: \n"\
" -t [--type] arg Resource type (i.e. model, world). Required. \n"\
" -o [--owner] arg Return only resources for given owner. \n"\
" -u [--url] arg URL of a server the resource comes from, \n"\
" if unspecified, it will be \n"\
" https://fuel.ignitionrobotics.org. \n"\
" https://fuel.gazebosim.org. \n"\
" -r [--raw] Machine-friendly output. \n" +
COMMON_OPTIONS,

@@ -156,14 +156,14 @@ SUBCOMMANDS = {
'upload' =>
"Upload simulation resources \n"\
" \n"\
" gz fuel upload [options] \n"\
" gz fuel upload [options] \n"\
" \n"\
"Available Options: \n"\
" -m [--model] arg Path to directory containing a model, or \n"\
" multiple models each in a subdirectory. \n"\
" -u [--url] arg URL of the server that should receive \n"\
" the model. If unspecified, the server will be\n"\
" https://fuel.ignitionrobotics.org. \n"\
" https://fuel.gazebosim.org. \n"\
" -o [--owner] arg Upload to the given owner, which can be an. \n"\
" organization. Default behavior is to upload \n"\
" to the user account associated with the \n"\
@@ -287,12 +287,12 @@ class Cmd
case options['subcommand']
when 'delete'
if options['url'] == ''
puts "Missing resource URL (e.g. --url https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Ambulance)."
puts "Missing resource URL (e.g. --url https://fuel.gazebosim.org/1.0/OpenRobotics/models/Ambulance)."
exit(-1)
end
when 'download'
if options['url'] == ''
puts "Missing resource URL (e.g. --url https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Ambulance)."
puts "Missing resource URL (e.g. --url https://fuel.gazebosim.org/1.0/OpenRobotics/models/Ambulance)."
exit(-1)
end

@@ -333,12 +333,12 @@ class Cmd
exit(-1)
end
if options['url'] == ''
puts "Missing URL (e.g. --url https://fuel.ignitionrobotics.org)."
puts "Missing URL (e.g. --url https://fuel.gazebosim.org)."
exit(-1)
end
when 'edit'
if options['url'] == ''
puts "Missing resource URL (e.g. --url https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Ambulance)."
puts "Missing resource URL (e.g. --url https://fuel.gazebosim.org/1.0/OpenRobotics/models/Ambulance)."
exit(-1)
end
end
8 changes: 4 additions & 4 deletions tutorials/01_installation.md
Original file line number Diff line number Diff line change
@@ -43,12 +43,12 @@ Here are the instructions:

Install Homebrew, which should also prompt you to install the XCode
command-line tools:
```
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

Run the following commands:
```
```bash
brew tap osrf/simulation
brew install gz-fuel-tools<#>
```
@@ -175,7 +175,7 @@ sudo make uninstall

2. Install dependencies
```
brew install --only-dependencies ignition-fuel-tools<#>
brew install --only-dependencies gz-fuel-tools<#>
```
Be sure to replace `<#>` with a number value, such as 1 or 2, depending on
which version you need.
27 changes: 14 additions & 13 deletions tutorials/02_configuration.md
Original file line number Diff line number Diff line change
@@ -28,16 +28,17 @@ servers:

The `servers` section specifies all Fuel servers to interact with.
For each server, you must specify the URL to send the HTTP requests.
If the server requires auth you can specify the token filling the optional field `private-token`.
If the server requires authentication, you can specify the token by filling
the optional field `private-token`.

The `cache` section captures options related with the local storage of the
assets. `path` specifies the local directory where all assets will be
downloaded. If not used, all assets are stored under `$HOME/.ignition/fuel`.
downloaded. If not used, all assets are stored under `$HOME/.gz/fuel`.

## Custom configuration file path

Gazebo Fuel's default configuration file is stored under
`$HOME/.ignition/fuel/config.yaml`, but it is possible to load a configuration
`$HOME/.gz/fuel/config.yaml`, but it is possible to load a configuration
file from a custom path programmatically. Let's see how.

Create a file `/tmp/my_config.yaml` with the following content:
@@ -47,7 +48,7 @@ Create a file `/tmp/my_config.yaml` with the following content:
# The list of servers.
servers:
-
url: https://fuel.ignitionrobotics.org
url: https://fuel.gazebosim.org

# Where are the assets stored in disk.
cache:
@@ -65,29 +66,29 @@ Download the file `download.cc` and save it under `/tmp/conf_tutorial`:

```bash
# Ubuntu and MacOS
wget https://github.com/gazebosim/gz-fuel-tools/raw/main/example/download.cc
wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/download.cc

# Windows
## CMD
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/main/example/download.cc -o download.cc
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/download.cc -o download.cc
## PowerShell
curl https://github.com/gazebosim/gz-fuel-tools/raw/main/example/download.cc -o download.cc
curl https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/download.cc -o download.cc
```

Also, download `CMakeLists.txt` for compiling the example:

```bash
# Ubuntu and MacOS
wget https://github.com/gazebosim/gz-fuel-tools/raw/main/example/CMakeLists.txt
wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/CMakeLists.txt

# Windows
## CMD
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/main/example/CMakeLists.txt -o CMakeLists.txt
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/CMakeLists.txt -o CMakeLists.txt
## PowerShell
curl https://github.com/gazebosim/gz-fuel-tools/raw/main/example/CMakeLists.txt -o CMakeLists.txt
curl https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/CMakeLists.txt -o CMakeLists.txt
```

Install a dependency:
Install the gflags dependency:
```
# Ubuntu
sudo apt-get install libgflags-dev
@@ -121,7 +122,7 @@ And now the fun part, execute it:
```

Verify that you have the model in
`/tmp/gz/fuel/fuel.ignitionrobotics.org/caguero/models/Beer`,
`/tmp/gz/fuel/fuel.gazebosim.org/caguero/models/beer`,
as you configured in your YAML file.

## Walkthrough
@@ -176,7 +177,7 @@ purpose we use `SetConfigPath()`. As we're interested in using a configuration
file, we need to call `LoadConfig()`. It's important to note that if we call
`LoadConfig()` without calling `SetConfigPath()` beforehand, a default
configuration file will be loaded (and created if it doesn't already exist under
`$HOME/.ignition/fuel/config.yaml`). If the user doesn't call `LoadConfig()`, no
`$HOME/.gz/fuel/config.yaml`). If the user doesn't call `LoadConfig()`, no
configuration file will be used at all.

Once we have all our configuration ready and captured in the `conf` object,
42 changes: 21 additions & 21 deletions tutorials/03_command_line.md
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ Next Tutorial: \ref cppapi

## Overview

The `gz fuel` command line tool provides a convenient way to handle Gazebo
Fuel resources from a terminal.
The `gz fuel` command line tool provides a convenient way to handle [Gazebo
Fuel](https://app.gazebosim.org) resources from a terminal.

## List resources

@@ -18,9 +18,9 @@ type, such as `model` or `world` as follows:
You should see a list such as:

```
Fetching world list from https://fuel.ignitionrobotics.org...
Fetching world list from https://fuel.gazebosim.org...
Received world list (took 350ms).
https://fuel.ignitionrobotics.org
https://fuel.gazebosim.org
├── OpenRobotics
│ ├── Empty
│ └── Shapes
@@ -30,7 +30,7 @@ https://fuel.ignitionrobotics.org

By default, Fuel will list resources from all the servers listed in your
`config.yaml` file. See the
[configuration tutorial](https://gazebosim.org/tutorials/fuel_tools/1.0/md__data_ignition_ign-fuel-tools_tutorials_02_configuration.html)
[configuration tutorial](configuration.html)
for more details.

> **Tip**: If you want to see resources from a different Fuel server, add it to
@@ -50,9 +50,9 @@ a way that's easier for scripts to parse. For example, try:
And you'll get a list of the world URLs similar to the one below:

```
https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty
https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Shapes
https://fuel.ignitionrobotics.org/1.0/chapulina/worlds/Shapes%20copy
https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Empty
https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Shapes
https://fuel.gazebosim.org/1.0/chapulina/worlds/Shapes%20copy
```

### By owner
@@ -70,40 +70,40 @@ computer. We use the `gz fuel download` tool for this.
We learned above how to get resource URLs. Now we can use these URLs to download
them. For example, try:

`gz fuel download -v 4 -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty`
`gz fuel download -v 3 -u https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Fortress%20Demo`

Note that we passed the `-v 4` option so we get a verbose output. You should see something like:
Note that we passed the `-v 3` option so we get a verbose output. You should see something like:

```
Downloading world:
Name: Empty
Owner: OpenRobotics
Name: fortress%20demo
Owner: openrobotics
Server:
URL: https://fuel.ignitionrobotics.org
URL: https://fuel.gazebosim.org
Version: 1.0
[Msg] Downloading world [fuel.ignitionrobotics.org/OpenRobotics/worlds/Empty]
[Msg] Downloading world [fuel.gazebosim.org/openrobotics/worlds/fortress%20demo]
[Msg] Saved world at:
/home/louise/.ignition/fuel/fuel.ignitionrobotics.org/OpenRobotics/worlds/Empty/1
/home/janedoe/.gz/fuel/fuel.gazebosim.org/openrobotics/worlds/fortress%20demo/1
Download succeeded.
```

If the model is privated you can create a config file with your token. For example, create a file
If the model is private you can create a config file with your token. For example, create a file
`/tmp/my_config.yaml` with the following content and edit your token:

```yaml
---
# The list of servers.
servers:
-
url: https://fuel.ignitionrobotics.org
url: https://fuel.gazebosim.org
private-token: <your private token>
```
Then try to download the model:
```bash
gz fuel download -v 4 -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty -c /tmp/my_config.yaml
gz fuel download -v 4 -u https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/fortress%20demo -c /tmp/my_config.yaml
```

Worlds downloaded with the tool get conveniently organized into the same
@@ -113,7 +113,7 @@ directory, which we call the "local cache". The path is broken down as follows:

> **Tip**: You can change the local cache path in `config.yaml`.
> **Tip**: You can also use other tools such as `wget` to download a zipped file of a world, just add `.zip` to the end of the URL, for example: `wget https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty.zip`.
> **Tip**: You can also use other tools such as `wget` to download a zipped file of a world, just add `.zip` to the end of the URL, for example: `wget https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Fortress%20Demo.zip`.
## Edit resources

@@ -138,11 +138,11 @@ access.
Use the `-p` option to make a resources private. For example:

```
gz fuel edit -p -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty --header 'Private-token: YOUR_TOKEN'
gz fuel edit -p -u https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/Fortress%20Demo --header 'Private-token: YOUR_TOKEN'
```

Use the `-b` option to make a resource public. For example:

```
gz fuel edit -b -u https://fuel.ignitionrobotics.org/1.0/OpenRobotics/worlds/Empty --header 'Private-token: YOUR_TOKEN'
gz fuel edit -b -u https://fuel.gazebosim.org/1.0/OpenRobotics/worlds/%20Demo --header 'Private-token: YOUR_TOKEN'
```
28 changes: 14 additions & 14 deletions tutorials/04_cpp_api.md
Original file line number Diff line number Diff line change
@@ -18,22 +18,22 @@ Download the files `list.cc`, `details.cc`, `download.cc`,

```bash
# Ubuntu or MacOS
wget https://github.com/gazebosim/gz-fuel-tools/raw/main/example/list.cc
wget https://github.com/gazebosim/gz-fuel-tools/raw/main/example/details.cc
wget https://github.com/gazebosim/gz-fuel-tools/raw/main/example/download.cc
wget https://github.com/gazebosim/gz-fuel-tools/raw/main/example/CMakeLists.txt
wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/list.cc
wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/details.cc
wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/download.cc
wget https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/CMakeLists.txt

# Windows
## CMD
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/main/example/list.cc -o list.cc
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/main/example/details.cc -o details.cc
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/main/example/download.cc -o download.cc
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/main/example/CMakeLists.txt -o CMakeLists.txt
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/list.cc -o list.cc
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/details.cc -o details.cc
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/download.cc -o download.cc
curl -sk https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/CMakeLists.txt -o CMakeLists.txt
## PowerShell
curl https://github.com/gazebosim/gz-fuel-tools/raw/main/example/list.cc -o list.cc
curl https://github.com/gazebosim/gz-fuel-tools/raw/main/example/details.cc -o details.cc
curl https://github.com/gazebosim/gz-fuel-tools/raw/main/example/download.cc -o download.cc
curl https://github.com/gazebosim/gz-fuel-tools/raw/main/example/CMakeLists.txt -o CMakeLists.txt
curl https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/list.cc -o list.cc
curl https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/details.cc -o details.cc
curl https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/download.cc -o download.cc
curl https://github.com/gazebosim/gz-fuel-tools/raw/gz-fuel-tools8/example/CMakeLists.txt -o CMakeLists.txt
```

Let's start by compiling the examples:
@@ -73,7 +73,7 @@ You should see the name of the server followed by its list of models. Here's an
example:

```
[https://fuel.ignitionrobotics.org]
[https://fuel.gazebosim.org]
Beer
Wastebasket
@@ -150,7 +150,7 @@ License name: Creative Commons - Attribution
License URL: http://creativecommons.org/licenses/by/4.0
License image URL: https://i.creativecommons.org/l/by/4.0/88x31.png
Server:
URL: https://fuel.ignitionrobotics.org
URL: https://fuel.gazebosim.org
Version: 1.0
```

0 comments on commit 7df811b

Please sign in to comment.