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

Support Ipopt >= 3.13 #1506

Merged
merged 10 commits into from
Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .ci/travis/docs_versions.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DART 6
v6.9.3
v6.9.5
v6.8.5
v6.7.3
v6.6.2
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## DART 6

### [DART 6.9.5 (2020-XX-XX)](https://github.com/dartsim/dart/milestone/63?closed=1)

* Build

* Added Ipopt >= 3.13 support: [#1506](https://github.com/dartsim/dart/pull/1506)


### [DART 6.9.4 (2020-08-30)](https://github.com/dartsim/dart/milestone/62?closed=1)

* Build
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ endif()
# If you change the version, please update the <version> tag in package.xml.
set(DART_MAJOR_VERSION "6")
set(DART_MINOR_VERSION "9")
set(DART_PATCH_VERSION "4")
set(DART_PATCH_VERSION "5")
set(DART_VERSION "${DART_MAJOR_VERSION}.${DART_MINOR_VERSION}.${DART_PATCH_VERSION}")
set(DART_PKG_DESC "Dynamic Animation and Robotics Toolkit.")
set(DART_PKG_EXTERNAL_DEPS "eigen, ccd, fcl, assimp, boost")
Expand Down
43 changes: 43 additions & 0 deletions dart/optimizer/ipopt/BackwardCompatibility.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2011-2019, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/master/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef DART_OPTIMIZER_IPOPT_BACKWARDCOMPATIBILITY_HPP_
#define DART_OPTIMIZER_IPOPT_BACKWARDCOMPATIBILITY_HPP_

// clang-format off
#define IPOPT_VERSION_GE(x,y,z) \
(IPOPT_VERSION_MAJOR > x || (IPOPT_VERSION_MAJOR >= x && \
(IPOPT_VERSION_MINOR > y || (IPOPT_VERSION_MINOR >= y && \
IPOPT_VERSION_PATCH >= z))))
// clang-format on

#endif // DART_OPTIMIZER_IPOPT_BACKWARDCOMPATIBILITY_HPP_
14 changes: 14 additions & 0 deletions dart/optimizer/ipopt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ dart_generate_include_header_file(
${header_names}
)

# Add definitions for the IpOpt version
string(REPLACE "." ";" ipopt_version_list ${IPOPT_VERSION})
list(GET ipopt_version_list 0 IPOPT_VERSION_MAJOR)
list(GET ipopt_version_list 1 IPOPT_VERSION_MINOR)
list(GET ipopt_version_list 2 IPOPT_VERSION_PATCH)
target_compile_definitions(${target_name}
PUBLIC
IPOPT_VERSION_MAJOR=${IPOPT_VERSION_MAJOR}
IPOPT_VERSION_MINOR=${IPOPT_VERSION_MINOR}
IPOPT_VERSION_PATCH=${IPOPT_VERSION_PATCH}
)

# Install
if(NOT DART_BUILD_DARTPY)
install(
Expand All @@ -36,3 +48,5 @@ if(NOT DART_BUILD_DARTPY)
COMPONENT headers
)
endif()

dart_format_add(${hdrs} ${srcs})
Loading