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

Merge 6 -> 7 (all of it) #380

Merged
merged 32 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f564c74
Added AxisAlignedBox pybind11 interface (#338)
ahcorde Dec 28, 2021
fc9fb78
Added MassMatrix3 pybind11 interface (#345)
ahcorde Dec 28, 2021
c2ce7d4
Add DiffDriveOdometry pybind11 interface and examples (#314)
ahcorde Dec 28, 2021
85224e3
Added Temperature pybind11 interface (#330)
ahcorde Dec 28, 2021
3d1d076
Added PID pybind11 interface (#323)
ahcorde Dec 29, 2021
9c28568
Added Matrix4 pybind11 interface (#337)
ahcorde Dec 29, 2021
5283016
Added Inertial pybind11 interface (#349)
ahcorde Dec 29, 2021
5d2f924
Added OrientedBox pybind11 interface (#350)
ahcorde Dec 29, 2021
49c82e7
Added Cylinder pybind11 interface (#348)
ahcorde Dec 29, 2021
b148af5
Added Plane pybind11 interface (#346)
ahcorde Dec 29, 2021
8ec7478
Added Frustum pybind11 interface (#353)
ahcorde Dec 29, 2021
f2b462d
Added Sphere pybind11 interface (#352)
ahcorde Dec 30, 2021
3fc159b
Added SignalStats pybind11 interface (#343)
ahcorde Dec 30, 2021
5e25570
Small fixed in doxygen (#355)
ahcorde Dec 30, 2021
5fa6f78
kmeans example in cpp and python (#356)
ahcorde Dec 30, 2021
4a9374f
Added Vector3Stats pybind11 interface (#351)
ahcorde Dec 30, 2021
2926fb9
Added SphericalCoordinates pybind11 interface (#357)
ahcorde Dec 30, 2021
d74c2e9
Move SWIG interfaces from python to ruby (#354)
ahcorde Dec 30, 2021
ff55578
6.9.3-pre (#359)
ahcorde Jan 4, 2022
1c4a9f7
Added Python Getting started tutorial (#362)
ahcorde Jan 7, 2022
4b25160
Fix Focal on Jenkins (#364)
chapulina Jan 7, 2022
fa67ea8
Refactor finding pybind11 (#360)
chapulina Jan 11, 2022
3ade9b1
Use const instead of constexpr in Ellipsoid constructor (#366)
adlarkin Jan 13, 2022
5be7da9
🎈 6.9.3~pre2 (#367)
chapulina Jan 13, 2022
ceab8c7
Fix pybind11 issues with macOS (#361)
scpeters Jan 26, 2022
286a5d4
🎈 6.10.0 (#369)
chapulina Jan 26, 2022
3d0b05c
Reduce memory required to compile pybind11 interface (#371)
scpeters Jan 28, 2022
3c8a8fa
More pybind11 compilation memory savings (#373)
scpeters Feb 3, 2022
d5155d2
Add Ubuntu Jammy CI (#32) (#378)
scpeters Feb 17, 2022
6e6d83d
Merge tag 'ignition-math6_6.9.3-pre1' into merge_693pre1_main
scpeters Feb 25, 2022
6d0f42c
Merge branch 'ign-math6' into merge_693pre1_main
scpeters Feb 26, 2022
bb54720
Fix build errors and pybind11 tests (#380)
scpeters Feb 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/ci/packages.apt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ python3-distutils
python3-pybind11
ruby-dev
swig
python3-pybind11
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ jobs:
with:
cpplint-enabled: true
cppcheck-enabled: true
jammy-ci:
runs-on: ubuntu-latest
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@jammy
25 changes: 18 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,26 @@ if (SWIG_FOUND)
else()
message (STATUS "Searching for Ruby - found version ${RUBY_VERSION}.")
endif()
endif()

########################################
# Include python
find_package(PythonInterp 3 REQUIRED) # change to Python3 when Bionic is EOL
find_package(PythonLibs QUIET)
if (NOT PYTHONLIBS_FOUND)
message (STATUS "Searching for Python - not found.")
########################################
# Python bindings
include(IgnPython)
find_package(PythonLibs QUIET)
if (NOT PYTHONLIBS_FOUND)
IGN_BUILD_WARNING("Python is missing: Python interfaces are disabled.")
message (STATUS "Searching for Python - not found.")
else()
message (STATUS "Searching for Python - found version ${PYTHONLIBS_VERSION_STRING}.")

set(PYBIND11_PYTHON_VERSION 3)
find_package(pybind11 2.2 QUIET)

if (${pybind11_FOUND})
message (STATUS "Searching for pybind11 - found version ${pybind11_VERSION}.")
else()
message (STATUS "Searching for Python - found version ${PYTHONLIBS_VERSION_STRING}.")
IGN_BUILD_WARNING("pybind11 is missing: Python interfaces are disabled.")
message (STATUS "Searching for pybind11 - not found.")
endif()
endif()

Expand Down
160 changes: 160 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,166 @@ instead.

### Ignition Math 6.x.x

## Ignition Math 6.10.0 (2022-01-26)

1. Use const instead of constexpr in Ellipsoid constructor
* [Pull request #366](https:/ignitionrobotics/ign-math/pull/366)

1. Refactor finding pybind11
* [Pull request #360](https:/ignitionrobotics/ign-math/pull/360)

1. Fix Focal on Jenkins
* [Pull request #364](https:/ignitionrobotics/ign-math/pull/364)

1. kmeans example in C++ and Python
* [Pull request #356](https:/ignitionrobotics/ign-math/pull/356)

1. Small fixed in doxygen
* [Pull request #355](https:/ignitionrobotics/ign-math/pull/355)

1. Added Python Getting started tutorial
* [Pull request #362](https:/ignitionrobotics/ign-math/pull/362)

1. Move SWIG interfaces from Python to Ruby
* [Pull request #354](https:/ignitionrobotics/ign-math/pull/354)

1. Added pybind11 interfaces for various classes
1. SphericalCoordinates
* [Pull request #357](https:/ignitionrobotics/ign-math/pull/357)
1. Vector3Stats
* [Pull request #351](https:/ignitionrobotics/ign-math/pull/351)
1. SignalStats
* [Pull request #343](https:/ignitionrobotics/ign-math/pull/343)
1. Sphere
* [Pull request #352](https:/ignitionrobotics/ign-math/pull/352)
1. Frustum
* [Pull request #353](https:/ignitionrobotics/ign-math/pull/353)
1. Plane
* [Pull request #346](https:/ignitionrobotics/ign-math/pull/346)
1. Cylinder
* [Pull request #348](https:/ignitionrobotics/ign-math/pull/348)
1. OrientedBox
* [Pull request #276](https:/ignitionrobotics/ign-math/pull/276)
* [Pull request #350](https:/ignitionrobotics/ign-math/pull/350)
1. Inertial
* [Pull request #349](https:/ignitionrobotics/ign-math/pull/349)
1. Matrix4
* [Pull request #337](https:/ignitionrobotics/ign-math/pull/337)
1. PID
* [Pull request #323](https:/ignitionrobotics/ign-math/pull/323)
* [Pull request #361](https:/ignitionrobotics/ign-math/pull/361)
1. Temperature
* [Pull request #330](https:/ignitionrobotics/ign-math/pull/330)
1. DiffDriveOdometry (with examples)
* [Pull request #314](https:/ignitionrobotics/ign-math/pull/314)
1. MassMatrix3
* [Pull request #345](https:/ignitionrobotics/ign-math/pull/345)
1. AxisAlignedBox
* [Pull request #338](https:/ignitionrobotics/ign-math/pull/338)
* [Pull request #281](https:/ignitionrobotics/ign-math/pull/281)
1. GaussMarkovProcess (with examples)
* [Pull request #315](https:/ignitionrobotics/ign-math/pull/315)
1. RotationSpline
* [Pull request #339](https:/ignitionrobotics/ign-math/pull/339)
1. Material
* [Pull request #340](https:/ignitionrobotics/ign-math/pull/340)
1. Kmeans
* [Pull request #341](https:/ignitionrobotics/ign-math/pull/341)
1. Triangle3
* [Pull request #335](https:/ignitionrobotics/ign-math/pull/335)
1. Pose3
* [Pull request #334](https:/ignitionrobotics/ign-math/pull/334)
1. Triangle
* [Pull request #333](https:/ignitionrobotics/ign-math/pull/333)
1. Spline
* [Pull request #332](https:/ignitionrobotics/ign-math/pull/332)
1. Filter
* [Pull request #336](https:/ignitionrobotics/ign-math/pull/336)
1. SemanticVersion
* [Pull request #331](https:/ignitionrobotics/ign-math/pull/331)
1. Matrix3
* [Pull request #325](https:/ignitionrobotics/ign-math/pull/325)
1. MovingWindowFilter
* [Pull request #321](https:/ignitionrobotics/ign-math/pull/321)
1. Line3
* [Pull request #317](https:/ignitionrobotics/ign-math/pull/317)
1. Quaternion
* [Pull request #324](https:/ignitionrobotics/ign-math/pull/324)
* [Pull request #361](https:/ignitionrobotics/ign-math/pull/361)
1. StopWatch
* [Pull request #319](https:/ignitionrobotics/ign-math/pull/319)
1. RollingMean
* [Pull request #322](https:/ignitionrobotics/ign-math/pull/322)
1. Line2
* [Pull request #316](https:/ignitionrobotics/ign-math/pull/316)
1. Color
* [Pull request #318](https:/ignitionrobotics/ign-math/pull/318)
1. Helpers
* [Pull request #313](https:/ignitionrobotics/ign-math/pull/313)
1. Rand (with examples)
* [Pull request #312](https:/ignitionrobotics/ign-math/pull/312)
1. Angle
* [Pull request #311](https:/ignitionrobotics/ign-math/pull/311)
1. Vector2, Vector3 and Vector4
* [Pull request #280](https:/ignitionrobotics/ign-math/pull/280)

1. Fix Color::HSV() incorrect hue output
* [Pull request #320](https:/ignitionrobotics/ign-math/pull/320)

1. Add example and modify document for class Color
* [Pull request #304](https:/ignitionrobotics/ign-math/pull/304)

1. Document that euler angles should be in radians for quaternion constructor
* [Pull request #298](https:/ignitionrobotics/ign-math/pull/298)

1. Fix windows warnings in Vector2, 3 and 4
* [Pull request #284](https:/ignitionrobotics/ign-math/pull/284)

1. Modified cmake target name for Ruby interfaces
* [Pull request #285](https:/ignitionrobotics/ign-math/pull/285)

1. Frustrum Python interface
* [Pull request #278](https:/ignitionrobotics/ign-math/pull/278)

1. quaternion_from_euler example: input degrees
* [Pull request #282](https:/ignitionrobotics/ign-math/pull/282)

1. Internal URL fixed (paragraph 266)
* [Pull request #279](https:/ignitionrobotics/ign-math/pull/279)

1. Added tutorials for vector, angle, triangle and rotation
* [Pull request #249](https:/ignitionrobotics/ign-math/pull/249)

1. Inertial Python interface
* [Pull request #275](https:/ignitionrobotics/ign-math/pull/275)

1. Box Python interfaces
* [Pull request #273](https:/ignitionrobotics/ign-math/pull/273)

1. DiffDriveOdometry Python interface
* [Pull request #265](https:/ignitionrobotics/ign-math/pull/265)

1. Sphere Python interface
* [Pull request #277](https:/ignitionrobotics/ign-math/pull/277)

1. Plane Python interfaces
* [Pull request #272](https:/ignitionrobotics/ign-math/pull/272)

1. Cylinder Python interface
* [Pull request #274](https:/ignitionrobotics/ign-math/pull/274)

1. Added SphericalCoordinates Python interface
* [Pull request #263](https:/ignitionrobotics/ign-math/pull/263)

1. MassMatrix3 Python interface
* [Pull request #260](https:/ignitionrobotics/ign-math/pull/260)

1. AxisAlignedBox Python interface
* [Pull request #262](https:/ignitionrobotics/ign-math/pull/262)

1. AxisAlignedBox: deprecate unimplemented methods
* [Pull request #261](https:/ignitionrobotics/ign-math/pull/261)

## Ignition Math 6.9.2 (2021-10-14)

1. Added StopWatch Python Interface
Expand Down
6 changes: 6 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ target_link_libraries(angle_example ignition-math${IGN_MATH_VER}::ignition-math$
add_executable(color_example color_example.cc)
target_link_libraries(color_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})

add_executable(diff_drive_odometry diff_drive_odometry.cc)
target_link_libraries(diff_drive_odometry ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})

add_executable(gauss_markov_process gauss_markov_process_example.cc)
target_link_libraries(gauss_markov_process ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})

Expand All @@ -21,6 +24,9 @@ target_link_libraries(graph_example ignition-math${IGN_MATH_VER}::ignition-math$
add_executable(helpers_example helpers_example.cc)
target_link_libraries(helpers_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})

add_executable(kmeans kmeans.cc)
target_link_libraries(kmeans ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})

add_executable(matrix3_example matrix3_example.cc)
target_link_libraries(matrix3_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})

Expand Down
2 changes: 1 addition & 1 deletion examples/angle_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# installed.
#
# Modify the PYTHONPATH environment variable to include the ignition math
# library install path. For example, if you install to /user:
# library install path. For example, if you install to /usr:
#
# $ export PYTHONPATH=/usr/lib/python:$PYTHONPATH
#
Expand Down
97 changes: 97 additions & 0 deletions examples/diff_drive_odometry.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*
* Copyright (C) 2021 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
//! [complete]
#include <iostream>
#include <chrono>

#include <ignition/math/Angle.hh>
#include <ignition/math/Helpers.hh>
#include <ignition/math/DiffDriveOdometry.hh>

int main(int argc, char **argv)
{

//! [Create a DiffDriveOdometry]
ignition::math::DiffDriveOdometry odom;
//! [Create an DiffDriveOdometry]

double wheelSeparation = 2.0;
double wheelRadius = 0.5;
double wheelCircumference = 2 * IGN_PI * wheelRadius;

// This is the linear distance traveled per degree of wheel rotation.
double distPerDegree = wheelCircumference / 360.0;

// Setup the wheel parameters, and initialize
odom.SetWheelParams(wheelSeparation, wheelRadius, wheelRadius);
auto startTime = std::chrono::steady_clock::now();
odom.Init(startTime);

// Sleep for a little while, then update the odometry with the new wheel
// position.
std::cout << "--- Rotate both wheels by 1 degree. ---" << '\n';
auto time1 = startTime + std::chrono::milliseconds(100);
odom.Update(IGN_DTOR(1.0), IGN_DTOR(1.0), time1);

std::cout << "\tLinear velocity:\t" << distPerDegree / 0.1 << " m/s"
<< "\n\tOdom linear velocity:\t" << odom.LinearVelocity() << " m/s"
<< std::endl;

std::cout << "Angular velocity should be zero since the \"robot\" is traveling\n"
<< "in a straight line:\n"
<< "\tOdom angular velocity:\t"
<< *odom.AngularVelocity() << " rad/s" << std::endl;

// Sleep again, this time rotate the left wheel by 1 and the right wheel by 2
// degrees.
std::cout << "--- This time rotate the left wheel by 1 and the right wheel "
<< "by 2 degrees ---"
<< std::endl;
auto time2 = time1 + std::chrono::milliseconds(100);
odom.Update(IGN_DTOR(2.0), IGN_DTOR(3.0), time2);

std::cout << "The heading should be the arc tangent of the linear distance\n"
<< "traveled by the right wheel (the left wheel was stationary)\n"
<< "divided by the wheel separation.\n"
<< "\tHeading:\t\t" << atan2(distPerDegree, wheelSeparation) << " rad"
<< "\n\tOdom Heading:\t\t" << *odom.Heading() << " rad" << '\n';

// The X odom reading should have increased by the sine of the heading *
// half the wheel separation.
double xDistTraveled =
sin(atan2(distPerDegree, wheelSeparation)) * wheelSeparation * 0.5;
double prevXPos = distPerDegree * 2.0;
std::cout << "\tX distance traveled:\t" << xDistTraveled + prevXPos << " m"
<< "\n\tOdom X:\t\t" << odom.X() << " m" << std::endl;

// The Y odom reading should have increased by the cosine of the heading *
// half the wheel separation.
double yDistTraveled = (wheelSeparation * 0.5) -
cos(atan2(distPerDegree, wheelSeparation)) * wheelSeparation * 0.5;
double prevYPos = 0.0;
std::cout << "\tY distance traveled:\t" << yDistTraveled + prevYPos << " m"
<< "\n\tOdom Y:\t\t" << odom.Y() << " m" << std::endl;

std::cout << "Angular velocity should be the difference between the x and y\n"
<< "distance traveled divided by the wheel separation divided by\n"
<< "the seconds elapsed.\n"
<< "\tAngular velocity:\t"
<< ((xDistTraveled - yDistTraveled) / wheelSeparation) / 0.1 << " rad/s"
<< "\n\tOdom angular velocity:\t" << *odom.AngularVelocity() << " rad/s"
<< std::endl;
}
//! [complete]
Loading