Skip to content

Commit

Permalink
expose internal by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pantor committed Sep 3, 2023
1 parent 996b169 commit 562fa62
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ option(BUILD_CLOUD_CLIENT "Build cloud client to calculate Ruckig Pro trajectori
option(BUILD_TESTS "Build tests" ON)
option(BUILD_BENCHMARK "Build benchmark" OFF)
option(BUILD_SHARED_LIBS "Build as shared library" ON)
option(EXPOSE_INTERNAL "Expose some internal classes and methods" OFF)

if(WIN32 AND BUILD_SHARED_LIBS)
option(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS "On Windows, export all symbols when building a shared library." ON)
Expand Down Expand Up @@ -47,10 +46,6 @@ if(MSVC)
target_compile_definitions(ruckig PUBLIC _USE_MATH_DEFINES)
endif()

if(EXPOSE_INTERNAL)
target_compile_definitions(ruckig PUBLIC WITH_EXPOSE_INTERNAL)
endif()


if(BUILD_CLOUD_CLIENT)
target_sources(ruckig PRIVATE src/ruckig/cloud_client.cpp)
Expand Down
4 changes: 0 additions & 4 deletions src/ruckig/python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ limited by velocity, acceleration, and jerk constraints.";
.def(py::init<size_t, size_t>(), "dofs"_a, "max_number_of_waypoints"_a)
#endif
.def_readonly("degrees_of_freedom", &Trajectory<DynamicDOFs>::degrees_of_freedom)
#ifdef WITH_EXPOSE_INTERNAL
.def_property_readonly("profiles", &Trajectory<DynamicDOFs>::get_profiles)
#endif
.def_property_readonly("duration", &Trajectory<DynamicDOFs>::get_duration)
.def_property_readonly("intermediate_durations", &Trajectory<DynamicDOFs>::get_intermediate_durations)
.def_property_readonly("independent_min_durations", &Trajectory<DynamicDOFs>::get_independent_min_durations)
Expand Down Expand Up @@ -165,7 +163,6 @@ limited by velocity, acceleration, and jerk constraints.";
.def("calculate", static_cast<Result (RuckigThrow<DynamicDOFs>::*)(const InputParameter<DynamicDOFs>&, Trajectory<DynamicDOFs>&, bool&)>(&RuckigThrow<DynamicDOFs>::calculate), "input"_a, "trajectory"_a, "was_interrupted"_a)
.def("update", static_cast<Result (RuckigThrow<DynamicDOFs>::*)(const InputParameter<DynamicDOFs>&, OutputParameter<DynamicDOFs>&)>(&RuckigThrow<DynamicDOFs>::update), "input"_a, "output"_a);

#ifdef WITH_EXPOSE_INTERNAL
py::class_<BrakeProfile>(m, "BrakeProfile")
.def_readonly("duration", &BrakeProfile::duration)
.def_readonly("t", &BrakeProfile::t)
Expand All @@ -190,5 +187,4 @@ limited by velocity, acceleration, and jerk constraints.";
.def_readonly("direction", &Profile::direction)
.def_readonly("control_signs", &Profile::control_signs)
.def("__repr__", &Profile::to_string);
#endif
}

0 comments on commit 562fa62

Please sign in to comment.