Skip to content

Commit

Permalink
Bumps in garden: use ign-math7 (#803)
Browse files Browse the repository at this point in the history
* Address ign-math7 deprecations

Signed-off-by: Louise Poubel <[email protected]>

* Expext 0 instead of -0 in tests
  Caused by gazebosim/gz-math#206
* macos workflow: try to checkout ci_matching_branch
* macOS workflow: remove swig to fix ignition-math7 build

Signed-off-by: Steve Peters <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
  • Loading branch information
chapulina and scpeters authored Dec 29, 2021
1 parent 4a7d129 commit 1495b3f
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
libignition-cmake2-dev
libignition-math6-dev
libignition-math7-dev
libignition-tools-dev
libignition-utils1-dev
libtinyxml2-dev
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,26 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- run: brew config
- run: brew list

- name: Install base dependencies
run: |
brew tap osrf/simulation;
# check for ci_matching_branch
brew install wget
wget https://github.com/ignition-tooling/release-tools/raw/master/jenkins-scripts/tools/detect_ci_matching_branch.py
TRY_BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
if python3 detect_ci_matching_branch.py ${TRY_BRANCH}
then
echo "# BEGIN SECTION: trying to checkout branch ${TRY_BRANCH} from osrf/simulation"
pushd $(brew --repo osrf/simulation)
git fetch origin ${TRY_BRANCH} || true
git checkout ${TRY_BRANCH} || true
popd
echo '# END SECTION'
fi
# ignition-math7 has problems with swig, remove it for now
brew remove swig || true
brew install --only-dependencies ${PACKAGE};
- run: mkdir build
Expand Down
10 changes: 5 additions & 5 deletions cmake/SearchForStuff.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ set(IGN_CMAKE_VER ${ignition-cmake2_VERSION_MAJOR})
########################################
# Find ignition math
# Set a variable for generating ProjectConfig.cmake
find_package(ignition-math6 6.8 QUIET)
if (NOT ignition-math6_FOUND)
message(STATUS "Looking for ignition-math6-config.cmake - not found")
BUILD_ERROR ("Missing: Ignition math (libignition-math6-dev)")
find_package(ignition-math7 QUIET)
if (NOT ignition-math7_FOUND)
message(STATUS "Looking for ignition-math7-config.cmake - not found")
BUILD_ERROR ("Missing: Ignition math (libignition-math7-dev)")
else()
set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR})
set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR})
message(STATUS "Looking for ignition-math${IGN_MATH_VER}-config.cmake - found")
endif()

Expand Down
2 changes: 1 addition & 1 deletion configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


:: Install dependencies
call %win_lib% :install_ign_project ign-math ign-math6
call %win_lib% :install_ign_project ign-math main

:: Set configuration variables
@set build_type=Release
Expand Down
4 changes: 2 additions & 2 deletions src/Light.cc
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ ignition::math::Angle Light::SpotInnerAngle() const
/////////////////////////////////////////////////
void Light::SetSpotInnerAngle(const ignition::math::Angle &_angle)
{
this->dataPtr->spotInnerAngle.Radian(std::max(0.0, _angle.Radian()));
this->dataPtr->spotInnerAngle.SetRadian(std::max(0.0, _angle.Radian()));
}

/////////////////////////////////////////////////
Expand All @@ -423,7 +423,7 @@ ignition::math::Angle Light::SpotOuterAngle() const
/////////////////////////////////////////////////
void Light::SetSpotOuterAngle(const ignition::math::Angle &_angle)
{
this->dataPtr->spotOuterAngle.Radian(std::max(0.0, _angle.Radian()));
this->dataPtr->spotOuterAngle.SetRadian(std::max(0.0, _angle.Radian()));
}

/////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion test/integration/nested_model_with_frames_expected.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<pose>1 0 0 0 0 0</pose>
</link>
</model>
<pose>10 0 0 0 -0 1.5708</pose>
<pose>10 0 0 0 0 1.5708</pose>
</model>
</model>
</world>
Expand Down
2 changes: 1 addition & 1 deletion test/integration/print_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ R"(<model name="m2">
const std::string expectedIncludeMerge =
R"(<model name='m2'>
<frame name='_merged__test_box2__model__' attached_to='link'>
<pose relative_to='__model__'>0 0 0.5 0 -0 0</pose>
<pose relative_to='__model__'>0 0 0.5 0 0 0</pose>
</frame>
<link name='link'>
<collision name='collision'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</model>
<pose>0 10 0 1.570796326794895 0 0</pose>
</model>
<pose>10 0 0 0 -0 1.5708</pose>
<pose>10 0 0 0 0 1.5708</pose>
</model>
</model>
</world>
Expand Down

0 comments on commit 1495b3f

Please sign in to comment.