Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/mjcarroll/bzlmod' into mjcarroll…
Browse files Browse the repository at this point in the history
…/bzlmod
  • Loading branch information
mjcarroll committed Nov 4, 2024
2 parents 8d8a62b + 756dbb3 commit 2a5d633
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 82 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if (BUILD_SDF)
gz_configure_project(
NO_PROJECT_PREFIX
REPLACE_INCLUDE_PATH sdf
VERSION_SUFFIX pre2)
VERSION_SUFFIX)

#################################################
# Find tinyxml2.
Expand Down
8 changes: 7 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
## libsdformat 15.X

### libsdformat 15.0.0 (2024-09-XX)
### libsdformat 15.0.0 (2024-09-25)

1. **Baseline:** this includes all changes from 14.5.0 and earlier.

1. Use colcon for Windows building compilation
* [Pull request #1481](https://github.com/gazebosim/sdformat/pull/1481)

1. Spec 1.12: link_state, joint_state changes
* [Pull request #1461](https://github.com/gazebosim/sdformat/pull/1461)

1. Fix symbol checking test when compiled with debug symbols
* [Pull request #1474](https://github.com/gazebosim/sdformat/pull/1474)

Expand Down
17 changes: 7 additions & 10 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,18 @@ bazel_dep(name = "rules_license", version = "0.0.8")
bazel_dep(name = "tinyxml2", version = "10.0.0")

# Gazebo Dependencies
bazel_dep(name = "rules_gazebo")
bazel_dep(name = "rules_gazebo", version = "0.0.2")
bazel_dep(name = "gz-utils")
bazel_dep(name = "gz-math")

local_path_override(
module_name = "rules_gazebo",
path = "/usr/local/google/home/mjcarroll/workspaces/gz_ionic_bazel/rules_gazebo",
)

local_path_override(
archive_override(
module_name = "gz-utils",
path = "/usr/local/google/home/mjcarroll/workspaces/gz_ionic_bazel/gz-utils",
strip_prefix = "gz-utils-gz-utils3",
urls = ["https://github.com/gazebosim/gz-utils/archive/refs/heads/gz-utils3.tar.gz"],
)

local_path_override(
archive_override(
module_name = "gz-math",
path = "/usr/local/google/home/mjcarroll/workspaces/gz_ionic_bazel/gz-math",
strip_prefix = "gz-math-gz-math8",
urls = ["https://github.com/gazebosim/gz-math/archive/refs/heads/gz-math8.tar.gz"],
)
122 changes: 52 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ sudo apt-get update
sudo apt install libsdformat<#>-dev libsdformat<#>
```

Be sure to replace `<#>` with a number value, such as 2 or 3, depending on
Be sure to replace `<#>` with a number value, such as 14 or 15, depending on
which version you need, or leave it empty for version 1.

### macOS

On macOS, add OSRF packages:
On macOS, after installing the [Homebrew package manager](https://brew.sh),
add OSRF packages:
```sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew tap osrf/simulation
```

Expand All @@ -82,7 +82,7 @@ Install sdformat:
brew install sdformat<#>
```

Be sure to replace `<#>` with a number value, such as 1 or 2, depending on
Be sure to replace `<#>` with a number value, such as 14 or 15, depending on
which version you need.

### Windows
Expand Down Expand Up @@ -126,7 +126,26 @@ Clone the repository
```sh
git clone https://github.com/gazebosim/sdformat -b sdf<#>
```
Be sure to replace `<#>` with a number value, such as 1 or 2, depending on
Be sure to replace `<#>` with a number value, such as 14 or 15, depending on
which version you need.

### Install dependencies

#### Ubuntu

```sh
cd sdformat
sudo apt -y install \
$(sort -u $(find . -iname 'packages-'`lsb_release -cs`'.apt' -o -iname 'packages.apt' | tr '\n' ' '))
```

#### macOS

```sh
brew install --only-dependencies sdformat<#>
```

Be sure to replace `<#>` with a number value, such as 14 or 15, depending on
which version you need.

### Build from Source
Expand All @@ -144,12 +163,10 @@ make install

sdformat supported cmake parameters at configuring time:

* `USE_INTERNAL_URDF` (`bool`) [default `False`] <br/>
Use an internal copy of urdfdom 1.0.0 instead of look for one
installed in the system
* `USE_UPSTREAM_CFLAGS` (`bool`) [default `True`] <br/>
Use the sdformat team compilation flags instead of the common set defined
by cmake.
| Name | Type | Default | Description |
|-----------------------|------|----------|--------------------------------------|
| `USE_INTERNAL_URDF` | BOOL | False | Use an internal copy of urdfdom 1.0.0 instead of looking for one installed in the system |
| `USE_UPSTREAM_CFLAGS` | BOOL | True | Use the sdformat team compilation flags instead of the common set defined by cmake. |

## Uninstallation

Expand All @@ -160,44 +177,6 @@ cd build
make uninstall
```

## macOS

### Prerequisites

Clone the repository
```sh
git clone https://github.com/gazebosim/sdformat -b sdf<#>
```
Be sure to replace `<#>` with a number value, such as 1 or 2, depending on
which version you need.

Install dependencies
```sh
brew install --only-dependencies sdformat<#>
```

### Build from Source

1. Configure and build
```sh
cd sdformat
mkdir build
cd build
cmake .. # Consider specifying -DCMAKE_INSTALL_PREFIX=...
make
```

2. Optionally, install and uninstall
```sh
sudo make install
```

To uninstall the software installed with the previous steps:
```sh
cd build/
sudo make uninstall
```

## Windows

### Prerequisites
Expand All @@ -213,34 +192,37 @@ conda activate gz-ws

Install prerequisites:
```
conda install tinyxml2 urdfdom --channel conda-forge
conda install cmake git vcstool colcon-common-extensions ^
tinyxml2 urdfdom pybind11 -channel conda-forge
```

Install Gazebo dependencies:
### Getting the sources and building from Source

You can view lists of dependencies:
```
conda search libsdformat --channel conda-forge --info
```
Be sure to replace `<#>` with a number value, such as 14 or 15, depending on
which version you need.

1. Getting the sources

Install dependencies, replacing `<#>` with the desired versions:
```
conda install libgz-cmake<#> libgz-math<#> libgz-tools<#> libgz-utils<#> --channel conda-forge
mkdir ws\src
cd ws
vcs import src --input https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/sdformat<#>.yaml
```

### Build from Source
2. Build from source

This assumes you have created and activated a Conda environment while installing the Prerequisites.
Note: the Gazebo library dependencies are going to be compiled from source
with sdformat although it should be possible to install them from
conda-forge on stable Gazebo releases using the standard conda install
command.

1. Configure and build
```
mkdir build
cd build
cmake .. -DBUILD_TESTING=OFF # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install
cmake --build . --config Release
```
Build the gazebo libraries needed as dependencies (skip testing to speed up the compilation)
using the [colcon](https://colcon.readthedocs.io/en/released/) tool:
```
colcon build --cmake-args -DBUILD_TESTING=OFF --merge-install --packages-skip sdformat<#>
```

2. Install
```
cmake --install . --config Release
```
Build sdformat with its test suite:
```
colcon build --cmake-args -DBUILD_TESTING=ON --merge-install --packages-select sdformat<#>
```

0 comments on commit 2a5d633

Please sign in to comment.