Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
66106cc
Fix bugs in CameraConfigDialogs
s-nakaoka Nov 14, 2025
3018902
Fix DSMediaView to use AMGetErrorTextW for build compatibility across…
s-nakaoka Nov 17, 2025
4a73fc8
Update .gitignore to exclude build artifacts and IDE settings
s-nakaoka Nov 18, 2025
75e24f1
Add workspace bounds validation with explicit base link position check
s-nakaoka Nov 19, 2025
87e4c14
Implement message output control and improve messages in OMPLPlugin
s-nakaoka Nov 19, 2025
d0955cd
Make Japanese translations for OMPLPlugin
s-nakaoka Nov 19, 2025
1d7c080
Fix numerical IK convergence check to allow temporary error increases
s-nakaoka Nov 7, 2025
2214c3b
Fix joint limit clamping and best-effort mode state preservation in n…
s-nakaoka Nov 7, 2025
f61c8a1
Set body name before loading in BodyItemFileIO to show it in error me…
s-nakaoka Nov 7, 2025
14f3348
Fix best-effort IK to return minimum-error solution across all iterat…
s-nakaoka Nov 17, 2025
f8abc72
Add the parent link property to BodyItem for synchronizing the body p…
s-nakaoka Jun 24, 2025
dde0240
Refactor attachment operations in BodyItem
s-nakaoka Nov 7, 2025
c91a407
Update Japanese translations for BodyPlugin
s-nakaoka Jun 24, 2025
1b587df
Remove lock/unlock processing when attachment state changed
s-nakaoka Nov 10, 2025
bc2cf06
Disalbe FK for attached body
s-nakaoka Nov 17, 2025
0f48d66
Add unified best-effort IK interface to InverseKinematics base class
s-nakaoka Nov 17, 2025
b422b6d
Restrict best effort IK to inverse kinematics with DOF less than 6
s-nakaoka Nov 18, 2025
bd09f5c
Add BodyCollisionDetector::setLinksInAttachmentIgnored
s-nakaoka Nov 20, 2025
4126488
Improve KinematicSimulatorItem to support links attached to parent bo…
s-nakaoka Nov 20, 2025
c0ec846
Unify vertex/material/texture/tint color blending to multiplicative a…
s-nakaoka Nov 21, 2025
29a2f91
Add LinkedJointHandler utility functions to BodyKinematicsKit
s-nakaoka Nov 24, 2025
b0886f3
Fix BodyMotionPlanning and BodyStateValidityChecker to support robot …
s-nakaoka Nov 21, 2025
2c3bbe7
Make BodyState save/restore include all joints including virtual and …
s-nakaoka Nov 21, 2025
849629b
Fix BodyCollisionDetector::setLinksInAttachmentIgnored to include fix…
s-nakaoka Nov 24, 2025
777f43e
Fix BodyStateValidityCheker to correctly handle multiple attached bodies
s-nakaoka Nov 24, 2025
9103a72
Improve BodyStateValidityChecker to report self-collisions separately
s-nakaoka Nov 24, 2025
19b6e76
Update Japanese translations for OMPLPlugin
s-nakaoka Nov 24, 2025
2771d4b
Fix SimpleScanner failing to read lines exceeding 256 bytes on Windows
s-nakaoka Nov 25, 2025
70dad50
Multiply emission color by texture color for Blender COLLADA compatib…
s-nakaoka Nov 27, 2025
4138169
Fix duplicate OpenGL info output when sensor is simulated with multip…
s-nakaoka Nov 27, 2025
e694baa
Add MSAA anti-aliasing support to GLSLSceneRenderer and GLVisionSimul…
s-nakaoka Nov 25, 2025
196333c
Update Japanese translations
s-nakaoka Nov 25, 2025
1bd4d10
Notify currentCameraIndex changes via sigCurrentCameraChanged
s-nakaoka Nov 28, 2025
14649ce
Place builtin cameras at the beginning of the camera list
s-nakaoka Dec 3, 2025
cf2407e
Fix transparent window artifact on Wayland with AMD GPU by filling al…
s-nakaoka Dec 4, 2025
d18004f
Add start step feature to execute program from a specified step
s-nakaoka Dec 5, 2025
a58024c
Update Japanese translations for ManipulatorPlugin
s-nakaoka Dec 5, 2025
b72b3fe
Fix a bug where scene bar is disabled when target scene view is deact…
s-nakaoka Dec 11, 2025
82da4c8
Remove unnecessary process in view focus change
s-nakaoka Dec 11, 2025
b3f3ca9
Fix WorldItem and BodyItem to notiy collision update when collision d…
s-nakaoka Dec 19, 2025
b9ca8cb
Fix various issues in MFMediaView
s-nakaoka Dec 18, 2025
a3cdc58
Remove Python2 support
s-nakaoka Dec 18, 2025
2a11977
Require C++17 as minimum and simplify stdx headers
s-nakaoka Dec 18, 2025
a67e5ff
Use std::clamp instead of stdx::clamp
s-nakaoka Dec 17, 2025
3f6c135
Use std::variant instead of stdx::variant
s-nakaoka Dec 17, 2025
d66213d
Use std::optional instead of stdx::optional
s-nakaoka Dec 18, 2025
cef699f
Use std::filesystem instead of stdx::filesystem
s-nakaoka Dec 18, 2025
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
/core
ext/*
!ext/CMakeLists.txt
/build*/
Makefile
CMakeFiles/
cmake_install.cmake
CMakeCache.txt
/*.cnoid
/tmp/
/.vscode/
*.code-workspace

# Debian build artifacts
debian/choreonoid/
Expand Down
65 changes: 9 additions & 56 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ set(CMAKE_CXX_EXTENSIONS OFF)

# C++ version
if(CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "C++ version number. Specify either 20, 17 or 14.")
set(CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "C++ version number. Specify 20 or 17.")

else()
set(cxx_standard 14)
set(cxx_standard 17)

if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0) # C++20 is supported by CMake 3.12 or later
if(UNIX)
Expand All @@ -105,25 +105,11 @@ else()
endif()
endif()

if(NOT has_cpp20)
if(UNIX)
# C++17 support of GCC 7 is experimental
if(NOT CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8)
check_cxx_compiler_flag("-std=c++17" has_cpp17)
endif()
elseif(MSVC)
check_cxx_compiler_flag("/std:c++17" has_cpp17)
endif()
if(has_cpp17)
set(cxx_standard 17)
endif()
endif()

set(CMAKE_CXX_STANDARD ${cxx_standard} CACHE STRING "C++ version number. Specify either 20, 17 or 14.")
set(CMAKE_CXX_STANDARD ${cxx_standard} CACHE STRING "C++ version number. Specify 20 or 17.")
endif()

if(CMAKE_CXX_STANDARD LESS 14)
message(FATAL_ERROR "Choreonoid requires C++14 or higher.")
if(CMAKE_CXX_STANDARD LESS 17)
message(FATAL_ERROR "Choreonoid requires C++17 or higher.")
endif()

if(UNIX)
Expand Down Expand Up @@ -456,31 +442,14 @@ endif()

option(USE_BUNDLED_PYBIND11 "Use the Pybind11 library bundled with Choreonoid" ON)

option(USE_PYTHON3 "Use Python version 3 instead of version 2" ON)
# for Config.h
if(USE_PYTHON3)
set(CNOID_USE_PYTHON2 OFF)
else()
set(CNOID_USE_PYTHON2 ON)
endif()

set(CHOREONOID_PYTHON_SUBDIR ${CHOREONOID_PLUGIN_SUBDIR}/python)

if(ENABLE_PYTHON)
# The following cache variables must be cleared to update the python version
unset(PYTHON_INCLUDE_DIR CACHE)
unset(PYTHON_LIBRARY CACHE)
unset(PYTHON_LIBRARY_DEBUG CACHE)
if(USE_PYTHON3)
find_package(PythonLibs 3 REQUIRED)
else()
set(Python_ADDITIONAL_VERSIONS 2.7)
find_package(PythonLibs 2 REQUIRED)
if(NOT CMAKE_CXX_STANDARD LESS 17)
message(WARNING "C++14 is used when Python2 is used.")
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ version number. C++14 is used when Python2 is used." FORCE)
endif()
endif()
find_package(PythonLibs 3 REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
list(APPEND CHOREONOID_SDK_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
set(init_py "${PROJECT_BINARY_DIR}/${CHOREONOID_PYTHON_SUBDIR}/cnoid/__init__.py")
Expand Down Expand Up @@ -535,25 +504,9 @@ if(ENABLE_LUA)
set(CHOREONOID_LUA_SUBDIR ${CHOREONOID_PLUGIN_SUBDIR}/lua)
endif()

if(CMAKE_CXX_STANDARD GREATER_EQUAL 17)
if(UNIX)
set(FILESYSTEM_LIBRARY stdc++fs)
endif()
set(has_boost_libs_for_util_libs false)
else()
# boost
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost REQUIRED COMPONENTS system filesystem)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
list(APPEND CHOREONOID_SDK_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
list(APPEND CHOREONOID_SDK_LIBRARY_DIRS ${Boost_LIBRARY_DIRS})
set(FILESYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
if(MSVC)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS BOOST_ALL_DYN_LINK ${BOOST_LIB_DIAGNOSTIC})
install_runtime_dlls(${Boost_LIBRARY_DIRS} ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
endif()
set(has_boost_libs_for_util_libs true)
# C++17 std::filesystem
if(UNIX)
set(FILESYSTEM_LIBRARY stdc++fs)
endif()

# Eigen
Expand Down
5 changes: 0 additions & 5 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ set(modules

set(util_dependencies fmt ${FILESYSTEM_LIBRARY})

if(has_boost_libs_for_util_libs)
set(boost_version ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION})
set(boost_components_for_util_libs system filesystem)
endif()

if(UNIX)
set(CHOREONOID_USE_SUBSYSTEM_CONSOLE false)
elseif(MSVC)
Expand Down
14 changes: 2 additions & 12 deletions cmake/ChoreonoidConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ set(CHOREONOID_DEFAULT_FVISIBILITY_HIDDEN @CHOREONOID_DEFAULT_FVISIBILITY_HIDDEN
set(CHOREONOID_INCLUDE_DIRS "@include_dirs@")
set(CHOREONOID_LIBRARY_DIRS "@library_dirs@")
set(CHOREONOID_INSTALL_SDK @CHOREONOID_INSTALL_SDK@)
set(CHOREONOID_USE_PYTHON2 @CNOID_USE_PYTHON2@)

if(@has_boost_libs_for_util_libs@)
find_package(Boost @boost_version@ EXACT COMPONENTS @boost_components_for_util_libs@)
endif()

add_library(Choreonoid::CnoidUtil SHARED IMPORTED GLOBAL)
if(WIN32)
Expand All @@ -77,13 +72,8 @@ endif()
#target_include_directories(Choreonoid::CnoidUtil INTERFACE ${CHOREONOID_INCLUDE_DIRS})
set_property(TARGET Choreonoid::CnoidUtil APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS
${CHOREONOID_COMPILE_DEFINITIONS})
if(@has_boost_libs_for_util_libs@)
set_property(TARGET Choreonoid::CnoidUtil APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${CHOREONOID_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
else()
set_property(TARGET Choreonoid::CnoidUtil APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${CHOREONOID_INCLUDE_DIRS})
endif()
set_property(TARGET Choreonoid::CnoidUtil APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${CHOREONOID_INCLUDE_DIRS})

target_link_libraries(Choreonoid::CnoidUtil INTERFACE @util_dependencies@)
set(CHOREONOID_UTIL_LIBRARIES Choreonoid::CnoidUtil)
Expand Down
22 changes: 0 additions & 22 deletions include/cnoid/stdx/clamp
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,8 @@

#include <algorithm>

#if __cplusplus >= 201703L

namespace cnoid::stdx {
using std::clamp;
}

#else

namespace cnoid { namespace stdx {
/** Clamp a value in a given interval.
*
* \param value Value to clamp.
* \param lower Lower bound.
* \param upper Upper bound.
*
* \returns clamped value
*/
template<typename T>
constexpr const T clamp(const T& v, const T& low, const T& high)
{
return v < low ? low : (v < high ? v : high);
}
} } // namespace cnoid::stdx

#endif

#endif
106 changes: 6 additions & 100 deletions include/cnoid/stdx/filesystem
Original file line number Diff line number Diff line change
@@ -1,122 +1,28 @@
#ifndef CNOID_STDX_FILESYSTEM_HEADER
#define CNOID_STDX_FILESYSTEM_HEADER

#if __cplusplus > 201402L

#include <chrono>

#if ((defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 8)) || \
(defined(__clang__) && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE < 8)))

#include <experimental/filesystem>
namespace std::experimental::filesystem {

inline path lexically_normal(const path& p){
// lexically_normal or any other normalization functions are not
// implemented in the experimental filesystem implementation
return p;
}

inline path absolute(const path& p, std::error_code& ec)
{
return absolute(p);
}

#else

#include <filesystem>

namespace std::filesystem {

[[deprecated("Use path::lexically_normal() member function instead")]]
inline path lexically_normal(const path& p){
return p.lexically_normal();
}

#endif

[[deprecated("Use std::filesystem::last_write_time() and file_time_type instead")]]
inline std::time_t last_write_time_to_time_t(const path& p){
return std::chrono::duration_cast<std::chrono::system_clock::duration>(
last_write_time(p).time_since_epoch()).count();
}

} // namespace
}

namespace cnoid::stdx {

#if ((defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 8)) || \
(defined(__clang__) && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE < 8)))

namespace filesystem = std::experimental::filesystem;

#else

namespace filesystem = std::filesystem;

#endif

typedef std::error_code error_code;
typedef filesystem::copy_options copy_options;
}

#else // __cplusplus > 201402L

#include <boost/filesystem.hpp>
namespace boost { namespace filesystem {

inline std::time_t last_write_time_to_time_t(const path& p){
return last_write_time(p);
}

#if BOOST_VERSION < 107400
inline path absolute(const path& p, system::error_code& ec)
{
return absolute(p);
}
#endif

inline path lexically_normal(const path& p){
#if BOOST_VERSION < 106000
path n(p);
return n.normalize();
#else
return p.lexically_normal();
#endif
}

inline bool copy_directory_recursively(const path& src, const path& dest, system::error_code& ec)
{
namespace fs = boost::filesystem;

if(!fs::exists(src, ec) || !fs::is_directory(src, ec)){
return false;
}
if(!fs::exists(dest, ec)){
if(!fs::create_directory(dest)){
return false;
}
}
for(fs::directory_iterator it(src); it != fs::directory_iterator(); ++it){
fs::path current(it->path());
if(fs::is_directory(current)){
if(!copy_directory_recursively(current, dest / current.filename(), ec)){
return false;
}
} else {
fs::copy_file(current, dest / current.filename(), ec);
if(ec){
return false;
}
}
}
return true;
using error_code = std::error_code;
using copy_options = std::filesystem::copy_options;
}

} }

namespace cnoid { namespace stdx {
namespace filesystem = boost::filesystem;
typedef boost::system::error_code error_code;
typedef boost::filesystem::copy_option copy_options;
} }
#endif

#endif
38 changes: 6 additions & 32 deletions include/cnoid/stdx/optional
Original file line number Diff line number Diff line change
@@ -1,51 +1,25 @@
#ifndef CNOID_STDX_OPTIONAL_HEADER
#define CNOID_STDX_OPTIONAL_HEADER

#if __cplusplus > 201402L
#include <optional>

namespace cnoid::stdx {

using std::optional;
using std::nullopt;

template<class T, class... Args>
[[deprecated("Use std::optional::emplace() member function instead")]]
T& emplace(optional<T>& opt, Args&&... args){
return opt.emplace(args...);
}
template<class T>
T& emplace(optional<T>& opt){
return opt.emplace();
}

return opt.emplace(std::forward<Args>(args)...);
}

#else
#include <boost/version.hpp>
#include <boost/optional.hpp>
#include <boost/utility/in_place_factory.hpp>
namespace cnoid { namespace stdx {
using boost::optional;
namespace {
#if BOOST_VERSION >= 106000
const boost::none_t nullopt ((boost::none_t::init_tag()));
#else
const boost::none_t& nullopt = boost::detail::optional_detail::none_instance<boost::none_t>::instance;
#endif

template<class T, class... Args>
T& emplace(optional<T>& opt, Args&&... args){
opt = boost::in_place(args...);
return *opt;
}
template<class T>
[[deprecated("Use std::optional::emplace() member function instead")]]
T& emplace(optional<T>& opt){
opt = boost::in_place();
return *opt;
return opt.emplace();
}

}

} }

#endif

#endif
Loading