Merge branch 'main' into newton-schemas

This commit is contained in:
Sam Haves
2026-05-13 09:57:59 -04:00
committed by GitHub
430 changed files with 44557 additions and 19852 deletions
+1 -1
View File
@@ -17,6 +17,6 @@
namespace mujoco::plugin::actuator {
mjPLUGIN_LIB_INIT { Pid::RegisterPlugin(); }
mjPLUGIN_LIB_INIT(actuator) { Pid::RegisterPlugin(); }
} // namespace mujoco::plugin::actuator
+1 -1
View File
@@ -17,7 +17,7 @@
namespace mujoco::plugin::elasticity {
mjPLUGIN_LIB_INIT {
mjPLUGIN_LIB_INIT(elasticity) {
Cable::RegisterPlugin();
}
+4 -43
View File
@@ -12,48 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if(EMSCRIPTEN)
add_library(obj_decoder OBJECT obj_decoder.cc)
else()
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}")
add_library(obj_decoder SHARED obj_decoder.cc)
endif()
target_include_directories(obj_decoder PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../..
${CMAKE_CURRENT_SOURCE_DIR}/../../include
target_compile_definitions(mujoco PRIVATE TINYOBJLOADER_IMPLEMENTATION)
target_sources(mujoco PRIVATE
obj_decoder.cc
)
if(EMSCRIPTEN)
target_link_libraries(obj_decoder PRIVATE
tinyobjloader
)
else()
target_link_libraries(obj_decoder PRIVATE
mujoco
tinyobjloader
)
endif()
target_compile_definitions(obj_decoder PRIVATE TINYOBJLOADER_IMPLEMENTATION)
target_compile_options(obj_decoder PRIVATE
${AVX_COMPILE_OPTIONS}
${MUJOCO_MACOS_COMPILE_OPTIONS}
${EXTRA_COMPILE_OPTIONS}
${MUJOCO_CXX_FLAGS}
)
if(NOT EMSCRIPTEN)
target_link_options(obj_decoder PRIVATE
${MUJOCO_MACOS_LINK_OPTIONS}
${EXTRA_LINK_OPTIONS}
)
install(
TARGETS obj_decoder
LIBRARY DESTINATION "${CMAKE_INSTALL_BINDIR}/mujoco_plugin"
)
endif()
target_link_libraries(mujoco PRIVATE tinyobjloader)
+1 -1
View File
@@ -114,7 +114,7 @@ int CanDecode(const mjResource* resource) {
} // namespace
mjPLUGIN_LIB_INIT {
mjPLUGIN_LIB_INIT(obj_decoder) {
mjpDecoder decoder;
mjp_defaultDecoder(&decoder);
decoder.content_type = "model/obj";
+2 -1
View File
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <mujoco/mjplugin.h>
#include "bolt.h"
#include "bowl.h"
#include "gear.h"
@@ -20,7 +21,7 @@
namespace mujoco::plugin::sdf {
mjPLUGIN_LIB_INIT {
mjPLUGIN_LIB_INIT(sdf) {
Bolt::RegisterPlugin();
Bowl::RegisterPlugin();
Gear::RegisterPlugin();
+5 -1
View File
@@ -91,7 +91,11 @@ void SdfVisualizer::Visualize(const mjModel* m, const mjData* d,
for (int k = 0; k < 2; k++) {
for (int j = 0; j < (k == 0 ? 2 : n-1); j++) {
if (scn->ngeom >= scn->maxgeom) {
mj_warning((mjData*)d, mjWARN_VGEOMFULL, scn->maxgeom);
if (!scn->status) {
mju_warning("Pre-allocated visual geom buffer is full. "
"Increase maxgeom above %d.", scn->maxgeom);
scn->status = 1;
}
return;
}
mjvGeom* thisgeom = scn->geoms + scn->ngeom;
+1 -1
View File
@@ -17,7 +17,7 @@
namespace mujoco::plugin::sensor {
mjPLUGIN_LIB_INIT {
mjPLUGIN_LIB_INIT(sensor) {
TouchGrid::RegisterPlugin();
}
+5 -1
View File
@@ -427,7 +427,11 @@ void TouchGrid::Visualize(const mjModel* m, mjData* d, const mjvOption* opt,
continue;
}
if (scn->ngeom >= scn->maxgeom) {
mj_warning(d, mjWARN_VGEOMFULL, scn->maxgeom);
if (!scn->status) {
mju_warning("Pre-allocated visual geom buffer is full. "
"Increase maxgeom above %d.", scn->maxgeom);
scn->status = 1;
}
mj_freeStack(d);
return;
} else {
+2 -39
View File
@@ -12,43 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if(EMSCRIPTEN)
add_library(stl_decoder OBJECT stl_decoder.cc)
else()
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}")
add_library(stl_decoder SHARED stl_decoder.cc)
endif()
target_include_directories(stl_decoder PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../..
${CMAKE_CURRENT_SOURCE_DIR}/../../include
target_sources(mujoco PRIVATE
stl_decoder.cc
)
if(EMSCRIPTEN)
target_link_libraries(stl_decoder PRIVATE)
else()
target_link_libraries(stl_decoder PRIVATE
mujoco
)
endif()
target_compile_options(stl_decoder PRIVATE
${AVX_COMPILE_OPTIONS}
${MUJOCO_MACOS_COMPILE_OPTIONS}
${EXTRA_COMPILE_OPTIONS}
${MUJOCO_CXX_FLAGS}
)
if(NOT EMSCRIPTEN)
target_link_options(stl_decoder PRIVATE
${MUJOCO_MACOS_LINK_OPTIONS}
${EXTRA_LINK_OPTIONS}
)
install(
TARGETS stl_decoder
LIBRARY DESTINATION "${CMAKE_INSTALL_BINDIR}/mujoco_plugin"
)
endif()
+1 -1
View File
@@ -132,7 +132,7 @@ int CanDecode(const mjResource* resource) {
} // namespace
mjPLUGIN_LIB_INIT {
mjPLUGIN_LIB_INIT(stl_decoder) {
mjpDecoder decoder;
mjp_defaultDecoder(&decoder);
decoder.content_type = "model/stl";
+2 -2
View File
@@ -775,7 +775,7 @@ void ParseUsdPhysicsScene(mjSpec* spec,
bool multiccd_flag;
mjc_physics_scene.GetMultiCCDFlagAttr().Get(&multiccd_flag);
spec->option.enableflags |= (multiccd_flag ? mjENBL_MULTICCD : 0);
spec->option.disableflags |= (!multiccd_flag ? mjDSBL_MULTICCD : 0);
// Compiler attributes
auto auto_limits_attr = mjc_physics_scene.GetAutoLimitsAttr();
@@ -2646,7 +2646,7 @@ int CanDecode(const mjResource* resource) {
} // namespace
// clang-format off
mjPLUGIN_LIB_INIT {
mjPLUGIN_LIB_INIT(usd_decoder) {
mjpDecoder decoder;
mjp_defaultDecoder(&decoder);
decoder.content_type = "model/usd";