Skip to content

Commit c1edbf5

Browse files
committed
Merge remote-tracking branch 'origin/main' into issue/465_closed_kinematic_changes
2 parents 39b7a7d + e0f2c4e commit c1edbf5

File tree

201 files changed

+1237
-1867
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+1237
-1867
lines changed

.devcontainer/Dockerfile

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,51 @@
1-
FROM jslee02/dart-dev:ubuntu-jammy-v6.16
1+
FROM ubuntu:questing
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
5+
SHELL ["/bin/bash", "-c"]
6+
7+
# Build tools
8+
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
9+
build-essential \
10+
clang \
11+
clang-format-14 \
12+
cmake \
13+
curl \
14+
doxygen \
15+
git \
16+
lcov \
17+
lsb-release \
18+
ninja-build \
19+
pkg-config \
20+
software-properties-common \
21+
valgrind
22+
23+
# DART required dependencies
24+
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
25+
libassimp-dev \
26+
libeigen3-dev \
27+
libfcl-dev \
28+
libfmt-dev
29+
30+
# DART optional dependencies
31+
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
32+
libtinyxml2-dev \
33+
liburdfdom-dev \
34+
liburdfdom-headers-dev \
35+
libopenscenegraph-dev \
36+
liboctomap-dev \
37+
libode-dev \
38+
libimgui-dev \
39+
libspdlog-dev
40+
41+
# Python binding dependencies
42+
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
43+
libpython3-dev \
44+
python3 \
45+
python3-dev \
46+
python3-numpy \
47+
python3-pip \
48+
python3-pytest \
49+
python3-setuptools && \
50+
PIP_BREAK_SYSTEM_PACKAGES=1 pip3 install --no-cache-dir --ignore-installed nanobind pytest -U && \
51+
rm -rf /var/lib/apt/lists/*

.github/workflows/cache_docker.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ else()
205205
dart_option(BUILD_SHARED_LIBS "Build shared libraries" ON CATEGORY build)
206206
endif()
207207
dart_option(DART_BUILD_DARTPY "Build dartpy" OFF CATEGORY build)
208-
dart_option(DART_BUILD_GUI "Build osgDart library" ON CATEGORY build)
208+
dart_option(DART_BUILD_GUI "Build GUI library" ON CATEGORY build)
209209
dart_option(DART_BUILD_COLLISION_BULLET "Embed the Bullet collision backend into the core dart target" OFF CATEGORY build)
210210
dart_option(DART_BUILD_COLLISION_ODE "Embed the ODE collision backend into the core dart target" OFF CATEGORY build)
211211
dart_option(DART_BUILD_EXAMPLES "Build example targets" ON CATEGORY build)
@@ -555,7 +555,7 @@ if(DART_VERBOSE)
555555
message(STATUS "Compiler version : ${CMAKE_CXX_COMPILER_VERSION}")
556556
message(STATUS "Build type : ${CMAKE_BUILD_TYPE}")
557557
message(STATUS "BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
558-
message(STATUS "Build gui (OSG) : ${DART_BUILD_GUI}")
558+
message(STATUS "Build gui : ${DART_BUILD_GUI}")
559559
message(STATUS "Install path : ${CMAKE_INSTALL_PREFIX}")
560560
message(STATUS "CXX_FLAGS : ${CMAKE_CXX_FLAGS}")
561561
if(CMAKE_BUILD_TYPE_UPPERCASE STREQUAL "RELEASE")

dart/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${DART_BINARY_DIR}/lib")
3737
# gui, [assimp, eigen3, fcl, fmt]
3838
# dart-utils - {dart}, utils, utils/sdf, [tinyxml2]
3939
# dart-utils-urdf - {dart-utils}, utils/urdf, [urdfdom]
40-
# dart-gui - {dart-utils}, gui/osg, gui/osg/render, [openscenegraph]
40+
# dart-gui - {dart-utils}, gui, gui/render, [openscenegraph]
4141

4242
#===============================================================================
4343
# Components - (dependency component), {dependency targets}

dart/collision/bullet/BulletCollisionGroup.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
#include "dart/collision/bullet/BulletCollisionObject.hpp"
3737
#include "dart/collision/bullet/detail/BulletCollisionDispatcher.hpp"
3838

39+
#include <BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h>
40+
3941
#if !defined(_WIN32)
4042
#include <LinearMath/btAlignedAllocator.h>
4143

@@ -180,7 +182,8 @@ BulletCollisionGroup::BulletCollisionGroup(
180182
mBulletCollisionConfiguration.get()))
181183
{
182184
ensureBulletAllocator();
183-
// Do nothing
185+
btGImpactCollisionAlgorithm::registerAlgorithm(
186+
static_cast<btCollisionDispatcher*>(mBulletDispatcher.get()));
184187
}
185188

186189
//==============================================================================

dart/collision/fcl/FCLCollisionDetector.cpp

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -985,21 +985,18 @@ FCLCollisionDetector::createFCLCollisionGeometry(
985985
// Use mesh since FCL doesn't support pyramid shape.
986986
geom = createPyramid<fcl::OBBRSS>(*pyramid, fcl::getTransform3Identity());
987987
} else if (PlaneShape::getStaticType() == shapeType) {
988-
if (FCLCollisionDetector::PRIMITIVE == type) {
989-
DART_ASSERT(dynamic_cast<const PlaneShape*>(shape.get()));
990-
auto plane = static_cast<const PlaneShape*>(shape.get());
991-
const Eigen::Vector3d normal = plane->getNormal();
992-
const double offset = plane->getOffset();
993-
994-
geom = new fcl::Halfspace(FCLTypes::convertVector3(normal), offset);
995-
} else {
996-
geom = createCube<fcl::OBBRSS>(1000.0, 0.0, 1000.0);
997-
998-
DART_WARN(
999-
"[FCLCollisionDetector] PlaneShape is not supported by "
1000-
"FCLCollisionDetector. We create a thin box mesh instead, where the "
1001-
"size is [1000 0 1000].");
1002-
}
988+
DART_ASSERT(dynamic_cast<const PlaneShape*>(shape.get()));
989+
const auto plane = static_cast<const PlaneShape*>(shape.get());
990+
const Eigen::Vector3d normal = plane->getNormal();
991+
const double offset = plane->getOffset();
992+
993+
geom = new fcl::Halfspace(FCLTypes::convertVector3(normal), offset);
994+
995+
DART_WARN_ONCE_IF(
996+
FCLCollisionDetector::MESH == type,
997+
"[FCLCollisionDetector] PlaneShape requested with primitive shape type "
998+
"MESH. Using analytic halfspace instead of the previous thin-box "
999+
"fallback to keep plane collisions reliable.");
10031000
} else if (MeshShape::getStaticType() == shapeType) {
10041001
DART_ASSERT(dynamic_cast<const MeshShape*>(shape.get()));
10051002

dart/dynamics/EulerJoint.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class DART_API EulerJoint : public detail::EulerJointBase
9090
/// Set the axis order
9191
/// @param[in] _order Axis order
9292
/// @param[in] _renameDofs If true, the names of dofs in this joint will be
93-
/// renmaed according to the axis order.
93+
/// renamed according to the axis order.
9494
void setAxisOrder(AxisOrder _order, bool _renameDofs = true);
9595

9696
/// Return the axis order

dart/dynamics/PlanarJoint.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,25 @@ class DART_API PlanarJoint : public detail::PlanarJointBase
100100

101101
/// @brief Set plane type as XY-plane
102102
/// @param[in] _renameDofs If true, the names of dofs in this joint will be
103-
/// renmaed according to the plane type.
103+
/// renamed according to the plane type.
104104
void setXYPlane(bool _renameDofs = true);
105105

106106
/// @brief Set plane type as YZ-plane
107107
/// @param[in] _renameDofs If true, the names of dofs in this joint will be
108-
/// renmaed according to the plane type.
108+
/// renamed according to the plane type.
109109
void setYZPlane(bool _renameDofs = true);
110110

111111
/// @brief Set plane type as ZX-plane
112112
/// @param[in] _renameDofs If true, the names of dofs in this joint will be
113-
/// renmaed according to the plane type.
113+
/// renamed according to the plane type.
114114
void setZXPlane(bool _renameDofs = true);
115115

116116
/// @brief Set plane type as arbitrary plane with two orthogonal translational
117117
/// axes
118118
/// @param[in] _transAxis1 An orthogonal translational axis
119119
/// @param[in] _transAxis2 Another orthogonal translation axis
120120
/// @param[in] _renameDofs If true, the names of dofs in this joint will be
121-
/// renmaed according to the plane type.
121+
/// renamed according to the plane type.
122122
void setArbitraryPlane(
123123
const Eigen::Vector3d& _transAxis1,
124124
const Eigen::Vector3d& _transAxis2,

dart/dynamics/TranslationalJoint2D.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,24 +94,24 @@ class DART_API TranslationalJoint2D : public detail::TranslationalJoint2DBase
9494

9595
/// Sets plane type as XY-plane
9696
/// @param[in] renameDofs If true, the names of dofs in this joint will be
97-
/// renmaed according to the plane type.
97+
/// renamed according to the plane type.
9898
void setXYPlane(bool renameDofs = true);
9999

100100
/// Sets plane type as YZ-plane
101101
/// @param[in] renameDofs If true, the names of dofs in this joint will be
102-
/// renmaed according to the plane type.
102+
/// renamed according to the plane type.
103103
void setYZPlane(bool renameDofs = true);
104104

105105
/// Sets plane type as ZX-plane
106106
/// @param[in] renameDofs If true, the names of dofs in this joint will be
107-
/// renmaed according to the plane type.
107+
/// renamed according to the plane type.
108108
void setZXPlane(bool renameDofs = true);
109109

110110
/// Sets plane type as arbitrary plane with two orthogonal translational axes
111111
/// @param[in] transAxis1 First translational axis
112112
/// @param[in] transAxis2 Second translational axis
113113
/// @param[in] renameDofs If true, the names of dofs in this joint will be
114-
/// renmaed according to the plane type.
114+
/// renamed according to the plane type.
115115
void setArbitraryPlane(
116116
const Eigen::Vector3d& transAxis1,
117117
const Eigen::Vector3d& transAxis2,

dart/gui/CMakeLists.txt

Lines changed: 101 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,102 @@
1-
# Note: The dart-gui component is backed entirely by OpenSceneGraph (OSG).
2-
# OSG is currently the only GUI backend and lives under dart/gui/osg.
1+
if(NOT DART_BUILD_GUI)
2+
message(STATUS "Skipping GUI (DART_BUILD_GUI == ${DART_BUILD_GUI})")
3+
return()
4+
endif()
35

4-
# Add subdirectories
5-
add_subdirectory(osg)
6+
# Set local target/component names
7+
set(target_name ${PROJECT_NAME}-gui)
8+
set(component_name gui)
9+
set(component_dependencies )
10+
set(component_dependency_packages )
11+
set(link_libraries )
12+
13+
# Dependency checks
14+
dart_check_dependent_target(${target_name} dart-utils)
15+
16+
# OpenSceneGraph
17+
dart_find_package(OpenSceneGraph)
18+
dart_check_required_package(OpenSceneGraph "dart-gui" "OpenSceneGraph")
19+
list(APPEND component_dependency_packages OpenSceneGraph)
20+
21+
# ImGui
22+
if(DART_USE_SYSTEM_IMGUI)
23+
list(APPEND component_dependency_packages imgui)
24+
list(APPEND link_libraries imgui::imgui)
25+
else()
26+
list(APPEND component_dependencies imgui)
27+
list(APPEND link_libraries dart-imgui-lib)
28+
endif()
29+
30+
# Search all header and source files
31+
file(GLOB hdrs "*.hpp")
32+
file(GLOB srcs "*.cpp")
33+
file(GLOB detail_hdrs "detail/*.hpp")
34+
file(GLOB detail_srcs "detail/*.cpp")
35+
36+
set(dart_gui_hdrs ${hdrs} ${detail_hdrs})
37+
set(dart_gui_srcs ${srcs} ${detail_srcs})
38+
39+
add_subdirectory(render)
40+
41+
file(GLOB render_hdrs "render/*.hpp")
42+
43+
# Add target
44+
dart_add_library(${target_name} ${dart_gui_hdrs} ${dart_gui_srcs})
45+
target_link_libraries(${target_name} dart-utils osg::osg ${link_libraries})
46+
47+
if(MSVC AND BUILD_SHARED_LIBS)
48+
if(CMAKE_CONFIGURATION_TYPES)
49+
foreach(_cfg ${CMAKE_CONFIGURATION_TYPES})
50+
string(TOUPPER "${_cfg}" _cfg_upper)
51+
set_target_properties(
52+
${target_name}
53+
PROPERTIES
54+
ARCHIVE_OUTPUT_DIRECTORY_${_cfg_upper}
55+
"${DART_BINARY_DIR}/lib/${_cfg}"
56+
)
57+
endforeach()
58+
else()
59+
set_target_properties(
60+
${target_name}
61+
PROPERTIES
62+
ARCHIVE_OUTPUT_DIRECTORY "${DART_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}"
63+
)
64+
endif()
65+
endif()
66+
67+
# Component
68+
add_component(${PROJECT_NAME} ${component_name})
69+
add_component_targets(${PROJECT_NAME} ${component_name} ${target_name})
70+
add_component_dependencies(${PROJECT_NAME} ${component_name} utils ${component_dependencies})
71+
add_component_dependency_packages(${PROJECT_NAME} ${component_name} ${component_dependency_packages})
72+
73+
# Generate header for this namespace
74+
dart_get_filename_components(header_names "gui headers" ${hdrs})
75+
list(APPEND header_names "render/All.hpp")
76+
dart_generate_component_headers(
77+
COMPONENT_NAME gui
78+
TARGET_DIR "dart/gui/"
79+
OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}"
80+
HEADERS ${header_names}
81+
SOURCE_HEADERS ${hdrs} ${detail_hdrs} ${render_hdrs}
82+
)
83+
84+
# Install (includes All.hpp, gui.hpp for component compatibility,
85+
# and generated PascalCase headers for case compatibility)
86+
install(
87+
FILES ${hdrs} ${CMAKE_CURRENT_BINARY_DIR}/All.hpp ${CMAKE_CURRENT_BINARY_DIR}/gui.hpp
88+
DESTINATION include/dart/gui
89+
COMPONENT headers
90+
)
91+
install(
92+
FILES ${detail_hdrs}
93+
DESTINATION include/dart/gui/detail
94+
COMPONENT headers
95+
)
96+
# Install generated compatibility headers preserving subdirectory structure
97+
dart_install_compat_headers(
98+
COMPAT_HEADERS ${DART_GENERATED_COMPAT_HEADERS}
99+
DESTINATION_PREFIX include/dart/gui
100+
)
101+
102+
dart_format_add(${hdrs} ${srcs} ${dart_gui_hdrs} ${dart_gui_srcs})

0 commit comments

Comments
 (0)