Merge remote-tracking branch 'upstream/master'
@@ -10,10 +10,16 @@ addons:
|
|||||||
packages:
|
packages:
|
||||||
- python3
|
- python3
|
||||||
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- echo "CXX="$CXX
|
- echo "CXX="$CXX
|
||||||
- echo "CC="$CC
|
- echo "CC="$CC
|
||||||
- cmake . -DBUILD_PYBULLET=OFF -G"Unix Makefiles" #-DCMAKE_CXX_FLAGS=-Werror
|
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CXX" = "g++" ]]; then sudo apt-get install python3-pip; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CXX" = "g++" ]]; then sudo pip3 install -U pip wheel; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CXX" = "g++" ]]; then sudo pip3 install setuptools; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CXX" = "g++" ]]; then sudo python3 setup.py install; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CXX" = "g++" ]]; then python3 examples/pybullet/unittests/unittests.py --verbose; fi
|
||||||
|
- cmake . -DBUILD_PYBULLET=ON -G"Unix Makefiles" #-DCMAKE_CXX_FLAGS=-Werror
|
||||||
- make -j8
|
- make -j8
|
||||||
- ctest -j8 --output-on-failure
|
- ctest -j8 --output-on-failure
|
||||||
# Build again with double precision
|
# Build again with double precision
|
||||||
|
|||||||
@@ -2,17 +2,21 @@ Bullet Physics is created by Erwin Coumans with contributions from the following
|
|||||||
|
|
||||||
AMD
|
AMD
|
||||||
Apple
|
Apple
|
||||||
|
Yunfei Bai
|
||||||
Steve Baker
|
Steve Baker
|
||||||
Gino van den Bergen
|
Gino van den Bergen
|
||||||
|
Jeff Bingham
|
||||||
Nicola Candussi
|
Nicola Candussi
|
||||||
Erin Catto
|
Erin Catto
|
||||||
Lawrence Chai
|
Lawrence Chai
|
||||||
Erwin Coumans
|
Erwin Coumans
|
||||||
Christer Ericson
|
|
||||||
Disney Animation
|
Disney Animation
|
||||||
|
Benjamin Ellenberger
|
||||||
|
Christer Ericson
|
||||||
Google
|
Google
|
||||||
Dirk Gregorius
|
Dirk Gregorius
|
||||||
Marcus Hennix
|
Marcus Hennix
|
||||||
|
Jasmine Hsu
|
||||||
MBSim Development Team
|
MBSim Development Team
|
||||||
Takahiro Harada
|
Takahiro Harada
|
||||||
Simon Hobbs
|
Simon Hobbs
|
||||||
@@ -20,6 +24,7 @@ John Hsu
|
|||||||
Ole Kniemeyer
|
Ole Kniemeyer
|
||||||
Jay Lee
|
Jay Lee
|
||||||
Francisco Leon
|
Francisco Leon
|
||||||
|
lunkhound
|
||||||
Vsevolod Klementjev
|
Vsevolod Klementjev
|
||||||
Phil Knight
|
Phil Knight
|
||||||
John McCutchan
|
John McCutchan
|
||||||
@@ -32,9 +37,9 @@ Russel Smith
|
|||||||
Sony
|
Sony
|
||||||
Jakub Stephien
|
Jakub Stephien
|
||||||
Marten Svanfeldt
|
Marten Svanfeldt
|
||||||
|
Jie Tan
|
||||||
Pierre Terdiman
|
Pierre Terdiman
|
||||||
Steven Thompson
|
Steven Thompson
|
||||||
Tamas Umenhoffer
|
Tamas Umenhoffer
|
||||||
Yunfei Bai
|
|
||||||
|
|
||||||
If your name is missing, please send an email to erwin.coumans@gmail.com or file an issue at http://github.com/bulletphysics/bullet3
|
If your name is missing, please send an email to erwin.coumans@gmail.com or file an issue at http://github.com/bulletphysics/bullet3
|
||||||
|
|||||||
@@ -26,16 +26,16 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
|||||||
OPTION(USE_DOUBLE_PRECISION "Use double precision" OFF)
|
OPTION(USE_DOUBLE_PRECISION "Use double precision" OFF)
|
||||||
OPTION(USE_GRAPHICAL_BENCHMARK "Use Graphical Benchmark" ON)
|
OPTION(USE_GRAPHICAL_BENCHMARK "Use Graphical Benchmark" ON)
|
||||||
OPTION(BUILD_SHARED_LIBS "Use shared libraries" OFF)
|
OPTION(BUILD_SHARED_LIBS "Use shared libraries" OFF)
|
||||||
OPTION(USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD "Use btSoftMultiBodyDynamicsWorld" OFF)
|
OPTION(USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD "Use btSoftMultiBodyDynamicsWorld" ON)
|
||||||
|
|
||||||
OPTION(BULLET2_USE_THREAD_LOCKS "Build Bullet 2 libraries with mutex locking around certain operations (required for multi-threading)" OFF)
|
OPTION(BULLET2_MULTITHREADING "Build Bullet 2 libraries with mutex locking around certain operations (required for multi-threading)" OFF)
|
||||||
IF (BULLET2_USE_THREAD_LOCKS)
|
IF (BULLET2_MULTITHREADING)
|
||||||
OPTION(BULLET2_USE_OPEN_MP_MULTITHREADING "Build Bullet 2 with support for multi-threading with OpenMP (requires a compiler with OpenMP support)" OFF)
|
OPTION(BULLET2_USE_OPEN_MP_MULTITHREADING "Build Bullet 2 with support for multi-threading with OpenMP (requires a compiler with OpenMP support)" OFF)
|
||||||
OPTION(BULLET2_USE_TBB_MULTITHREADING "Build Bullet 2 with support for multi-threading with Intel Threading Building Blocks (requires the TBB library to be already installed)" OFF)
|
OPTION(BULLET2_USE_TBB_MULTITHREADING "Build Bullet 2 with support for multi-threading with Intel Threading Building Blocks (requires the TBB library to be already installed)" OFF)
|
||||||
IF (MSVC)
|
IF (MSVC)
|
||||||
OPTION(BULLET2_USE_PPL_MULTITHREADING "Build Bullet 2 with support for multi-threading with Microsoft Parallel Patterns Library (requires MSVC compiler)" OFF)
|
OPTION(BULLET2_USE_PPL_MULTITHREADING "Build Bullet 2 with support for multi-threading with Microsoft Parallel Patterns Library (requires MSVC compiler)" OFF)
|
||||||
ENDIF (MSVC)
|
ENDIF (MSVC)
|
||||||
ENDIF (BULLET2_USE_THREAD_LOCKS)
|
ENDIF (BULLET2_MULTITHREADING)
|
||||||
|
|
||||||
|
|
||||||
IF(NOT WIN32)
|
IF(NOT WIN32)
|
||||||
@@ -108,7 +108,7 @@ IF(MSVC)
|
|||||||
IF (CMAKE_CL_64)
|
IF (CMAKE_CL_64)
|
||||||
ADD_DEFINITIONS(-D_WIN64)
|
ADD_DEFINITIONS(-D_WIN64)
|
||||||
ELSE()
|
ELSE()
|
||||||
OPTION(USE_MSVC_SSE "Use MSVC /arch:sse option" ON)
|
OPTION(USE_MSVC_SSE "Use MSVC /arch:sse option" OFF)
|
||||||
option(USE_MSVC_SSE2 "Compile your program with SSE2 instructions" ON)
|
option(USE_MSVC_SSE2 "Compile your program with SSE2 instructions" ON)
|
||||||
|
|
||||||
IF (USE_MSVC_SSE)
|
IF (USE_MSVC_SSE)
|
||||||
@@ -217,20 +217,23 @@ ADD_DEFINITIONS( -DBT_USE_DOUBLE_PRECISION)
|
|||||||
SET( BULLET_DOUBLE_DEF "-DBT_USE_DOUBLE_PRECISION")
|
SET( BULLET_DOUBLE_DEF "-DBT_USE_DOUBLE_PRECISION")
|
||||||
ENDIF (USE_DOUBLE_PRECISION)
|
ENDIF (USE_DOUBLE_PRECISION)
|
||||||
|
|
||||||
IF (USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
IF (NOT USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
||||||
ADD_DEFINITIONS(-DUSE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
ADD_DEFINITIONS(-DSKIP_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
||||||
ENDIF (USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
ENDIF ()
|
||||||
|
|
||||||
IF(USE_GRAPHICAL_BENCHMARK)
|
IF(USE_GRAPHICAL_BENCHMARK)
|
||||||
ADD_DEFINITIONS( -DUSE_GRAPHICAL_BENCHMARK)
|
ADD_DEFINITIONS( -DUSE_GRAPHICAL_BENCHMARK)
|
||||||
ENDIF (USE_GRAPHICAL_BENCHMARK)
|
ENDIF (USE_GRAPHICAL_BENCHMARK)
|
||||||
|
|
||||||
IF(BULLET2_USE_THREAD_LOCKS)
|
IF(BULLET2_MULTITHREADING)
|
||||||
ADD_DEFINITIONS( -DBT_THREADSAFE=1 )
|
ADD_DEFINITIONS( -DBT_THREADSAFE=1 )
|
||||||
IF (NOT MSVC)
|
IF (NOT MSVC)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
ENDIF (NOT MSVC)
|
ENDIF (NOT MSVC)
|
||||||
ENDIF (BULLET2_USE_THREAD_LOCKS)
|
IF (NOT WIN32)
|
||||||
|
LINK_LIBRARIES( pthread )
|
||||||
|
ENDIF (NOT WIN32)
|
||||||
|
ENDIF (BULLET2_MULTITHREADING)
|
||||||
|
|
||||||
IF (BULLET2_USE_OPEN_MP_MULTITHREADING)
|
IF (BULLET2_USE_OPEN_MP_MULTITHREADING)
|
||||||
ADD_DEFINITIONS("-DBT_USE_OPENMP=1")
|
ADD_DEFINITIONS("-DBT_USE_OPENMP=1")
|
||||||
@@ -302,31 +305,34 @@ ENDIF()
|
|||||||
|
|
||||||
OPTION(BUILD_BULLET3 "Set when you want to build Bullet 3" ON)
|
OPTION(BUILD_BULLET3 "Set when you want to build Bullet 3" ON)
|
||||||
|
|
||||||
|
# Optional Python configuration
|
||||||
|
# Will not probe environment for Python configuration (which can abort the
|
||||||
|
# build process) unless you explicitly turn on BUILD_PYBULLET.
|
||||||
OPTION(BUILD_PYBULLET "Set when you want to build pybullet (Python bindings for Bullet)" OFF)
|
OPTION(BUILD_PYBULLET "Set when you want to build pybullet (Python bindings for Bullet)" OFF)
|
||||||
IF(BUILD_PYBULLET)
|
IF(BUILD_PYBULLET)
|
||||||
# Optional Python configuration
|
SET(PYTHON_VERSION_PYBULLET "" CACHE STRING "Python version pybullet will use.")
|
||||||
# builds pybullet automatically if all the requirements are met
|
SET(Python_ADDITIONAL_VERSIONS 3 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.7.12 2.7.10 2.7.3 )
|
||||||
SET(PYTHON_VERSION_PYBULLET "2.7" CACHE STRING "Python version pybullet will use.")
|
|
||||||
SET(Python_ADDITIONAL_VERSIONS 2.7 2.7.3 3 3.0 3.1 3.2 3.3 3.4 3.5 3.6)
|
|
||||||
SET_PROPERTY(CACHE PYTHON_VERSION_PYBULLET PROPERTY STRINGS ${Python_ADDITIONAL_VERSIONS})
|
SET_PROPERTY(CACHE PYTHON_VERSION_PYBULLET PROPERTY STRINGS ${Python_ADDITIONAL_VERSIONS})
|
||||||
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build3/cmake ${CMAKE_MODULE_PATH})
|
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build3/cmake ${CMAKE_MODULE_PATH})
|
||||||
OPTION(EXACT_PYTHON_VERSION "Require Python and match PYTHON_VERSION_PYBULLET exactly, e.g. 2.7.3" OFF)
|
OPTION(EXACT_PYTHON_VERSION "Require Python and match PYTHON_VERSION_PYBULLET exactly, e.g. 2.7.12" OFF)
|
||||||
IF(EXACT_PYTHON_VERSION)
|
IF(EXACT_PYTHON_VERSION)
|
||||||
set(EXACT_PYTHON_VERSION_FLAG EXACT REQUIRED)
|
set(EXACT_PYTHON_VERSION_FLAG EXACT REQUIRED)
|
||||||
ENDIF(EXACT_PYTHON_VERSION)
|
ENDIF(EXACT_PYTHON_VERSION)
|
||||||
# first find the python interpreter
|
# first find the python interpreter
|
||||||
FIND_PACKAGE(PythonInterp ${PYTHON_VERSION_PYBULLET} ${EXACT_PYTHON_VERSION_FLAG})
|
FIND_PACKAGE(PythonInterp ${PYTHON_VERSION_PYBULLET} ${EXACT_PYTHON_VERSION_FLAG})
|
||||||
# python library should exactly match that of the interpreter
|
# python library should exactly match that of the interpreter
|
||||||
|
# the following can result in fatal error if you don't have the right python configuration
|
||||||
FIND_PACKAGE(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
|
FIND_PACKAGE(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
|
||||||
ENDIF()
|
ENDIF(BUILD_PYBULLET)
|
||||||
|
|
||||||
OPTION(BUILD_ENET "Set when you want to build apps with enet UDP networking support" ON)
|
OPTION(BUILD_ENET "Set when you want to build apps with enet UDP networking support" ON)
|
||||||
OPTION(BUILD_CLSOCKET "Set when you want to build apps with enet TCP networking support" ON)
|
OPTION(BUILD_CLSOCKET "Set when you want to build apps with enet TCP networking support" ON)
|
||||||
|
|
||||||
|
|
||||||
IF(BUILD_PYBULLET)
|
IF(BUILD_PYBULLET)
|
||||||
|
FIND_PACKAGE(PythonLibs)
|
||||||
|
|
||||||
OPTION(BUILD_PYBULLET_NUMPY "Set when you want to build pybullet with NumPy support" ON)
|
OPTION(BUILD_PYBULLET_NUMPY "Set when you want to build pybullet with NumPy support" OFF)
|
||||||
OPTION(BUILD_PYBULLET_ENET "Set when you want to build pybullet with enet UDP networking support" ON)
|
OPTION(BUILD_PYBULLET_ENET "Set when you want to build pybullet with enet UDP networking support" ON)
|
||||||
OPTION(BUILD_PYBULLET_CLSOCKET "Set when you want to build pybullet with enet TCP networking support" ON)
|
OPTION(BUILD_PYBULLET_CLSOCKET "Set when you want to build pybullet with enet TCP networking support" ON)
|
||||||
|
|
||||||
@@ -464,7 +470,11 @@ configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/BulletConfig.cmake.in
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake
|
||||||
@ONLY ESCAPE_QUOTES
|
@ONLY ESCAPE_QUOTES
|
||||||
)
|
)
|
||||||
|
OPTION(INSTALL_CMAKE_FILES "Install generated CMake files" ON)
|
||||||
|
|
||||||
|
IF (INSTALL_CMAKE_FILES)
|
||||||
install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/UseBullet.cmake
|
install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/UseBullet.cmake
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake
|
||||||
DESTINATION ${BULLET_CONFIG_CMAKE_PATH}
|
DESTINATION ${BULLET_CONFIG_CMAKE_PATH}
|
||||||
)
|
)
|
||||||
|
ENDIF (INSTALL_CMAKE_FILES)
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ INCLUDE_DIRECTORIES(
|
|||||||
SET(BulletRobotics_SRCS
|
SET(BulletRobotics_SRCS
|
||||||
../../examples/SharedMemory/IKTrajectoryHelper.cpp
|
../../examples/SharedMemory/IKTrajectoryHelper.cpp
|
||||||
../../examples/SharedMemory/IKTrajectoryHelper.h
|
../../examples/SharedMemory/IKTrajectoryHelper.h
|
||||||
../../examples/SharedMemory/TinyRendererVisualShapeConverter.cpp
|
../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.cpp
|
||||||
../../examples/SharedMemory/TinyRendererVisualShapeConverter.h
|
../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp
|
||||||
../../examples/OpenGLWindow/SimpleCamera.cpp
|
../../examples/OpenGLWindow/SimpleCamera.cpp
|
||||||
../../examples/OpenGLWindow/SimpleCamera.h
|
../../examples/OpenGLWindow/SimpleCamera.h
|
||||||
../../examples/TinyRenderer/geometry.cpp
|
../../examples/TinyRenderer/geometry.cpp
|
||||||
@@ -32,6 +32,9 @@ SET(BulletRobotics_SRCS
|
|||||||
../../examples/SharedMemory/PhysicsDirectC_API.h
|
../../examples/SharedMemory/PhysicsDirectC_API.h
|
||||||
../../examples/SharedMemory/PhysicsServerCommandProcessor.cpp
|
../../examples/SharedMemory/PhysicsServerCommandProcessor.cpp
|
||||||
../../examples/SharedMemory/PhysicsServerCommandProcessor.h
|
../../examples/SharedMemory/PhysicsServerCommandProcessor.h
|
||||||
|
../../examples/SharedMemory/b3PluginManager.cpp
|
||||||
|
../../examples/SharedMemory/b3PluginManager.h
|
||||||
|
|
||||||
../../examples/SharedMemory/PhysicsClientSharedMemory.cpp
|
../../examples/SharedMemory/PhysicsClientSharedMemory.cpp
|
||||||
../../examples/SharedMemory/PhysicsClientSharedMemory.h
|
../../examples/SharedMemory/PhysicsClientSharedMemory.h
|
||||||
../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.cpp
|
../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.cpp
|
||||||
@@ -56,10 +59,7 @@ SET(BulletRobotics_SRCS
|
|||||||
../../examples/Utils/b3ReferenceFrameHelper.hpp
|
../../examples/Utils/b3ReferenceFrameHelper.hpp
|
||||||
../../examples/Utils/ChromeTraceUtil.cpp
|
../../examples/Utils/ChromeTraceUtil.cpp
|
||||||
|
|
||||||
../../examples/ThirdPartyLibs/tinyxml/tinystr.cpp
|
../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp
|
||||||
../../examples/ThirdPartyLibs/tinyxml/tinyxml.cpp
|
|
||||||
../../examples/ThirdPartyLibs/tinyxml/tinyxmlerror.cpp
|
|
||||||
../../examples/ThirdPartyLibs/tinyxml/tinyxmlparser.cpp
|
|
||||||
|
|
||||||
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp
|
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp
|
||||||
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h
|
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h
|
||||||
@@ -117,6 +117,10 @@ ELSE(WIN32)
|
|||||||
IF(BUILD_CLSOCKET)
|
IF(BUILD_CLSOCKET)
|
||||||
ADD_DEFINITIONS(${OSDEF})
|
ADD_DEFINITIONS(${OSDEF})
|
||||||
ENDIF(BUILD_CLSOCKET)
|
ENDIF(BUILD_CLSOCKET)
|
||||||
|
|
||||||
|
IF(NOT APPLE)
|
||||||
|
LINK_LIBRARIES( pthread ${DL} )
|
||||||
|
ENDIF(APPLE)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
IF(BUILD_ENET)
|
IF(BUILD_ENET)
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
kind "StaticLib"
|
kind "StaticLib"
|
||||||
|
|
||||||
includedirs {".","../../src"}
|
includedirs {".","../../src"}
|
||||||
|
if os.is("Linux") then
|
||||||
|
buildoptions{"-fPIC"}
|
||||||
|
end
|
||||||
files {
|
files {
|
||||||
"**.cpp",
|
"**.cpp",
|
||||||
"**.h"
|
"**.h"
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
kind "StaticLib"
|
kind "StaticLib"
|
||||||
|
|
||||||
includedirs {"."}
|
includedirs {"."}
|
||||||
|
if os.is("Linux") then
|
||||||
|
buildoptions{"-fPIC"}
|
||||||
|
end
|
||||||
files {
|
files {
|
||||||
"**.cpp",
|
"**.cpp",
|
||||||
"**.h"
|
"**.h"
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
void init() {
|
void init() {
|
||||||
this->createEmptyDynamicsWorld();
|
this->createEmptyDynamicsWorld();
|
||||||
m_dynamicsWorld->setGravity(m_gravity);
|
m_dynamicsWorld->setGravity(m_gravity);
|
||||||
BulletURDFImporter urdf_importer(&m_nogfx,0,1);
|
BulletURDFImporter urdf_importer(&m_nogfx,0,1,0);
|
||||||
URDFImporterInterface &u2b(urdf_importer);
|
URDFImporterInterface &u2b(urdf_importer);
|
||||||
bool loadOk = u2b.loadURDF(m_filename.c_str(), m_base_fixed);
|
bool loadOk = u2b.loadURDF(m_filename.c_str(), m_base_fixed);
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ int btMultiBodyTreeCreator::createFromBtMultiBody(const btMultiBody *btmb, const
|
|||||||
} else {
|
} else {
|
||||||
link.joint_type = FLOATING;
|
link.joint_type = FLOATING;
|
||||||
}
|
}
|
||||||
btTransform transform(btmb->getBaseWorldTransform());
|
btTransform transform=(btmb->getBaseWorldTransform());
|
||||||
|
//compute inverse dynamics in body-fixed frame
|
||||||
|
transform.setIdentity();
|
||||||
|
|
||||||
link.parent_r_parent_body_ref(0) = transform.getOrigin()[0];
|
link.parent_r_parent_body_ref(0) = transform.getOrigin()[0];
|
||||||
link.parent_r_parent_body_ref(1) = transform.getOrigin()[1];
|
link.parent_r_parent_body_ref(1) = transform.getOrigin()[1];
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
"../../src"
|
"../../src"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if os.is("Linux") then
|
||||||
|
buildoptions{"-fPIC"}
|
||||||
|
end
|
||||||
files {
|
files {
|
||||||
"*.cpp",
|
"*.cpp",
|
||||||
"*.hpp"
|
"*.hpp"
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ typedef struct bInvalidHandle {
|
|||||||
class btCapsuleShapeData;
|
class btCapsuleShapeData;
|
||||||
class btTriangleInfoData;
|
class btTriangleInfoData;
|
||||||
class btTriangleInfoMapData;
|
class btTriangleInfoMapData;
|
||||||
|
class btPersistentManifoldDoubleData;
|
||||||
|
class btPersistentManifoldFloatData;
|
||||||
class btGImpactMeshShapeData;
|
class btGImpactMeshShapeData;
|
||||||
class btConvexHullShapeData;
|
class btConvexHullShapeData;
|
||||||
class btCollisionObjectDoubleData;
|
class btCollisionObjectDoubleData;
|
||||||
@@ -110,6 +112,8 @@ typedef struct bInvalidHandle {
|
|||||||
class btMultiBodyLinkFloatData;
|
class btMultiBodyLinkFloatData;
|
||||||
class btMultiBodyDoubleData;
|
class btMultiBodyDoubleData;
|
||||||
class btMultiBodyFloatData;
|
class btMultiBodyFloatData;
|
||||||
|
class btMultiBodyLinkColliderFloatData;
|
||||||
|
class btMultiBodyLinkColliderDoubleData;
|
||||||
// -------------------------------------------------- //
|
// -------------------------------------------------- //
|
||||||
class PointerArray
|
class PointerArray
|
||||||
{
|
{
|
||||||
@@ -512,6 +516,96 @@ typedef struct bInvalidHandle {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// -------------------------------------------------- //
|
||||||
|
class btPersistentManifoldDoubleData
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
btVector3DoubleData m_pointCacheLocalPointA[4];
|
||||||
|
btVector3DoubleData m_pointCacheLocalPointB[4];
|
||||||
|
btVector3DoubleData m_pointCachePositionWorldOnA[4];
|
||||||
|
btVector3DoubleData m_pointCachePositionWorldOnB[4];
|
||||||
|
btVector3DoubleData m_pointCacheNormalWorldOnB[4];
|
||||||
|
btVector3DoubleData m_pointCacheLateralFrictionDir1[4];
|
||||||
|
btVector3DoubleData m_pointCacheLateralFrictionDir2[4];
|
||||||
|
double m_pointCacheDistance[4];
|
||||||
|
double m_pointCacheAppliedImpulse[4];
|
||||||
|
double m_pointCacheCombinedFriction[4];
|
||||||
|
double m_pointCacheCombinedRollingFriction[4];
|
||||||
|
double m_pointCacheCombinedSpinningFriction[4];
|
||||||
|
double m_pointCacheCombinedRestitution[4];
|
||||||
|
int m_pointCachePartId0[4];
|
||||||
|
int m_pointCachePartId1[4];
|
||||||
|
int m_pointCacheIndex0[4];
|
||||||
|
int m_pointCacheIndex1[4];
|
||||||
|
int m_pointCacheContactPointFlags[4];
|
||||||
|
double m_pointCacheAppliedImpulseLateral1[4];
|
||||||
|
double m_pointCacheAppliedImpulseLateral2[4];
|
||||||
|
double m_pointCacheContactMotion1[4];
|
||||||
|
double m_pointCacheContactMotion2[4];
|
||||||
|
double m_pointCacheContactCFM[4];
|
||||||
|
double m_pointCacheCombinedContactStiffness1[4];
|
||||||
|
double m_pointCacheContactERP[4];
|
||||||
|
double m_pointCacheCombinedContactDamping1[4];
|
||||||
|
double m_pointCacheFrictionCFM[4];
|
||||||
|
int m_pointCacheLifeTime[4];
|
||||||
|
int m_numCachedPoints;
|
||||||
|
int m_companionIdA;
|
||||||
|
int m_companionIdB;
|
||||||
|
int m_index1a;
|
||||||
|
int m_objectType;
|
||||||
|
double m_contactBreakingThreshold;
|
||||||
|
double m_contactProcessingThreshold;
|
||||||
|
int m_padding;
|
||||||
|
btCollisionObjectDoubleData *m_body0;
|
||||||
|
btCollisionObjectDoubleData *m_body1;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// -------------------------------------------------- //
|
||||||
|
class btPersistentManifoldFloatData
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
btVector3FloatData m_pointCacheLocalPointA[4];
|
||||||
|
btVector3FloatData m_pointCacheLocalPointB[4];
|
||||||
|
btVector3FloatData m_pointCachePositionWorldOnA[4];
|
||||||
|
btVector3FloatData m_pointCachePositionWorldOnB[4];
|
||||||
|
btVector3FloatData m_pointCacheNormalWorldOnB[4];
|
||||||
|
btVector3FloatData m_pointCacheLateralFrictionDir1[4];
|
||||||
|
btVector3FloatData m_pointCacheLateralFrictionDir2[4];
|
||||||
|
float m_pointCacheDistance[4];
|
||||||
|
float m_pointCacheAppliedImpulse[4];
|
||||||
|
float m_pointCacheCombinedFriction[4];
|
||||||
|
float m_pointCacheCombinedRollingFriction[4];
|
||||||
|
float m_pointCacheCombinedSpinningFriction[4];
|
||||||
|
float m_pointCacheCombinedRestitution[4];
|
||||||
|
int m_pointCachePartId0[4];
|
||||||
|
int m_pointCachePartId1[4];
|
||||||
|
int m_pointCacheIndex0[4];
|
||||||
|
int m_pointCacheIndex1[4];
|
||||||
|
int m_pointCacheContactPointFlags[4];
|
||||||
|
float m_pointCacheAppliedImpulseLateral1[4];
|
||||||
|
float m_pointCacheAppliedImpulseLateral2[4];
|
||||||
|
float m_pointCacheContactMotion1[4];
|
||||||
|
float m_pointCacheContactMotion2[4];
|
||||||
|
float m_pointCacheContactCFM[4];
|
||||||
|
float m_pointCacheCombinedContactStiffness1[4];
|
||||||
|
float m_pointCacheContactERP[4];
|
||||||
|
float m_pointCacheCombinedContactDamping1[4];
|
||||||
|
float m_pointCacheFrictionCFM[4];
|
||||||
|
int m_pointCacheLifeTime[4];
|
||||||
|
int m_numCachedPoints;
|
||||||
|
int m_companionIdA;
|
||||||
|
int m_companionIdB;
|
||||||
|
int m_index1a;
|
||||||
|
int m_objectType;
|
||||||
|
float m_contactBreakingThreshold;
|
||||||
|
float m_contactProcessingThreshold;
|
||||||
|
int m_padding;
|
||||||
|
btCollisionObjectFloatData *m_body0;
|
||||||
|
btCollisionObjectFloatData *m_body1;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------- //
|
// -------------------------------------------------- //
|
||||||
class btGImpactMeshShapeData
|
class btGImpactMeshShapeData
|
||||||
{
|
{
|
||||||
@@ -566,7 +660,9 @@ typedef struct bInvalidHandle {
|
|||||||
int m_activationState1;
|
int m_activationState1;
|
||||||
int m_internalType;
|
int m_internalType;
|
||||||
int m_checkCollideWith;
|
int m_checkCollideWith;
|
||||||
char m_padding[4];
|
int m_collisionFilterGroup;
|
||||||
|
int m_collisionFilterMask;
|
||||||
|
int m_uniqueId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -600,7 +696,9 @@ typedef struct bInvalidHandle {
|
|||||||
int m_activationState1;
|
int m_activationState1;
|
||||||
int m_internalType;
|
int m_internalType;
|
||||||
int m_checkCollideWith;
|
int m_checkCollideWith;
|
||||||
char m_padding[4];
|
int m_collisionFilterGroup;
|
||||||
|
int m_collisionFilterMask;
|
||||||
|
int m_uniqueId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -1353,11 +1451,15 @@ typedef struct bInvalidHandle {
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
btQuaternionDoubleData m_zeroRotParentToThis;
|
btQuaternionDoubleData m_zeroRotParentToThis;
|
||||||
btVector3DoubleData m_parentComToThisComOffset;
|
btVector3DoubleData m_parentComToThisPivotOffset;
|
||||||
btVector3DoubleData m_thisPivotToThisComOffset;
|
btVector3DoubleData m_thisPivotToThisComOffset;
|
||||||
btVector3DoubleData m_jointAxisTop[6];
|
btVector3DoubleData m_jointAxisTop[6];
|
||||||
btVector3DoubleData m_jointAxisBottom[6];
|
btVector3DoubleData m_jointAxisBottom[6];
|
||||||
btVector3DoubleData m_linkInertia;
|
btVector3DoubleData m_linkInertia;
|
||||||
|
btVector3DoubleData m_absFrameTotVelocityTop;
|
||||||
|
btVector3DoubleData m_absFrameTotVelocityBottom;
|
||||||
|
btVector3DoubleData m_absFrameLocVelocityTop;
|
||||||
|
btVector3DoubleData m_absFrameLocVelocityBottom;
|
||||||
double m_linkMass;
|
double m_linkMass;
|
||||||
int m_parentIndex;
|
int m_parentIndex;
|
||||||
int m_jointType;
|
int m_jointType;
|
||||||
@@ -1384,11 +1486,15 @@ typedef struct bInvalidHandle {
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
btQuaternionFloatData m_zeroRotParentToThis;
|
btQuaternionFloatData m_zeroRotParentToThis;
|
||||||
btVector3FloatData m_parentComToThisComOffset;
|
btVector3FloatData m_parentComToThisPivotOffset;
|
||||||
btVector3FloatData m_thisPivotToThisComOffset;
|
btVector3FloatData m_thisPivotToThisComOffset;
|
||||||
btVector3FloatData m_jointAxisTop[6];
|
btVector3FloatData m_jointAxisTop[6];
|
||||||
btVector3FloatData m_jointAxisBottom[6];
|
btVector3FloatData m_jointAxisBottom[6];
|
||||||
btVector3FloatData m_linkInertia;
|
btVector3FloatData m_linkInertia;
|
||||||
|
btVector3FloatData m_absFrameTotVelocityTop;
|
||||||
|
btVector3FloatData m_absFrameTotVelocityBottom;
|
||||||
|
btVector3FloatData m_absFrameLocVelocityTop;
|
||||||
|
btVector3FloatData m_absFrameLocVelocityBottom;
|
||||||
int m_dofCount;
|
int m_dofCount;
|
||||||
float m_linkMass;
|
float m_linkMass;
|
||||||
int m_parentIndex;
|
int m_parentIndex;
|
||||||
@@ -1414,15 +1520,17 @@ typedef struct bInvalidHandle {
|
|||||||
class btMultiBodyDoubleData
|
class btMultiBodyDoubleData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
btTransformDoubleData m_baseWorldTransform;
|
btVector3DoubleData m_baseWorldPosition;
|
||||||
|
btQuaternionDoubleData m_baseWorldOrientation;
|
||||||
|
btVector3DoubleData m_baseLinearVelocity;
|
||||||
|
btVector3DoubleData m_baseAngularVelocity;
|
||||||
btVector3DoubleData m_baseInertia;
|
btVector3DoubleData m_baseInertia;
|
||||||
double m_baseMass;
|
double m_baseMass;
|
||||||
|
int m_numLinks;
|
||||||
|
char m_padding[4];
|
||||||
char *m_baseName;
|
char *m_baseName;
|
||||||
btMultiBodyLinkDoubleData *m_links;
|
btMultiBodyLinkDoubleData *m_links;
|
||||||
btCollisionObjectDoubleData *m_baseCollider;
|
btCollisionObjectDoubleData *m_baseCollider;
|
||||||
char *m_paddingPtr;
|
|
||||||
int m_numLinks;
|
|
||||||
char m_padding[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -1430,13 +1538,38 @@ typedef struct bInvalidHandle {
|
|||||||
class btMultiBodyFloatData
|
class btMultiBodyFloatData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
char *m_baseName;
|
btVector3FloatData m_baseWorldPosition;
|
||||||
btMultiBodyLinkFloatData *m_links;
|
btQuaternionFloatData m_baseWorldOrientation;
|
||||||
btCollisionObjectFloatData *m_baseCollider;
|
btVector3FloatData m_baseLinearVelocity;
|
||||||
btTransformFloatData m_baseWorldTransform;
|
btVector3FloatData m_baseAngularVelocity;
|
||||||
btVector3FloatData m_baseInertia;
|
btVector3FloatData m_baseInertia;
|
||||||
float m_baseMass;
|
float m_baseMass;
|
||||||
int m_numLinks;
|
int m_numLinks;
|
||||||
|
char *m_baseName;
|
||||||
|
btMultiBodyLinkFloatData *m_links;
|
||||||
|
btCollisionObjectFloatData *m_baseCollider;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// -------------------------------------------------- //
|
||||||
|
class btMultiBodyLinkColliderFloatData
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
btCollisionObjectFloatData m_colObjData;
|
||||||
|
btMultiBodyFloatData *m_multiBody;
|
||||||
|
int m_link;
|
||||||
|
char m_padding[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// -------------------------------------------------- //
|
||||||
|
class btMultiBodyLinkColliderDoubleData
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
btCollisionObjectDoubleData m_colObjData;
|
||||||
|
btMultiBodyDoubleData *m_multiBody;
|
||||||
|
int m_link;
|
||||||
|
char m_padding[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -128,6 +128,9 @@ void btBulletFile::parseData()
|
|||||||
mDataStart = 12;
|
mDataStart = 12;
|
||||||
remain-=12;
|
remain-=12;
|
||||||
|
|
||||||
|
//invalid/empty file?
|
||||||
|
if (remain < sizeof(bChunkInd))
|
||||||
|
return;
|
||||||
|
|
||||||
char *dataPtr = mFileBuffer+mDataStart;
|
char *dataPtr = mFileBuffer+mDataStart;
|
||||||
|
|
||||||
@@ -173,11 +176,20 @@ void btBulletFile::parseData()
|
|||||||
// listID->push_back((bStructHandle*)id);
|
// listID->push_back((bStructHandle*)id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dataChunk.code == BT_CONTACTMANIFOLD_CODE)
|
||||||
|
{
|
||||||
|
m_contactManifolds.push_back((bStructHandle*)id);
|
||||||
|
}
|
||||||
if (dataChunk.code == BT_MULTIBODY_CODE)
|
if (dataChunk.code == BT_MULTIBODY_CODE)
|
||||||
{
|
{
|
||||||
m_multiBodies.push_back((bStructHandle*)id);
|
m_multiBodies.push_back((bStructHandle*)id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dataChunk.code == BT_MB_LINKCOLLIDER_CODE)
|
||||||
|
{
|
||||||
|
m_multiBodyLinkColliders.push_back((bStructHandle*)id);
|
||||||
|
}
|
||||||
|
|
||||||
if (dataChunk.code == BT_SOFTBODY_CODE)
|
if (dataChunk.code == BT_SOFTBODY_CODE)
|
||||||
{
|
{
|
||||||
m_softBodies.push_back((bStructHandle*) id);
|
m_softBodies.push_back((bStructHandle*) id);
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ namespace bParse {
|
|||||||
|
|
||||||
btAlignedObjectArray<bStructHandle*> m_multiBodies;
|
btAlignedObjectArray<bStructHandle*> m_multiBodies;
|
||||||
|
|
||||||
|
btAlignedObjectArray<bStructHandle*> m_multiBodyLinkColliders;
|
||||||
|
|
||||||
btAlignedObjectArray<bStructHandle*> m_softBodies;
|
btAlignedObjectArray<bStructHandle*> m_softBodies;
|
||||||
|
|
||||||
btAlignedObjectArray<bStructHandle*> m_rigidBodies;
|
btAlignedObjectArray<bStructHandle*> m_rigidBodies;
|
||||||
@@ -57,6 +59,8 @@ namespace bParse {
|
|||||||
|
|
||||||
btAlignedObjectArray<bStructHandle*> m_dynamicsWorldInfo;
|
btAlignedObjectArray<bStructHandle*> m_dynamicsWorldInfo;
|
||||||
|
|
||||||
|
btAlignedObjectArray<bStructHandle*> m_contactManifolds;
|
||||||
|
|
||||||
btAlignedObjectArray<char*> m_dataBlocks;
|
btAlignedObjectArray<char*> m_dataBlocks;
|
||||||
btBulletFile();
|
btBulletFile();
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
kind "StaticLib"
|
kind "StaticLib"
|
||||||
|
|
||||||
|
if os.is("Linux") then
|
||||||
|
buildoptions{"-fPIC"}
|
||||||
|
end
|
||||||
|
|
||||||
includedirs {
|
includedirs {
|
||||||
"../../../src"
|
"../../../src"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ INCLUDE_DIRECTORIES(
|
|||||||
|
|
||||||
ADD_LIBRARY(
|
ADD_LIBRARY(
|
||||||
BulletWorldImporter
|
BulletWorldImporter
|
||||||
|
btMultiBodyWorldImporter.cpp
|
||||||
btBulletWorldImporter.cpp
|
btBulletWorldImporter.cpp
|
||||||
btBulletWorldImporter.h
|
btBulletWorldImporter.h
|
||||||
btWorldImporter.cpp
|
btWorldImporter.cpp
|
||||||
|
|||||||
@@ -0,0 +1,523 @@
|
|||||||
|
#include "btMultiBodyWorldImporter.h"
|
||||||
|
|
||||||
|
#include "LinearMath/btSerializer.h"
|
||||||
|
#include "../BulletFileLoader/btBulletFile.h"
|
||||||
|
#include "btBulletWorldImporter.h"
|
||||||
|
#include "btBulletDynamicsCommon.h"
|
||||||
|
#include "BulletDynamics/Featherstone/btMultiBody.h"
|
||||||
|
#include "BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.h"
|
||||||
|
#include "BulletDynamics/Featherstone/btMultiBodyLinkCollider.h"
|
||||||
|
|
||||||
|
struct btMultiBodyWorldImporterInternalData
|
||||||
|
{
|
||||||
|
btMultiBodyDynamicsWorld* m_mbDynamicsWorld;
|
||||||
|
btHashMap<btHashPtr, btMultiBody*> m_mbMap;
|
||||||
|
};
|
||||||
|
|
||||||
|
btMultiBodyWorldImporter::btMultiBodyWorldImporter(btMultiBodyDynamicsWorld* world)
|
||||||
|
:btBulletWorldImporter(world)
|
||||||
|
{
|
||||||
|
m_data = new btMultiBodyWorldImporterInternalData;
|
||||||
|
m_data->m_mbDynamicsWorld = world;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
btMultiBodyWorldImporter::~btMultiBodyWorldImporter()
|
||||||
|
{
|
||||||
|
delete m_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
void btMultiBodyWorldImporter::deleteAllData()
|
||||||
|
{
|
||||||
|
btBulletWorldImporter::deleteAllData();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static btCollisionObjectDoubleData* getBody0FromContactManifold(btPersistentManifoldDoubleData* manifold)
|
||||||
|
{
|
||||||
|
return (btCollisionObjectDoubleData*)manifold->m_body0;
|
||||||
|
}
|
||||||
|
static btCollisionObjectDoubleData* getBody1FromContactManifold(btPersistentManifoldDoubleData* manifold)
|
||||||
|
{
|
||||||
|
return (btCollisionObjectDoubleData*)manifold->m_body1;
|
||||||
|
}
|
||||||
|
static btCollisionObjectFloatData* getBody0FromContactManifold(btPersistentManifoldFloatData* manifold)
|
||||||
|
{
|
||||||
|
return (btCollisionObjectFloatData*)manifold->m_body0;
|
||||||
|
}
|
||||||
|
static btCollisionObjectFloatData* getBody1FromContactManifold(btPersistentManifoldFloatData* manifold)
|
||||||
|
{
|
||||||
|
return (btCollisionObjectFloatData*)manifold->m_body1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T> void syncContactManifolds(T** contactManifolds, int numContactManifolds, btMultiBodyWorldImporterInternalData* m_data)
|
||||||
|
{
|
||||||
|
m_data->m_mbDynamicsWorld->updateAabbs();
|
||||||
|
m_data->m_mbDynamicsWorld->computeOverlappingPairs();
|
||||||
|
btDispatcher* dispatcher = m_data->m_mbDynamicsWorld->getDispatcher();
|
||||||
|
|
||||||
|
btDispatcherInfo& dispatchInfo = m_data->m_mbDynamicsWorld->getDispatchInfo();
|
||||||
|
|
||||||
|
|
||||||
|
if (dispatcher)
|
||||||
|
{
|
||||||
|
btOverlappingPairCache* pairCache = m_data->m_mbDynamicsWorld->getBroadphase()->getOverlappingPairCache();
|
||||||
|
if (dispatcher)
|
||||||
|
{
|
||||||
|
dispatcher->dispatchAllCollisionPairs(pairCache, dispatchInfo, dispatcher);
|
||||||
|
}
|
||||||
|
int numExistingManifolds = m_data->m_mbDynamicsWorld->getDispatcher()->getNumManifolds();
|
||||||
|
btManifoldArray manifoldArray;
|
||||||
|
for (int i = 0; i < pairCache->getNumOverlappingPairs(); i++)
|
||||||
|
{
|
||||||
|
btBroadphasePair& pair = pairCache->getOverlappingPairArray()[i];
|
||||||
|
if (pair.m_algorithm)
|
||||||
|
{
|
||||||
|
pair.m_algorithm->getAllContactManifolds(manifoldArray);
|
||||||
|
//for each existing manifold, search a matching manifoldData and reconstruct
|
||||||
|
for (int m = 0; m < manifoldArray.size(); m++)
|
||||||
|
{
|
||||||
|
btPersistentManifold* existingManifold = manifoldArray[m];
|
||||||
|
int uid0 = existingManifold->getBody0()->getBroadphaseHandle()->m_uniqueId;
|
||||||
|
int uid1 = existingManifold->getBody1()->getBroadphaseHandle()->m_uniqueId;
|
||||||
|
int matchingManifoldIndex = -1;
|
||||||
|
for (int q = 0; q < numContactManifolds; q++)
|
||||||
|
{
|
||||||
|
if (uid0 == getBody0FromContactManifold(contactManifolds[q])->m_uniqueId && uid1 == getBody1FromContactManifold(contactManifolds[q])->m_uniqueId)
|
||||||
|
{
|
||||||
|
matchingManifoldIndex = q;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (matchingManifoldIndex >= 0)
|
||||||
|
{
|
||||||
|
existingManifold->deSerialize(contactManifolds[matchingManifoldIndex]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
existingManifold->setNumContacts(0);
|
||||||
|
//printf("Issue: cannot find maching contact manifold (%d, %d), may cause issues in determinism.\n", uid0, uid1);
|
||||||
|
}
|
||||||
|
|
||||||
|
manifoldArray.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class T> void syncMultiBody(T* mbd, btMultiBody* mb, btMultiBodyWorldImporterInternalData* m_data, btAlignedObjectArray<btQuaternion>& scratchQ, btAlignedObjectArray<btVector3>& scratchM)
|
||||||
|
{
|
||||||
|
bool isFixedBase = mbd->m_baseMass == 0;
|
||||||
|
bool canSleep = false;
|
||||||
|
btVector3 baseInertia;
|
||||||
|
baseInertia.deSerialize(mbd->m_baseInertia);
|
||||||
|
|
||||||
|
btVector3 baseWorldPos;
|
||||||
|
baseWorldPos.deSerialize(mbd->m_baseWorldPosition);
|
||||||
|
mb->setBasePos(baseWorldPos);
|
||||||
|
btQuaternion baseWorldRot;
|
||||||
|
baseWorldRot.deSerialize(mbd->m_baseWorldOrientation);
|
||||||
|
mb->setWorldToBaseRot(baseWorldRot.inverse());
|
||||||
|
btVector3 baseLinVal;
|
||||||
|
baseLinVal.deSerialize(mbd->m_baseLinearVelocity);
|
||||||
|
btVector3 baseAngVel;
|
||||||
|
baseAngVel.deSerialize(mbd->m_baseAngularVelocity);
|
||||||
|
mb->setBaseVel(baseLinVal);
|
||||||
|
mb->setBaseOmega(baseAngVel);
|
||||||
|
|
||||||
|
for (int i = 0; i < mbd->m_numLinks; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
mb->getLink(i).m_absFrameTotVelocity.m_topVec.deSerialize(mbd->m_links[i].m_absFrameTotVelocityTop);
|
||||||
|
mb->getLink(i).m_absFrameTotVelocity.m_bottomVec.deSerialize(mbd->m_links[i].m_absFrameTotVelocityBottom);
|
||||||
|
mb->getLink(i).m_absFrameLocVelocity.m_topVec.deSerialize(mbd->m_links[i].m_absFrameLocVelocityTop);
|
||||||
|
mb->getLink(i).m_absFrameLocVelocity.m_bottomVec.deSerialize(mbd->m_links[i].m_absFrameLocVelocityBottom);
|
||||||
|
|
||||||
|
switch (mbd->m_links[i].m_jointType)
|
||||||
|
{
|
||||||
|
case btMultibodyLink::eFixed:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case btMultibodyLink::ePrismatic:
|
||||||
|
{
|
||||||
|
mb->setJointPos(i, mbd->m_links[i].m_jointPos[0]);
|
||||||
|
mb->setJointVel(i, mbd->m_links[i].m_jointVel[0]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case btMultibodyLink::eRevolute:
|
||||||
|
{
|
||||||
|
mb->setJointPos(i, mbd->m_links[i].m_jointPos[0]);
|
||||||
|
mb->setJointVel(i, mbd->m_links[i].m_jointVel[0]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case btMultibodyLink::eSpherical:
|
||||||
|
{
|
||||||
|
btScalar jointPos[4] = { (btScalar)mbd->m_links[i].m_jointPos[0], (btScalar)mbd->m_links[i].m_jointPos[1], (btScalar)mbd->m_links[i].m_jointPos[2], (btScalar)mbd->m_links[i].m_jointPos[3] };
|
||||||
|
btScalar jointVel[3] = { (btScalar)mbd->m_links[i].m_jointVel[0], (btScalar)mbd->m_links[i].m_jointVel[1], (btScalar)mbd->m_links[i].m_jointVel[2] };
|
||||||
|
mb->setJointPosMultiDof(i, jointPos);
|
||||||
|
mb->setJointVelMultiDof(i, jointVel);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case btMultibodyLink::ePlanar:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mb->forwardKinematics(scratchQ, scratchM);
|
||||||
|
mb->updateCollisionObjectWorldTransforms(scratchQ, scratchM);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class T> void convertMultiBody(T* mbd, btMultiBodyWorldImporterInternalData* m_data)
|
||||||
|
{
|
||||||
|
bool isFixedBase = mbd->m_baseMass == 0;
|
||||||
|
bool canSleep = false;
|
||||||
|
btVector3 baseInertia;
|
||||||
|
baseInertia.deSerialize(mbd->m_baseInertia);
|
||||||
|
btMultiBody* mb = new btMultiBody(mbd->m_numLinks, mbd->m_baseMass, baseInertia, isFixedBase, canSleep);
|
||||||
|
mb->setHasSelfCollision(false);
|
||||||
|
|
||||||
|
btVector3 baseWorldPos;
|
||||||
|
baseWorldPos.deSerialize(mbd->m_baseWorldPosition);
|
||||||
|
|
||||||
|
btQuaternion baseWorldOrn;
|
||||||
|
baseWorldOrn.deSerialize(mbd->m_baseWorldOrientation);
|
||||||
|
mb->setBasePos(baseWorldPos);
|
||||||
|
mb->setWorldToBaseRot(baseWorldOrn.inverse());
|
||||||
|
|
||||||
|
m_data->m_mbMap.insert(mbd, mb);
|
||||||
|
for (int i = 0; i < mbd->m_numLinks; i++)
|
||||||
|
{
|
||||||
|
btVector3 localInertiaDiagonal;
|
||||||
|
localInertiaDiagonal.deSerialize(mbd->m_links[i].m_linkInertia);
|
||||||
|
btQuaternion parentRotToThis;
|
||||||
|
parentRotToThis.deSerialize(mbd->m_links[i].m_zeroRotParentToThis);
|
||||||
|
btVector3 parentComToThisPivotOffset;
|
||||||
|
parentComToThisPivotOffset.deSerialize(mbd->m_links[i].m_parentComToThisPivotOffset);
|
||||||
|
btVector3 thisPivotToThisComOffset;
|
||||||
|
thisPivotToThisComOffset.deSerialize(mbd->m_links[i].m_thisPivotToThisComOffset);
|
||||||
|
|
||||||
|
switch (mbd->m_links[i].m_jointType)
|
||||||
|
{
|
||||||
|
case btMultibodyLink::eFixed:
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
mb->setupFixed(i, mbd->m_links[i].m_linkMass, localInertiaDiagonal, mbd->m_links[i].m_parentIndex,
|
||||||
|
parentRotToThis, parentComToThisPivotOffset, thisPivotToThisComOffset);
|
||||||
|
//search for the collider
|
||||||
|
//mbd->m_links[i].m_linkCollider
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case btMultibodyLink::ePrismatic:
|
||||||
|
{
|
||||||
|
btVector3 jointAxis;
|
||||||
|
jointAxis.deSerialize(mbd->m_links[i].m_jointAxisBottom[0]);
|
||||||
|
bool disableParentCollision = true;//todo
|
||||||
|
mb->setupPrismatic(i, mbd->m_links[i].m_linkMass, localInertiaDiagonal, mbd->m_links[i].m_parentIndex,
|
||||||
|
parentRotToThis, jointAxis, parentComToThisPivotOffset, thisPivotToThisComOffset, disableParentCollision);
|
||||||
|
mb->setJointPos(i, mbd->m_links[i].m_jointPos[0]);
|
||||||
|
mb->setJointVel(i, mbd->m_links[i].m_jointVel[0]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case btMultibodyLink::eRevolute:
|
||||||
|
{
|
||||||
|
btVector3 jointAxis;
|
||||||
|
jointAxis.deSerialize(mbd->m_links[i].m_jointAxisTop[0]);
|
||||||
|
bool disableParentCollision = true;//todo
|
||||||
|
mb->setupRevolute(i, mbd->m_links[i].m_linkMass, localInertiaDiagonal, mbd->m_links[i].m_parentIndex,
|
||||||
|
parentRotToThis, jointAxis, parentComToThisPivotOffset, thisPivotToThisComOffset, disableParentCollision);
|
||||||
|
mb->setJointPos(i, mbd->m_links[i].m_jointPos[0]);
|
||||||
|
mb->setJointVel(i, mbd->m_links[i].m_jointVel[0]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case btMultibodyLink::eSpherical:
|
||||||
|
{
|
||||||
|
btAssert(0);
|
||||||
|
bool disableParentCollision = true;//todo
|
||||||
|
mb->setupSpherical(i, mbd->m_links[i].m_linkMass, localInertiaDiagonal, mbd->m_links[i].m_parentIndex,
|
||||||
|
parentRotToThis, parentComToThisPivotOffset, thisPivotToThisComOffset, disableParentCollision);
|
||||||
|
btScalar jointPos[4] = { (btScalar)mbd->m_links[i].m_jointPos[0], (btScalar)mbd->m_links[i].m_jointPos[1], (btScalar)mbd->m_links[i].m_jointPos[2], (btScalar)mbd->m_links[i].m_jointPos[3] };
|
||||||
|
btScalar jointVel[3] = { (btScalar)mbd->m_links[i].m_jointVel[0], (btScalar)mbd->m_links[i].m_jointVel[1], (btScalar)mbd->m_links[i].m_jointVel[2] };
|
||||||
|
mb->setJointPosMultiDof(i, jointPos);
|
||||||
|
mb->setJointVelMultiDof(i, jointVel);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case btMultibodyLink::ePlanar:
|
||||||
|
{
|
||||||
|
btAssert(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
btAssert(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool btMultiBodyWorldImporter::convertAllObjects( bParse::btBulletFile* bulletFile2)
|
||||||
|
{
|
||||||
|
bool result = false;
|
||||||
|
btAlignedObjectArray<btQuaternion> scratchQ;
|
||||||
|
btAlignedObjectArray<btVector3> scratchM;
|
||||||
|
|
||||||
|
if (m_importerFlags&eRESTORE_EXISTING_OBJECTS)
|
||||||
|
{
|
||||||
|
//check if the snapshot is valid for the existing world
|
||||||
|
//equal number of objects, # links etc
|
||||||
|
if ((bulletFile2->m_multiBodies.size() != m_data->m_mbDynamicsWorld->getNumMultibodies()))
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
|
||||||
|
//convert all multibodies
|
||||||
|
if (bulletFile2->getFlags() & bParse::FD_DOUBLE_PRECISION)
|
||||||
|
{
|
||||||
|
|
||||||
|
//for (int i = 0; i < bulletFile2->m_multiBodies.size(); i++)
|
||||||
|
for (int i = bulletFile2->m_multiBodies.size() - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
btMultiBodyDoubleData* mbd = (btMultiBodyDoubleData*)bulletFile2->m_multiBodies[i];
|
||||||
|
btMultiBody* mb = m_data->m_mbDynamicsWorld->getMultiBody(i);
|
||||||
|
syncMultiBody(mbd, mb, m_data, scratchQ, scratchM);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = bulletFile2->m_rigidBodies.size() - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
btRigidBodyDoubleData* rbd = (btRigidBodyDoubleData*)bulletFile2->m_rigidBodies[i];
|
||||||
|
int foundRb = -1;
|
||||||
|
int uid = rbd->m_collisionObjectData.m_uniqueId;
|
||||||
|
for (int i = 0; i < m_data->m_mbDynamicsWorld->getNumCollisionObjects(); i++)
|
||||||
|
{
|
||||||
|
if (uid == m_data->m_mbDynamicsWorld->getCollisionObjectArray()[i]->getBroadphaseHandle()->m_uniqueId)
|
||||||
|
{
|
||||||
|
foundRb = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (foundRb >= 0)
|
||||||
|
{
|
||||||
|
btRigidBody* rb = btRigidBody::upcast(m_data->m_mbDynamicsWorld->getCollisionObjectArray()[foundRb]);
|
||||||
|
if (rb)
|
||||||
|
{
|
||||||
|
btTransform tr;
|
||||||
|
tr.deSerializeDouble(rbd->m_collisionObjectData.m_worldTransform);
|
||||||
|
rb->setWorldTransform(tr);
|
||||||
|
btVector3 linVel, angVel;
|
||||||
|
linVel.deSerializeDouble(rbd->m_linearVelocity);
|
||||||
|
angVel.deSerializeDouble(rbd->m_angularVelocity);
|
||||||
|
rb->setLinearVelocity(linVel);
|
||||||
|
rb->setAngularVelocity(angVel);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//todo: check why body1 pointer is not properly deserialized
|
||||||
|
for (int i = 0; i < bulletFile2->m_contactManifolds.size(); i++)
|
||||||
|
{
|
||||||
|
btPersistentManifoldDoubleData* manifoldData = (btPersistentManifoldDoubleData*)bulletFile2->m_contactManifolds[i];
|
||||||
|
{
|
||||||
|
void* ptr = bulletFile2->findLibPointer(manifoldData->m_body0);
|
||||||
|
if (ptr)
|
||||||
|
{
|
||||||
|
manifoldData->m_body0 = (btCollisionObjectDoubleData*)ptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
void* ptr = bulletFile2->findLibPointer(manifoldData->m_body1);
|
||||||
|
if (ptr)
|
||||||
|
{
|
||||||
|
manifoldData->m_body1 = (btCollisionObjectDoubleData*)ptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (bulletFile2->m_contactManifolds.size())
|
||||||
|
{
|
||||||
|
syncContactManifolds((btPersistentManifoldDoubleData**)&bulletFile2->m_contactManifolds[0], bulletFile2->m_contactManifolds.size(), m_data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//single precision version
|
||||||
|
//for (int i = 0; i < bulletFile2->m_multiBodies.size(); i++)
|
||||||
|
for (int i = bulletFile2->m_multiBodies.size() - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
btMultiBodyFloatData* mbd = (btMultiBodyFloatData*)bulletFile2->m_multiBodies[i];
|
||||||
|
btMultiBody* mb = m_data->m_mbDynamicsWorld->getMultiBody(i);
|
||||||
|
syncMultiBody(mbd, mb, m_data, scratchQ, scratchM);
|
||||||
|
}
|
||||||
|
|
||||||
|
//todo: check why body1 pointer is not properly deserialized
|
||||||
|
for (int i = 0; i < bulletFile2->m_contactManifolds.size(); i++)
|
||||||
|
{
|
||||||
|
btPersistentManifoldFloatData* manifoldData = (btPersistentManifoldFloatData*)bulletFile2->m_contactManifolds[i];
|
||||||
|
{
|
||||||
|
void* ptr = bulletFile2->findLibPointer(manifoldData->m_body0);
|
||||||
|
if (ptr)
|
||||||
|
{
|
||||||
|
manifoldData->m_body0 = (btCollisionObjectFloatData*)ptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
void* ptr = bulletFile2->findLibPointer(manifoldData->m_body1);
|
||||||
|
if (ptr)
|
||||||
|
{
|
||||||
|
manifoldData->m_body1 = (btCollisionObjectFloatData*)ptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (bulletFile2->m_contactManifolds.size())
|
||||||
|
{
|
||||||
|
syncContactManifolds((btPersistentManifoldFloatData**)&bulletFile2->m_contactManifolds[0], bulletFile2->m_contactManifolds.size(), m_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = btBulletWorldImporter::convertAllObjects(bulletFile2);
|
||||||
|
|
||||||
|
|
||||||
|
//convert all multibodies
|
||||||
|
for (int i = 0; i < bulletFile2->m_multiBodies.size(); i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (bulletFile2->getFlags() & bParse::FD_DOUBLE_PRECISION)
|
||||||
|
{
|
||||||
|
btMultiBodyDoubleData* mbd = (btMultiBodyDoubleData*)bulletFile2->m_multiBodies[i];
|
||||||
|
convertMultiBody(mbd, m_data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
btMultiBodyFloatData* mbd = (btMultiBodyFloatData*)bulletFile2->m_multiBodies[i];
|
||||||
|
convertMultiBody(mbd, m_data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//forward kinematics, so that the link world transforms are valid, for collision detection
|
||||||
|
for (int i = 0; i < m_data->m_mbMap.size(); i++)
|
||||||
|
{
|
||||||
|
btMultiBody**ptr = m_data->m_mbMap.getAtIndex(i);
|
||||||
|
if (ptr)
|
||||||
|
{
|
||||||
|
btMultiBody* mb = *ptr;
|
||||||
|
mb->finalizeMultiDof();
|
||||||
|
btVector3 linvel = mb->getBaseVel();
|
||||||
|
btVector3 angvel = mb->getBaseOmega();
|
||||||
|
mb->forwardKinematics(scratchQ, scratchM);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//convert all multibody link colliders
|
||||||
|
for (int i = 0; i < bulletFile2->m_multiBodyLinkColliders.size(); i++)
|
||||||
|
{
|
||||||
|
if (bulletFile2->getFlags() & bParse::FD_DOUBLE_PRECISION)
|
||||||
|
{
|
||||||
|
btMultiBodyLinkColliderDoubleData* mblcd = (btMultiBodyLinkColliderDoubleData*)bulletFile2->m_multiBodyLinkColliders[i];
|
||||||
|
|
||||||
|
btMultiBody** ptr = m_data->m_mbMap[mblcd->m_multiBody];
|
||||||
|
if (ptr)
|
||||||
|
{
|
||||||
|
btMultiBody* multiBody = *ptr;
|
||||||
|
|
||||||
|
|
||||||
|
btCollisionShape** shapePtr = m_shapeMap.find(mblcd->m_colObjData.m_collisionShape);
|
||||||
|
if (shapePtr && *shapePtr)
|
||||||
|
{
|
||||||
|
btTransform startTransform;
|
||||||
|
mblcd->m_colObjData.m_worldTransform.m_origin.m_floats[3] = 0.f;
|
||||||
|
startTransform.deSerializeDouble(mblcd->m_colObjData.m_worldTransform);
|
||||||
|
|
||||||
|
btCollisionShape* shape = (btCollisionShape*)*shapePtr;
|
||||||
|
if (shape)
|
||||||
|
{
|
||||||
|
btMultiBodyLinkCollider* col = new btMultiBodyLinkCollider(multiBody, mblcd->m_link);
|
||||||
|
col->setCollisionShape(shape);
|
||||||
|
//btCollisionObject* body = createCollisionObject(startTransform,shape,mblcd->m_colObjData.m_name);
|
||||||
|
col->setFriction(btScalar(mblcd->m_colObjData.m_friction));
|
||||||
|
col->setRestitution(btScalar(mblcd->m_colObjData.m_restitution));
|
||||||
|
//m_bodyMap.insert(colObjData,body);
|
||||||
|
if (mblcd->m_link == -1)
|
||||||
|
{
|
||||||
|
col->setWorldTransform(multiBody->getBaseWorldTransform());
|
||||||
|
multiBody->setBaseCollider(col);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
col->setWorldTransform(multiBody->getLink(mblcd->m_link).m_cachedWorldTransform);
|
||||||
|
multiBody->getLink(mblcd->m_link).m_collider = col;
|
||||||
|
}
|
||||||
|
int mbLinkIndex = mblcd->m_link;
|
||||||
|
|
||||||
|
bool isDynamic = (mbLinkIndex < 0 && multiBody->hasFixedBase()) ? false : true;
|
||||||
|
int collisionFilterGroup = isDynamic ? int(btBroadphaseProxy::DefaultFilter) : int(btBroadphaseProxy::StaticFilter);
|
||||||
|
int collisionFilterMask = isDynamic ? int(btBroadphaseProxy::AllFilter) : int(btBroadphaseProxy::AllFilter ^ btBroadphaseProxy::StaticFilter);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
int colGroup = 0, colMask = 0;
|
||||||
|
int collisionFlags = mblcd->m_colObjData.m_collisionFlags;
|
||||||
|
if (collisionFlags & URDF_HAS_COLLISION_GROUP)
|
||||||
|
{
|
||||||
|
collisionFilterGroup = colGroup;
|
||||||
|
}
|
||||||
|
if (collisionFlags & URDF_HAS_COLLISION_MASK)
|
||||||
|
{
|
||||||
|
collisionFilterMask = colMask;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
m_data->m_mbDynamicsWorld->addCollisionObject(col, collisionFilterGroup, collisionFilterMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("error: no shape found\n");
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
|
//base and fixed? -> static, otherwise flag as dynamic
|
||||||
|
|
||||||
|
world1->addCollisionObject(col, collisionFilterGroup, collisionFilterMask);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < m_data->m_mbMap.size(); i++)
|
||||||
|
{
|
||||||
|
btMultiBody**ptr = m_data->m_mbMap.getAtIndex(i);
|
||||||
|
if (ptr)
|
||||||
|
{
|
||||||
|
btMultiBody* mb = *ptr;
|
||||||
|
mb->finalizeMultiDof();
|
||||||
|
|
||||||
|
m_data->m_mbDynamicsWorld->addMultiBody(mb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef BT_MULTIBODY_WORLD_IMPORTER_H
|
||||||
|
#define BT_MULTIBODY_WORLD_IMPORTER_H
|
||||||
|
|
||||||
|
#include "../Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.h"
|
||||||
|
|
||||||
|
class btMultiBodyWorldImporter : public btBulletWorldImporter
|
||||||
|
{
|
||||||
|
struct btMultiBodyWorldImporterInternalData* m_data;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
btMultiBodyWorldImporter(class btMultiBodyDynamicsWorld* world);
|
||||||
|
virtual ~btMultiBodyWorldImporter();
|
||||||
|
|
||||||
|
virtual bool convertAllObjects( bParse::btBulletFile* bulletFile2);
|
||||||
|
|
||||||
|
virtual void deleteAllData();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //BT_MULTIBODY_WORLD_IMPORTER_H
|
||||||
@@ -20,7 +20,8 @@ subject to the following restrictions:
|
|||||||
#endif
|
#endif
|
||||||
btWorldImporter::btWorldImporter(btDynamicsWorld* world)
|
btWorldImporter::btWorldImporter(btDynamicsWorld* world)
|
||||||
:m_dynamicsWorld(world),
|
:m_dynamicsWorld(world),
|
||||||
m_verboseMode(0)
|
m_verboseMode(0),
|
||||||
|
m_importerFlags(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,10 @@ struct btRigidBodyFloatData;
|
|||||||
#define btRigidBodyData btRigidBodyFloatData
|
#define btRigidBodyData btRigidBodyFloatData
|
||||||
#endif//BT_USE_DOUBLE_PRECISION
|
#endif//BT_USE_DOUBLE_PRECISION
|
||||||
|
|
||||||
|
enum btWorldImporterFlags
|
||||||
|
{
|
||||||
|
eRESTORE_EXISTING_OBJECTS=1,//don't create new objects
|
||||||
|
};
|
||||||
|
|
||||||
class btWorldImporter
|
class btWorldImporter
|
||||||
{
|
{
|
||||||
@@ -66,6 +70,7 @@ protected:
|
|||||||
btDynamicsWorld* m_dynamicsWorld;
|
btDynamicsWorld* m_dynamicsWorld;
|
||||||
|
|
||||||
int m_verboseMode;
|
int m_verboseMode;
|
||||||
|
int m_importerFlags;
|
||||||
|
|
||||||
btAlignedObjectArray<btCollisionShape*> m_allocatedCollisionShapes;
|
btAlignedObjectArray<btCollisionShape*> m_allocatedCollisionShapes;
|
||||||
btAlignedObjectArray<btCollisionObject*> m_allocatedRigidBodies;
|
btAlignedObjectArray<btCollisionObject*> m_allocatedRigidBodies;
|
||||||
@@ -131,6 +136,18 @@ public:
|
|||||||
return m_verboseMode;
|
return m_verboseMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setImporterFlags(int importerFlags)
|
||||||
|
{
|
||||||
|
m_importerFlags = importerFlags;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getImporterFlags() const
|
||||||
|
{
|
||||||
|
return m_importerFlags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// query for data
|
// query for data
|
||||||
int getNumCollisionShapes() const;
|
int getNumCollisionShapes() const;
|
||||||
btCollisionShape* getCollisionShapeByIndex(int index);
|
btCollisionShape* getCollisionShapeByIndex(int index);
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
"../../../src"
|
"../../../src"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if os.is("Linux") then
|
||||||
|
buildoptions{"-fPIC"}
|
||||||
|
end
|
||||||
|
|
||||||
files {
|
files {
|
||||||
"**.cpp",
|
"**.cpp",
|
||||||
"**.h"
|
"**.h"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ INCLUDE_DIRECTORIES(
|
|||||||
${BULLET_PHYSICS_SOURCE_DIR}/src
|
${BULLET_PHYSICS_SOURCE_DIR}/src
|
||||||
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader
|
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader
|
||||||
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletWorldImporter
|
${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletWorldImporter
|
||||||
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/tinyxml2
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_LIBRARY(
|
ADD_LIBRARY(
|
||||||
@@ -10,12 +11,7 @@ ADD_LIBRARY(
|
|||||||
btBulletXmlWorldImporter.h
|
btBulletXmlWorldImporter.h
|
||||||
string_split.cpp
|
string_split.cpp
|
||||||
string_split.h
|
string_split.h
|
||||||
tinyxml.cpp
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp
|
||||||
tinyxml.h
|
|
||||||
tinystr.cpp
|
|
||||||
tinystr.h
|
|
||||||
tinyxmlerror.cpp
|
|
||||||
tinyxmlparser.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(BulletXmlWorldImporter PROPERTIES VERSION ${BULLET_VERSION})
|
SET_TARGET_PROPERTIES(BulletXmlWorldImporter PROPERTIES VERSION ${BULLET_VERSION})
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ subject to the following restrictions:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "btBulletXmlWorldImporter.h"
|
#include "btBulletXmlWorldImporter.h"
|
||||||
#include "tinyxml.h"
|
#include "tinyxml2.h"
|
||||||
#include "btBulletDynamicsCommon.h"
|
#include "btBulletDynamicsCommon.h"
|
||||||
#include "string_split.h"
|
#include "string_split.h"
|
||||||
|
using namespace tinyxml2;
|
||||||
|
|
||||||
struct MyLocalCaster
|
struct MyLocalCaster
|
||||||
{
|
{
|
||||||
@@ -43,12 +44,12 @@ btBulletXmlWorldImporter::~btBulletXmlWorldImporter()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static int get_double_attribute_by_name(const TiXmlElement* pElement, const char* attribName,double* value)
|
static int get_double_attribute_by_name(const XMLElement* pElement, const char* attribName,double* value)
|
||||||
{
|
{
|
||||||
if ( !pElement )
|
if ( !pElement )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const TiXmlAttribute* pAttrib=pElement->FirstAttribute();
|
const XMLAttribute* pAttrib=pElement->FirstAttribute();
|
||||||
while (pAttrib)
|
while (pAttrib)
|
||||||
{
|
{
|
||||||
if (pAttrib->Name()==attribName)
|
if (pAttrib->Name()==attribName)
|
||||||
@@ -60,16 +61,16 @@ static int get_double_attribute_by_name(const TiXmlElement* pElement, const char
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int get_int_attribute_by_name(const TiXmlElement* pElement, const char* attribName,int* value)
|
static int get_int_attribute_by_name(const XMLElement* pElement, const char* attribName,int* value)
|
||||||
{
|
{
|
||||||
if ( !pElement )
|
if ( !pElement )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const TiXmlAttribute* pAttrib=pElement->FirstAttribute();
|
const XMLAttribute* pAttrib=pElement->FirstAttribute();
|
||||||
while (pAttrib)
|
while (pAttrib)
|
||||||
{
|
{
|
||||||
if (!strcmp(pAttrib->Name(),attribName))
|
if (!strcmp(pAttrib->Name(),attribName))
|
||||||
if (pAttrib->QueryIntValue(value)==TIXML_SUCCESS)
|
if (pAttrib->QueryIntValue(value)==XML_SUCCESS)
|
||||||
return 1;
|
return 1;
|
||||||
// if (pAttrib->QueryDoubleValue(&dval)==TIXML_SUCCESS) printf( " d=%1.1f", dval);
|
// if (pAttrib->QueryDoubleValue(&dval)==TIXML_SUCCESS) printf( " d=%1.1f", dval);
|
||||||
pAttrib=pAttrib->Next();
|
pAttrib=pAttrib->Next();
|
||||||
@@ -84,7 +85,7 @@ void stringToFloatArray(const std::string& string, btAlignedObjectArray<float>&
|
|||||||
bullet_utils::split( pieces, string, " ");
|
bullet_utils::split( pieces, string, " ");
|
||||||
for ( int i = 0; i < pieces.size(); ++i)
|
for ( int i = 0; i < pieces.size(); ++i)
|
||||||
{
|
{
|
||||||
assert(pieces[i]!="");
|
btAssert(pieces[i]!="");
|
||||||
floats.push_back((float)atof(pieces[i].c_str()));
|
floats.push_back((float)atof(pieces[i].c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +96,7 @@ static btVector3FloatData TextToVector3Data(const char* txt)
|
|||||||
btAssert(txt);
|
btAssert(txt);
|
||||||
btAlignedObjectArray<float> floats;
|
btAlignedObjectArray<float> floats;
|
||||||
stringToFloatArray(txt, floats);
|
stringToFloatArray(txt, floats);
|
||||||
assert(floats.size()==4);
|
btAssert(floats.size()==4);
|
||||||
|
|
||||||
btVector3FloatData vec4;
|
btVector3FloatData vec4;
|
||||||
vec4.m_floats[0] = floats[0];
|
vec4.m_floats[0] = floats[0];
|
||||||
@@ -105,13 +106,13 @@ static btVector3FloatData TextToVector3Data(const char* txt)
|
|||||||
return vec4;
|
return vec4;
|
||||||
}
|
}
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::deSerializeVector3FloatData(TiXmlNode* pParent,btAlignedObjectArray<btVector3FloatData>& vectors)
|
void btBulletXmlWorldImporter::deSerializeVector3FloatData(XMLNode* pParent,btAlignedObjectArray<btVector3FloatData>& vectors)
|
||||||
{
|
{
|
||||||
TiXmlNode* flNode = pParent->FirstChild("m_floats");
|
XMLNode* flNode = pParent->FirstChildElement("m_floats");
|
||||||
btAssert(flNode);
|
btAssert(flNode);
|
||||||
while (flNode && flNode->FirstChild())
|
while (flNode && flNode->FirstChildElement())
|
||||||
{
|
{
|
||||||
TiXmlText* pText = flNode->FirstChild()->ToText();
|
XMLText* pText = flNode->FirstChildElement()->ToText();
|
||||||
// printf("value = %s\n",pText->Value());
|
// printf("value = %s\n",pText->Value());
|
||||||
btVector3FloatData vec4 = TextToVector3Data(pText->Value());
|
btVector3FloatData vec4 = TextToVector3Data(pText->Value());
|
||||||
vectors.push_back(vec4);
|
vectors.push_back(vec4);
|
||||||
@@ -122,20 +123,20 @@ void btBulletXmlWorldImporter::deSerializeVector3FloatData(TiXmlNode* pParent,bt
|
|||||||
|
|
||||||
|
|
||||||
#define SET_INT_VALUE(xmlnode, targetdata, argname) \
|
#define SET_INT_VALUE(xmlnode, targetdata, argname) \
|
||||||
btAssert((xmlnode)->FirstChild(#argname) && (xmlnode)->FirstChild(#argname)->ToElement());\
|
btAssert((xmlnode)->FirstChildElement(#argname) && (xmlnode)->FirstChildElement(#argname)->ToElement());\
|
||||||
if ((xmlnode)->FirstChild(#argname) && (xmlnode)->FirstChild(#argname)->ToElement())\
|
if ((xmlnode)->FirstChildElement(#argname) && (xmlnode)->FirstChildElement(#argname)->ToElement())\
|
||||||
(targetdata)->argname= (int)atof(xmlnode->FirstChild(#argname)->ToElement()->GetText());
|
(targetdata)->argname= (int)atof(xmlnode->FirstChildElement(#argname)->ToElement()->GetText());
|
||||||
|
|
||||||
|
|
||||||
#define SET_FLOAT_VALUE(xmlnode, targetdata, argname) \
|
#define SET_FLOAT_VALUE(xmlnode, targetdata, argname) \
|
||||||
btAssert((xmlnode)->FirstChild(#argname) && (xmlnode)->FirstChild(#argname)->ToElement());\
|
btAssert((xmlnode)->FirstChildElement(#argname) && (xmlnode)->FirstChildElement(#argname)->ToElement());\
|
||||||
if ((xmlnode)->FirstChild(#argname) && (xmlnode)->FirstChild(#argname)->ToElement())\
|
if ((xmlnode)->FirstChildElement(#argname) && (xmlnode)->FirstChildElement(#argname)->ToElement())\
|
||||||
(targetdata)->argname= (float)atof(xmlnode->FirstChild(#argname)->ToElement()->GetText());
|
(targetdata)->argname= (float)atof(xmlnode->FirstChildElement(#argname)->ToElement()->GetText());
|
||||||
|
|
||||||
|
|
||||||
#define SET_POINTER_VALUE(xmlnode, targetdata, argname, pointertype) \
|
#define SET_POINTER_VALUE(xmlnode, targetdata, argname, pointertype) \
|
||||||
{\
|
{\
|
||||||
TiXmlNode* node = xmlnode->FirstChild(#argname);\
|
XMLNode* node = xmlnode->FirstChildElement(#argname);\
|
||||||
btAssert(node);\
|
btAssert(node);\
|
||||||
if (node)\
|
if (node)\
|
||||||
{\
|
{\
|
||||||
@@ -148,11 +149,11 @@ void btBulletXmlWorldImporter::deSerializeVector3FloatData(TiXmlNode* pParent,bt
|
|||||||
|
|
||||||
#define SET_VECTOR4_VALUE(xmlnode, targetdata, argname) \
|
#define SET_VECTOR4_VALUE(xmlnode, targetdata, argname) \
|
||||||
{\
|
{\
|
||||||
TiXmlNode* flNode = xmlnode->FirstChild(#argname);\
|
XMLNode* flNode = xmlnode->FirstChildElement(#argname);\
|
||||||
btAssert(flNode);\
|
btAssert(flNode);\
|
||||||
if (flNode && flNode->FirstChild())\
|
if (flNode && flNode->FirstChildElement())\
|
||||||
{\
|
{\
|
||||||
const char* txt= flNode->FirstChild()->ToElement()->GetText();\
|
const char* txt= flNode->FirstChildElement()->ToElement()->GetText();\
|
||||||
btVector3FloatData vec4 = TextToVector3Data(txt);\
|
btVector3FloatData vec4 = TextToVector3Data(txt);\
|
||||||
(targetdata)->argname.m_floats[0] = vec4.m_floats[0];\
|
(targetdata)->argname.m_floats[0] = vec4.m_floats[0];\
|
||||||
(targetdata)->argname.m_floats[1] = vec4.m_floats[1];\
|
(targetdata)->argname.m_floats[1] = vec4.m_floats[1];\
|
||||||
@@ -164,22 +165,22 @@ void btBulletXmlWorldImporter::deSerializeVector3FloatData(TiXmlNode* pParent,bt
|
|||||||
|
|
||||||
#define SET_MATRIX33_VALUE(n, targetdata, argname) \
|
#define SET_MATRIX33_VALUE(n, targetdata, argname) \
|
||||||
{\
|
{\
|
||||||
TiXmlNode* xmlnode = n->FirstChild(#argname);\
|
XMLNode* xmlnode = n->FirstChildElement(#argname);\
|
||||||
btAssert(xmlnode);\
|
btAssert(xmlnode);\
|
||||||
if (xmlnode)\
|
if (xmlnode)\
|
||||||
{\
|
{\
|
||||||
TiXmlNode* eleNode = xmlnode->FirstChild("m_el");\
|
XMLNode* eleNode = xmlnode->FirstChildElement("m_el");\
|
||||||
btAssert(eleNode);\
|
btAssert(eleNode);\
|
||||||
if (eleNode&& eleNode->FirstChild())\
|
if (eleNode&& eleNode->FirstChildElement())\
|
||||||
{\
|
{\
|
||||||
const char* txt= eleNode->FirstChild()->ToElement()->GetText();\
|
const char* txt= eleNode->FirstChildElement()->ToElement()->GetText();\
|
||||||
btVector3FloatData vec4 = TextToVector3Data(txt);\
|
btVector3FloatData vec4 = TextToVector3Data(txt);\
|
||||||
(targetdata)->argname.m_el[0].m_floats[0] = vec4.m_floats[0];\
|
(targetdata)->argname.m_el[0].m_floats[0] = vec4.m_floats[0];\
|
||||||
(targetdata)->argname.m_el[0].m_floats[1] = vec4.m_floats[1];\
|
(targetdata)->argname.m_el[0].m_floats[1] = vec4.m_floats[1];\
|
||||||
(targetdata)->argname.m_el[0].m_floats[2] = vec4.m_floats[2];\
|
(targetdata)->argname.m_el[0].m_floats[2] = vec4.m_floats[2];\
|
||||||
(targetdata)->argname.m_el[0].m_floats[3] = vec4.m_floats[3];\
|
(targetdata)->argname.m_el[0].m_floats[3] = vec4.m_floats[3];\
|
||||||
\
|
\
|
||||||
TiXmlNode* n1 = eleNode->FirstChild()->NextSibling();\
|
XMLNode* n1 = eleNode->FirstChildElement()->NextSibling();\
|
||||||
btAssert(n1);\
|
btAssert(n1);\
|
||||||
if (n1)\
|
if (n1)\
|
||||||
{\
|
{\
|
||||||
@@ -190,7 +191,7 @@ void btBulletXmlWorldImporter::deSerializeVector3FloatData(TiXmlNode* pParent,bt
|
|||||||
(targetdata)->argname.m_el[1].m_floats[2] = vec4.m_floats[2];\
|
(targetdata)->argname.m_el[1].m_floats[2] = vec4.m_floats[2];\
|
||||||
(targetdata)->argname.m_el[1].m_floats[3] = vec4.m_floats[3];\
|
(targetdata)->argname.m_el[1].m_floats[3] = vec4.m_floats[3];\
|
||||||
\
|
\
|
||||||
TiXmlNode* n2 = n1->NextSibling();\
|
XMLNode* n2 = n1->NextSibling();\
|
||||||
btAssert(n2);\
|
btAssert(n2);\
|
||||||
if (n2)\
|
if (n2)\
|
||||||
{\
|
{\
|
||||||
@@ -208,7 +209,7 @@ void btBulletXmlWorldImporter::deSerializeVector3FloatData(TiXmlNode* pParent,bt
|
|||||||
|
|
||||||
#define SET_TRANSFORM_VALUE(n, targetdata, argname) \
|
#define SET_TRANSFORM_VALUE(n, targetdata, argname) \
|
||||||
{\
|
{\
|
||||||
TiXmlNode* trNode = n->FirstChild(#argname);\
|
XMLNode* trNode = n->FirstChildElement(#argname);\
|
||||||
btAssert(trNode);\
|
btAssert(trNode);\
|
||||||
if (trNode)\
|
if (trNode)\
|
||||||
{\
|
{\
|
||||||
@@ -218,7 +219,7 @@ void btBulletXmlWorldImporter::deSerializeVector3FloatData(TiXmlNode* pParent,bt
|
|||||||
}\
|
}\
|
||||||
|
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::deSerializeCollisionShapeData(TiXmlNode* pParent, btCollisionShapeData* colShapeData)
|
void btBulletXmlWorldImporter::deSerializeCollisionShapeData(XMLNode* pParent, btCollisionShapeData* colShapeData)
|
||||||
{
|
{
|
||||||
SET_INT_VALUE(pParent,colShapeData,m_shapeType)
|
SET_INT_VALUE(pParent,colShapeData,m_shapeType)
|
||||||
colShapeData->m_name = 0;
|
colShapeData->m_name = 0;
|
||||||
@@ -226,17 +227,17 @@ void btBulletXmlWorldImporter::deSerializeCollisionShapeData(TiXmlNode* pParent,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::deSerializeConvexHullShapeData(TiXmlNode* pParent)
|
void btBulletXmlWorldImporter::deSerializeConvexHullShapeData(XMLNode* pParent)
|
||||||
{
|
{
|
||||||
MyLocalCaster cast;
|
MyLocalCaster cast;
|
||||||
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
||||||
|
|
||||||
btConvexHullShapeData* convexHullData = (btConvexHullShapeData*)btAlignedAlloc(sizeof(btConvexHullShapeData), 16);
|
btConvexHullShapeData* convexHullData = (btConvexHullShapeData*)btAlignedAlloc(sizeof(btConvexHullShapeData), 16);
|
||||||
|
|
||||||
TiXmlNode* xmlConvexInt = pParent->FirstChild("m_convexInternalShapeData");
|
XMLNode* xmlConvexInt = pParent->FirstChildElement("m_convexInternalShapeData");
|
||||||
btAssert(xmlConvexInt);
|
btAssert(xmlConvexInt);
|
||||||
|
|
||||||
TiXmlNode* xmlColShape = xmlConvexInt ->FirstChild("m_collisionShapeData");
|
XMLNode* xmlColShape = xmlConvexInt ->FirstChildElement("m_collisionShapeData");
|
||||||
btAssert(xmlColShape);
|
btAssert(xmlColShape);
|
||||||
|
|
||||||
deSerializeCollisionShapeData(xmlColShape,&convexHullData->m_convexInternalShapeData.m_collisionShapeData);
|
deSerializeCollisionShapeData(xmlColShape,&convexHullData->m_convexInternalShapeData.m_collisionShapeData);
|
||||||
@@ -249,7 +250,7 @@ void btBulletXmlWorldImporter::deSerializeConvexHullShapeData(TiXmlNode* pParent
|
|||||||
//#define SET_POINTER_VALUE(xmlnode, targetdata, argname, pointertype)
|
//#define SET_POINTER_VALUE(xmlnode, targetdata, argname, pointertype)
|
||||||
|
|
||||||
{
|
{
|
||||||
TiXmlNode* node = pParent->FirstChild("m_unscaledPointsFloatPtr");
|
XMLNode* node = pParent->FirstChildElement("m_unscaledPointsFloatPtr");
|
||||||
btAssert(node);
|
btAssert(node);
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
@@ -268,7 +269,7 @@ void btBulletXmlWorldImporter::deSerializeConvexHullShapeData(TiXmlNode* pParent
|
|||||||
m_pointerLookup.insert(cast.m_ptr,convexHullData);
|
m_pointerLookup.insert(cast.m_ptr,convexHullData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::deSerializeCompoundShapeChildData(TiXmlNode* pParent)
|
void btBulletXmlWorldImporter::deSerializeCompoundShapeChildData(XMLNode* pParent)
|
||||||
{
|
{
|
||||||
MyLocalCaster cast;
|
MyLocalCaster cast;
|
||||||
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
||||||
@@ -276,10 +277,10 @@ void btBulletXmlWorldImporter::deSerializeCompoundShapeChildData(TiXmlNode* pPar
|
|||||||
int numChildren = 0;
|
int numChildren = 0;
|
||||||
btAlignedObjectArray<btCompoundShapeChildData>* compoundChildArrayPtr = new btAlignedObjectArray<btCompoundShapeChildData>;
|
btAlignedObjectArray<btCompoundShapeChildData>* compoundChildArrayPtr = new btAlignedObjectArray<btCompoundShapeChildData>;
|
||||||
{
|
{
|
||||||
TiXmlNode* transNode = pParent->FirstChild("m_transform");
|
XMLNode* transNode = pParent->FirstChildElement("m_transform");
|
||||||
TiXmlNode* colShapeNode = pParent->FirstChild("m_childShape");
|
XMLNode* colShapeNode = pParent->FirstChildElement("m_childShape");
|
||||||
TiXmlNode* marginNode = pParent->FirstChild("m_childMargin");
|
XMLNode* marginNode = pParent->FirstChildElement("m_childMargin");
|
||||||
TiXmlNode* childTypeNode = pParent->FirstChild("m_childShapeType");
|
XMLNode* childTypeNode = pParent->FirstChildElement("m_childShapeType");
|
||||||
|
|
||||||
int i=0;
|
int i=0;
|
||||||
while (transNode && colShapeNode && marginNode && childTypeNode)
|
while (transNode && colShapeNode && marginNode && childTypeNode)
|
||||||
@@ -305,10 +306,10 @@ void btBulletXmlWorldImporter::deSerializeCompoundShapeChildData(TiXmlNode* pPar
|
|||||||
compoundChildArrayPtr->at(i).m_childMargin = (float)atof(marginNode->ToElement()->GetText());
|
compoundChildArrayPtr->at(i).m_childMargin = (float)atof(marginNode->ToElement()->GetText());
|
||||||
}
|
}
|
||||||
|
|
||||||
transNode = transNode->NextSibling("m_transform");
|
transNode = transNode->NextSiblingElement("m_transform");
|
||||||
colShapeNode = colShapeNode->NextSibling("m_childShape");
|
colShapeNode = colShapeNode->NextSiblingElement("m_childShape");
|
||||||
marginNode = marginNode->NextSibling("m_childMargin");
|
marginNode = marginNode->NextSiblingElement("m_childMargin");
|
||||||
childTypeNode = childTypeNode->NextSibling("m_childShapeType");
|
childTypeNode = childTypeNode->NextSiblingElement("m_childShapeType");
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,24 +327,24 @@ void btBulletXmlWorldImporter::deSerializeCompoundShapeChildData(TiXmlNode* pPar
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::deSerializeCompoundShapeData(TiXmlNode* pParent)
|
void btBulletXmlWorldImporter::deSerializeCompoundShapeData(XMLNode* pParent)
|
||||||
{
|
{
|
||||||
MyLocalCaster cast;
|
MyLocalCaster cast;
|
||||||
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
||||||
|
|
||||||
btCompoundShapeData* compoundData = (btCompoundShapeData*) btAlignedAlloc(sizeof(btCompoundShapeData),16);
|
btCompoundShapeData* compoundData = (btCompoundShapeData*) btAlignedAlloc(sizeof(btCompoundShapeData),16);
|
||||||
|
|
||||||
TiXmlNode* xmlColShape = pParent ->FirstChild("m_collisionShapeData");
|
XMLNode* xmlColShape = pParent ->FirstChildElement("m_collisionShapeData");
|
||||||
btAssert(xmlColShape);
|
btAssert(xmlColShape);
|
||||||
deSerializeCollisionShapeData(xmlColShape,&compoundData->m_collisionShapeData);
|
deSerializeCollisionShapeData(xmlColShape,&compoundData->m_collisionShapeData);
|
||||||
|
|
||||||
SET_INT_VALUE(pParent, compoundData,m_numChildShapes);
|
SET_INT_VALUE(pParent, compoundData,m_numChildShapes);
|
||||||
|
|
||||||
TiXmlNode* xmlShapeData = pParent->FirstChild("m_collisionShapeData");
|
XMLNode* xmlShapeData = pParent->FirstChildElement("m_collisionShapeData");
|
||||||
btAssert(xmlShapeData );
|
btAssert(xmlShapeData );
|
||||||
|
|
||||||
{
|
{
|
||||||
TiXmlNode* node = pParent->FirstChild("m_childShapePtr");\
|
XMLNode* node = pParent->FirstChildElement("m_childShapePtr");\
|
||||||
btAssert(node);
|
btAssert(node);
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
@@ -351,7 +352,7 @@ void btBulletXmlWorldImporter::deSerializeCompoundShapeData(TiXmlNode* pParent)
|
|||||||
MyLocalCaster cast;
|
MyLocalCaster cast;
|
||||||
cast.m_int = (int) atof(txt);
|
cast.m_int = (int) atof(txt);
|
||||||
compoundData->m_childShapePtr = (btCompoundShapeChildData*) cast.m_ptr;
|
compoundData->m_childShapePtr = (btCompoundShapeChildData*) cast.m_ptr;
|
||||||
node = node->NextSibling("m_childShapePtr");
|
node = node->NextSiblingElement("m_childShapePtr");
|
||||||
}
|
}
|
||||||
//SET_POINTER_VALUE(xmlColShape, *compoundData,m_childShapePtr,btCompoundShapeChildData*);
|
//SET_POINTER_VALUE(xmlColShape, *compoundData,m_childShapePtr,btCompoundShapeChildData*);
|
||||||
|
|
||||||
@@ -363,14 +364,14 @@ void btBulletXmlWorldImporter::deSerializeCompoundShapeData(TiXmlNode* pParent)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::deSerializeStaticPlaneShapeData(TiXmlNode* pParent)
|
void btBulletXmlWorldImporter::deSerializeStaticPlaneShapeData(XMLNode* pParent)
|
||||||
{
|
{
|
||||||
MyLocalCaster cast;
|
MyLocalCaster cast;
|
||||||
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
||||||
|
|
||||||
btStaticPlaneShapeData* planeData = (btStaticPlaneShapeData*) btAlignedAlloc(sizeof(btStaticPlaneShapeData),16);
|
btStaticPlaneShapeData* planeData = (btStaticPlaneShapeData*) btAlignedAlloc(sizeof(btStaticPlaneShapeData),16);
|
||||||
|
|
||||||
TiXmlNode* xmlShapeData = pParent->FirstChild("m_collisionShapeData");
|
XMLNode* xmlShapeData = pParent->FirstChildElement("m_collisionShapeData");
|
||||||
btAssert(xmlShapeData );
|
btAssert(xmlShapeData );
|
||||||
deSerializeCollisionShapeData(xmlShapeData,&planeData->m_collisionShapeData);
|
deSerializeCollisionShapeData(xmlShapeData,&planeData->m_collisionShapeData);
|
||||||
|
|
||||||
@@ -383,7 +384,7 @@ void btBulletXmlWorldImporter::deSerializeStaticPlaneShapeData(TiXmlNode* pParen
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::deSerializeDynamicsWorldData(TiXmlNode* pParent)
|
void btBulletXmlWorldImporter::deSerializeDynamicsWorldData(XMLNode* pParent)
|
||||||
{
|
{
|
||||||
btContactSolverInfo solverInfo;
|
btContactSolverInfo solverInfo;
|
||||||
//btVector3 gravity(0,0,0);
|
//btVector3 gravity(0,0,0);
|
||||||
@@ -393,7 +394,7 @@ void btBulletXmlWorldImporter::deSerializeDynamicsWorldData(TiXmlNode* pParent)
|
|||||||
//gravity and world info
|
//gravity and world info
|
||||||
}
|
}
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::deSerializeConvexInternalShapeData(TiXmlNode* pParent)
|
void btBulletXmlWorldImporter::deSerializeConvexInternalShapeData(XMLNode* pParent)
|
||||||
{
|
{
|
||||||
MyLocalCaster cast;
|
MyLocalCaster cast;
|
||||||
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
||||||
@@ -402,7 +403,7 @@ void btBulletXmlWorldImporter::deSerializeConvexInternalShapeData(TiXmlNode* pPa
|
|||||||
btConvexInternalShapeData* convexShape = (btConvexInternalShapeData*) btAlignedAlloc(sizeof(btConvexInternalShapeData),16);
|
btConvexInternalShapeData* convexShape = (btConvexInternalShapeData*) btAlignedAlloc(sizeof(btConvexInternalShapeData),16);
|
||||||
memset(convexShape,0,sizeof(btConvexInternalShapeData));
|
memset(convexShape,0,sizeof(btConvexInternalShapeData));
|
||||||
|
|
||||||
TiXmlNode* xmlShapeData = pParent->FirstChild("m_collisionShapeData");
|
XMLNode* xmlShapeData = pParent->FirstChildElement("m_collisionShapeData");
|
||||||
btAssert(xmlShapeData );
|
btAssert(xmlShapeData );
|
||||||
|
|
||||||
deSerializeCollisionShapeData(xmlShapeData,&convexShape->m_collisionShapeData);
|
deSerializeCollisionShapeData(xmlShapeData,&convexShape->m_collisionShapeData);
|
||||||
@@ -433,7 +434,7 @@ enum btTypedConstraintType
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::deSerializeGeneric6DofConstraintData(TiXmlNode* pParent)
|
void btBulletXmlWorldImporter::deSerializeGeneric6DofConstraintData(XMLNode* pParent)
|
||||||
{
|
{
|
||||||
MyLocalCaster cast;
|
MyLocalCaster cast;
|
||||||
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
get_int_attribute_by_name(pParent->ToElement(),"pointer",&cast.m_int);
|
||||||
@@ -441,7 +442,7 @@ void btBulletXmlWorldImporter::deSerializeGeneric6DofConstraintData(TiXmlNode* p
|
|||||||
btGeneric6DofConstraintData2* dof6Data = (btGeneric6DofConstraintData2*)btAlignedAlloc(sizeof(btGeneric6DofConstraintData2),16);
|
btGeneric6DofConstraintData2* dof6Data = (btGeneric6DofConstraintData2*)btAlignedAlloc(sizeof(btGeneric6DofConstraintData2),16);
|
||||||
|
|
||||||
|
|
||||||
TiXmlNode* n = pParent->FirstChild("m_typeConstraintData");
|
XMLNode* n = pParent->FirstChildElement("m_typeConstraintData");
|
||||||
if (n)
|
if (n)
|
||||||
{
|
{
|
||||||
SET_POINTER_VALUE(n,dof6Data->m_typeConstraintData,m_rbA,btRigidBodyData*);
|
SET_POINTER_VALUE(n,dof6Data->m_typeConstraintData,m_rbA,btRigidBodyData*);
|
||||||
@@ -473,7 +474,7 @@ void btBulletXmlWorldImporter::deSerializeGeneric6DofConstraintData(TiXmlNode* p
|
|||||||
m_pointerLookup.insert(cast.m_ptr,dof6Data);
|
m_pointerLookup.insert(cast.m_ptr,dof6Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::deSerializeRigidBodyFloatData(TiXmlNode* pParent)
|
void btBulletXmlWorldImporter::deSerializeRigidBodyFloatData(XMLNode* pParent)
|
||||||
{
|
{
|
||||||
MyLocalCaster cast;
|
MyLocalCaster cast;
|
||||||
|
|
||||||
@@ -485,7 +486,7 @@ void btBulletXmlWorldImporter::deSerializeRigidBodyFloatData(TiXmlNode* pParent)
|
|||||||
|
|
||||||
btRigidBodyData* rbData = (btRigidBodyData*)btAlignedAlloc(sizeof(btRigidBodyData),16);
|
btRigidBodyData* rbData = (btRigidBodyData*)btAlignedAlloc(sizeof(btRigidBodyData),16);
|
||||||
|
|
||||||
TiXmlNode* n = pParent->FirstChild("m_collisionObjectData");
|
XMLNode* n = pParent->FirstChildElement("m_collisionObjectData");
|
||||||
|
|
||||||
if (n)
|
if (n)
|
||||||
{
|
{
|
||||||
@@ -661,14 +662,14 @@ void btBulletXmlWorldImporter::fixupCollisionDataPointers(btCollisionShapeData*
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::auto_serialize_root_level_children(TiXmlNode* pParent)
|
void btBulletXmlWorldImporter::auto_serialize_root_level_children(XMLNode* pParent)
|
||||||
{
|
{
|
||||||
int numChildren = 0;
|
int numChildren = 0;
|
||||||
btAssert(pParent);
|
btAssert(pParent);
|
||||||
if (pParent)
|
if (pParent)
|
||||||
{
|
{
|
||||||
TiXmlNode*pChild;
|
XMLNode*pChild;
|
||||||
for ( pChild = pParent->FirstChild(); pChild != 0; pChild = pChild->NextSibling(), numChildren++)
|
for ( pChild = pParent->FirstChildElement(); pChild != 0; pChild = pChild->NextSibling(), numChildren++)
|
||||||
{
|
{
|
||||||
// printf("child Name=%s\n", pChild->Value());
|
// printf("child Name=%s\n", pChild->Value());
|
||||||
if (!strcmp(pChild->Value(),"btVector3FloatData"))
|
if (!strcmp(pChild->Value(),"btVector3FloatData"))
|
||||||
@@ -848,15 +849,15 @@ void btBulletXmlWorldImporter::auto_serialize_root_level_children(TiXmlNode* pPa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void btBulletXmlWorldImporter::auto_serialize(TiXmlNode* pParent)
|
void btBulletXmlWorldImporter::auto_serialize(XMLNode* pParent)
|
||||||
{
|
{
|
||||||
// TiXmlElement* root = pParent->FirstChildElement("bullet_physics");
|
// XMLElement* root = pParent->FirstChildElement("bullet_physics");
|
||||||
if (pParent)
|
if (pParent)
|
||||||
{
|
{
|
||||||
TiXmlNode*pChild;
|
XMLNode*pChild;
|
||||||
for ( pChild = pParent->FirstChild(); pChild != 0; pChild = pChild->NextSibling())
|
for ( pChild = pParent->FirstChildElement(); pChild != 0; pChild = pChild->NextSibling())
|
||||||
{
|
{
|
||||||
if (pChild->Type()==TiXmlNode::TINYXML_ELEMENT)
|
//if (pChild->Type()==XMLNode::TINYXML_ELEMENT)
|
||||||
{
|
{
|
||||||
// printf("root Name=%s\n", pChild->Value());
|
// printf("root Name=%s\n", pChild->Value());
|
||||||
auto_serialize_root_level_children(pChild);
|
auto_serialize_root_level_children(pChild);
|
||||||
@@ -873,13 +874,12 @@ void btBulletXmlWorldImporter::auto_serialize(TiXmlNode* pParent)
|
|||||||
|
|
||||||
bool btBulletXmlWorldImporter::loadFile(const char* fileName)
|
bool btBulletXmlWorldImporter::loadFile(const char* fileName)
|
||||||
{
|
{
|
||||||
TiXmlDocument doc(fileName);
|
XMLDocument doc;
|
||||||
|
|
||||||
bool loadOkay = doc.LoadFile();
|
|
||||||
//dump_to_stdout(&doc,0);
|
|
||||||
|
|
||||||
|
|
||||||
if (loadOkay)
|
XMLError loadOkay = doc.LoadFile(fileName);
|
||||||
|
|
||||||
|
if (loadOkay==XML_SUCCESS)
|
||||||
{
|
{
|
||||||
if (get_int_attribute_by_name(doc.FirstChildElement()->ToElement(),"version", &m_fileVersion))
|
if (get_int_attribute_by_name(doc.FirstChildElement()->ToElement(),"version", &m_fileVersion))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,12 @@ subject to the following restrictions:
|
|||||||
#include "LinearMath/btScalar.h"
|
#include "LinearMath/btScalar.h"
|
||||||
|
|
||||||
class btDynamicsWorld;
|
class btDynamicsWorld;
|
||||||
class TiXmlNode;
|
|
||||||
|
namespace tinyxml2
|
||||||
|
{
|
||||||
|
class XMLNode;
|
||||||
|
};
|
||||||
|
|
||||||
struct btConvexInternalShapeData;
|
struct btConvexInternalShapeData;
|
||||||
struct btCollisionShapeData;
|
struct btCollisionShapeData;
|
||||||
#ifdef BT_USE_DOUBLE_PRECISION
|
#ifdef BT_USE_DOUBLE_PRECISION
|
||||||
@@ -40,6 +45,8 @@ struct btCompoundShapeChildData;
|
|||||||
#include "LinearMath/btAlignedObjectArray.h"
|
#include "LinearMath/btAlignedObjectArray.h"
|
||||||
#include "btWorldImporter.h"
|
#include "btWorldImporter.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class btBulletXmlWorldImporter : public btWorldImporter
|
class btBulletXmlWorldImporter : public btWorldImporter
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -52,28 +59,28 @@ protected:
|
|||||||
int m_fileVersion;
|
int m_fileVersion;
|
||||||
bool m_fileOk;
|
bool m_fileOk;
|
||||||
|
|
||||||
void auto_serialize_root_level_children(TiXmlNode* pParent);
|
void auto_serialize_root_level_children(tinyxml2::XMLNode* pParent);
|
||||||
void auto_serialize(TiXmlNode* pParent);
|
void auto_serialize(tinyxml2::XMLNode* pParent);
|
||||||
|
|
||||||
void deSerializeVector3FloatData(TiXmlNode* pParent,btAlignedObjectArray<btVector3FloatData>& vectors);
|
void deSerializeVector3FloatData(tinyxml2::XMLNode* pParent,btAlignedObjectArray<btVector3FloatData>& vectors);
|
||||||
|
|
||||||
void fixupCollisionDataPointers(btCollisionShapeData* shapeData);
|
void fixupCollisionDataPointers(btCollisionShapeData* shapeData);
|
||||||
void fixupConstraintData(btTypedConstraintData2* tcd);
|
void fixupConstraintData(btTypedConstraintData2* tcd);
|
||||||
|
|
||||||
//collision shapes data
|
//collision shapes data
|
||||||
void deSerializeCollisionShapeData(TiXmlNode* pParent,btCollisionShapeData* colShapeData);
|
void deSerializeCollisionShapeData(tinyxml2::XMLNode* pParent,btCollisionShapeData* colShapeData);
|
||||||
void deSerializeConvexInternalShapeData(TiXmlNode* pParent);
|
void deSerializeConvexInternalShapeData(tinyxml2::XMLNode* pParent);
|
||||||
void deSerializeStaticPlaneShapeData(TiXmlNode* pParent);
|
void deSerializeStaticPlaneShapeData(tinyxml2::XMLNode* pParent);
|
||||||
void deSerializeCompoundShapeData(TiXmlNode* pParent);
|
void deSerializeCompoundShapeData(tinyxml2::XMLNode* pParent);
|
||||||
void deSerializeCompoundShapeChildData(TiXmlNode* pParent);
|
void deSerializeCompoundShapeChildData(tinyxml2::XMLNode* pParent);
|
||||||
void deSerializeConvexHullShapeData(TiXmlNode* pParent);
|
void deSerializeConvexHullShapeData(tinyxml2::XMLNode* pParent);
|
||||||
void deSerializeDynamicsWorldData(TiXmlNode* parent);
|
void deSerializeDynamicsWorldData(tinyxml2::XMLNode* parent);
|
||||||
|
|
||||||
///bodies
|
///bodies
|
||||||
void deSerializeRigidBodyFloatData(TiXmlNode* pParent);
|
void deSerializeRigidBodyFloatData(tinyxml2::XMLNode* pParent);
|
||||||
|
|
||||||
///constraints
|
///constraints
|
||||||
void deSerializeGeneric6DofConstraintData(TiXmlNode* pParent);
|
void deSerializeGeneric6DofConstraintData(tinyxml2::XMLNode* pParent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
btBulletXmlWorldImporter(btDynamicsWorld* world);
|
btBulletXmlWorldImporter(btDynamicsWorld* world);
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
project "BulletXmlWorldImporter"
|
project "BulletXmlWorldImporter"
|
||||||
|
|
||||||
kind "StaticLib"
|
kind "StaticLib"
|
||||||
targetdir "../../lib"
|
--targetdir "../../lib"
|
||||||
includedirs {
|
includedirs {
|
||||||
"../BulletWorldImporter",
|
"../BulletWorldImporter",
|
||||||
"../BulletFileLoader",
|
"../BulletFileLoader",
|
||||||
"../../../src"
|
"../../../src",
|
||||||
|
"../../../examples/ThirdPartyLibs/tinyxml2"
|
||||||
}
|
}
|
||||||
|
|
||||||
files {
|
files {
|
||||||
"**.cpp",
|
"**.cpp",
|
||||||
"**.h"
|
"**.h",
|
||||||
|
"../../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp",
|
||||||
}
|
}
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
/*
|
|
||||||
www.sourceforge.net/projects/tinyxml
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
|
||||||
warranty. In no event will the authors be held liable for any
|
|
||||||
damages arising from the use of this software.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any
|
|
||||||
purpose, including commercial applications, and to alter it and
|
|
||||||
redistribute it freely, subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you must
|
|
||||||
not claim that you wrote the original software. If you use this
|
|
||||||
software in a product, an acknowledgment in the product documentation
|
|
||||||
would be appreciated but is not required.
|
|
||||||
|
|
||||||
2. Altered source versions must be plainly marked as such, and
|
|
||||||
must not be misrepresented as being the original software.
|
|
||||||
|
|
||||||
3. This notice may not be removed or altered from any source
|
|
||||||
distribution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef TIXML_USE_STL
|
|
||||||
|
|
||||||
#include "tinystr.h"
|
|
||||||
|
|
||||||
// Error value for find primitive
|
|
||||||
const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1);
|
|
||||||
|
|
||||||
|
|
||||||
// Null rep.
|
|
||||||
TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\0' } };
|
|
||||||
|
|
||||||
|
|
||||||
void TiXmlString::reserve (size_type cap)
|
|
||||||
{
|
|
||||||
if (cap > capacity())
|
|
||||||
{
|
|
||||||
TiXmlString tmp;
|
|
||||||
tmp.init(length(), cap);
|
|
||||||
memcpy(tmp.start(), data(), length());
|
|
||||||
swap(tmp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TiXmlString& TiXmlString::assign(const char* str, size_type len)
|
|
||||||
{
|
|
||||||
size_type cap = capacity();
|
|
||||||
if (len > cap || cap > 3*(len + 8))
|
|
||||||
{
|
|
||||||
TiXmlString tmp;
|
|
||||||
tmp.init(len);
|
|
||||||
memcpy(tmp.start(), str, len);
|
|
||||||
swap(tmp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
memmove(start(), str, len);
|
|
||||||
set_size(len);
|
|
||||||
}
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TiXmlString& TiXmlString::append(const char* str, size_type len)
|
|
||||||
{
|
|
||||||
size_type newsize = length() + len;
|
|
||||||
if (newsize > capacity())
|
|
||||||
{
|
|
||||||
reserve (newsize + capacity());
|
|
||||||
}
|
|
||||||
memmove(finish(), str, len);
|
|
||||||
set_size(newsize);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TiXmlString operator + (const TiXmlString & a, const TiXmlString & b)
|
|
||||||
{
|
|
||||||
TiXmlString tmp;
|
|
||||||
tmp.reserve(a.length() + b.length());
|
|
||||||
tmp += a;
|
|
||||||
tmp += b;
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
TiXmlString operator + (const TiXmlString & a, const char* b)
|
|
||||||
{
|
|
||||||
TiXmlString tmp;
|
|
||||||
TiXmlString::size_type b_len = static_cast<TiXmlString::size_type>( strlen(b) );
|
|
||||||
tmp.reserve(a.length() + b_len);
|
|
||||||
tmp += a;
|
|
||||||
tmp.append(b, b_len);
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
TiXmlString operator + (const char* a, const TiXmlString & b)
|
|
||||||
{
|
|
||||||
TiXmlString tmp;
|
|
||||||
TiXmlString::size_type a_len = static_cast<TiXmlString::size_type>( strlen(a) );
|
|
||||||
tmp.reserve(a_len + b.length());
|
|
||||||
tmp.append(a, a_len);
|
|
||||||
tmp += b;
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif // TIXML_USE_STL
|
|
||||||
@@ -1,305 +0,0 @@
|
|||||||
/*
|
|
||||||
www.sourceforge.net/projects/tinyxml
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
|
||||||
warranty. In no event will the authors be held liable for any
|
|
||||||
damages arising from the use of this software.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any
|
|
||||||
purpose, including commercial applications, and to alter it and
|
|
||||||
redistribute it freely, subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you must
|
|
||||||
not claim that you wrote the original software. If you use this
|
|
||||||
software in a product, an acknowledgment in the product documentation
|
|
||||||
would be appreciated but is not required.
|
|
||||||
|
|
||||||
2. Altered source versions must be plainly marked as such, and
|
|
||||||
must not be misrepresented as being the original software.
|
|
||||||
|
|
||||||
3. This notice may not be removed or altered from any source
|
|
||||||
distribution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef TIXML_USE_STL
|
|
||||||
|
|
||||||
#ifndef TIXML_STRING_INCLUDED
|
|
||||||
#define TIXML_STRING_INCLUDED
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/* The support for explicit isn't that universal, and it isn't really
|
|
||||||
required - it is used to check that the TiXmlString class isn't incorrectly
|
|
||||||
used. Be nice to old compilers and macro it here:
|
|
||||||
*/
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1200 )
|
|
||||||
// Microsoft visual studio, version 6 and higher.
|
|
||||||
#define TIXML_EXPLICIT explicit
|
|
||||||
#elif defined(__GNUC__) && (__GNUC__ >= 3 )
|
|
||||||
// GCC version 3 and higher.s
|
|
||||||
#define TIXML_EXPLICIT explicit
|
|
||||||
#else
|
|
||||||
#define TIXML_EXPLICIT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
TiXmlString is an emulation of a subset of the std::string template.
|
|
||||||
Its purpose is to allow compiling TinyXML on compilers with no or poor STL support.
|
|
||||||
Only the member functions relevant to the TinyXML project have been implemented.
|
|
||||||
The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase
|
|
||||||
a string and there's no more room, we allocate a buffer twice as big as we need.
|
|
||||||
*/
|
|
||||||
class TiXmlString
|
|
||||||
{
|
|
||||||
public :
|
|
||||||
// The size type used
|
|
||||||
typedef size_t size_type;
|
|
||||||
|
|
||||||
// Error value for find primitive
|
|
||||||
static const size_type npos; // = -1;
|
|
||||||
|
|
||||||
|
|
||||||
// TiXmlString empty constructor
|
|
||||||
TiXmlString () : rep_(&nullrep_)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// TiXmlString copy constructor
|
|
||||||
TiXmlString ( const TiXmlString & copy) : rep_(0)
|
|
||||||
{
|
|
||||||
init(copy.length());
|
|
||||||
memcpy(start(), copy.data(), length());
|
|
||||||
}
|
|
||||||
|
|
||||||
// TiXmlString constructor, based on a string
|
|
||||||
TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0)
|
|
||||||
{
|
|
||||||
init( static_cast<size_type>( strlen(copy) ));
|
|
||||||
memcpy(start(), copy, length());
|
|
||||||
}
|
|
||||||
|
|
||||||
// TiXmlString constructor, based on a string
|
|
||||||
TIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0)
|
|
||||||
{
|
|
||||||
init(len);
|
|
||||||
memcpy(start(), str, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TiXmlString destructor
|
|
||||||
~TiXmlString ()
|
|
||||||
{
|
|
||||||
quit();
|
|
||||||
}
|
|
||||||
|
|
||||||
TiXmlString& operator = (const char * copy)
|
|
||||||
{
|
|
||||||
return assign( copy, (size_type)strlen(copy));
|
|
||||||
}
|
|
||||||
|
|
||||||
TiXmlString& operator = (const TiXmlString & copy)
|
|
||||||
{
|
|
||||||
return assign(copy.start(), copy.length());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// += operator. Maps to append
|
|
||||||
TiXmlString& operator += (const char * suffix)
|
|
||||||
{
|
|
||||||
return append(suffix, static_cast<size_type>( strlen(suffix) ));
|
|
||||||
}
|
|
||||||
|
|
||||||
// += operator. Maps to append
|
|
||||||
TiXmlString& operator += (char single)
|
|
||||||
{
|
|
||||||
return append(&single, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// += operator. Maps to append
|
|
||||||
TiXmlString& operator += (const TiXmlString & suffix)
|
|
||||||
{
|
|
||||||
return append(suffix.data(), suffix.length());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Convert a TiXmlString into a null-terminated char *
|
|
||||||
const char * c_str () const { return rep_->str; }
|
|
||||||
|
|
||||||
// Convert a TiXmlString into a char * (need not be null terminated).
|
|
||||||
const char * data () const { return rep_->str; }
|
|
||||||
|
|
||||||
// Return the length of a TiXmlString
|
|
||||||
size_type length () const { return rep_->size; }
|
|
||||||
|
|
||||||
// Alias for length()
|
|
||||||
size_type size () const { return rep_->size; }
|
|
||||||
|
|
||||||
// Checks if a TiXmlString is empty
|
|
||||||
bool empty () const { return rep_->size == 0; }
|
|
||||||
|
|
||||||
// Return capacity of string
|
|
||||||
size_type capacity () const { return rep_->capacity; }
|
|
||||||
|
|
||||||
|
|
||||||
// single char extraction
|
|
||||||
const char& at (size_type index) const
|
|
||||||
{
|
|
||||||
assert( index < length() );
|
|
||||||
return rep_->str[ index ];
|
|
||||||
}
|
|
||||||
|
|
||||||
// [] operator
|
|
||||||
char& operator [] (size_type index) const
|
|
||||||
{
|
|
||||||
assert( index < length() );
|
|
||||||
return rep_->str[ index ];
|
|
||||||
}
|
|
||||||
|
|
||||||
// find a char in a string. Return TiXmlString::npos if not found
|
|
||||||
size_type find (char lookup) const
|
|
||||||
{
|
|
||||||
return find(lookup, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// find a char in a string from an offset. Return TiXmlString::npos if not found
|
|
||||||
size_type find (char tofind, size_type offset) const
|
|
||||||
{
|
|
||||||
if (offset >= length()) return npos;
|
|
||||||
|
|
||||||
for (const char* p = c_str() + offset; *p != '\0'; ++p)
|
|
||||||
{
|
|
||||||
if (*p == tofind) return static_cast< size_type >( p - c_str() );
|
|
||||||
}
|
|
||||||
return npos;
|
|
||||||
}
|
|
||||||
|
|
||||||
void clear ()
|
|
||||||
{
|
|
||||||
//Lee:
|
|
||||||
//The original was just too strange, though correct:
|
|
||||||
// TiXmlString().swap(*this);
|
|
||||||
//Instead use the quit & re-init:
|
|
||||||
quit();
|
|
||||||
init(0,0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function to reserve a big amount of data when we know we'll need it. Be aware that this
|
|
||||||
function DOES NOT clear the content of the TiXmlString if any exists.
|
|
||||||
*/
|
|
||||||
void reserve (size_type cap);
|
|
||||||
|
|
||||||
TiXmlString& assign (const char* str, size_type len);
|
|
||||||
|
|
||||||
TiXmlString& append (const char* str, size_type len);
|
|
||||||
|
|
||||||
void swap (TiXmlString& other)
|
|
||||||
{
|
|
||||||
Rep* r = rep_;
|
|
||||||
rep_ = other.rep_;
|
|
||||||
other.rep_ = r;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
void init(size_type sz) { init(sz, sz); }
|
|
||||||
void set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\0'; }
|
|
||||||
char* start() const { return rep_->str; }
|
|
||||||
char* finish() const { return rep_->str + rep_->size; }
|
|
||||||
|
|
||||||
struct Rep
|
|
||||||
{
|
|
||||||
size_type size, capacity;
|
|
||||||
char str[1];
|
|
||||||
};
|
|
||||||
|
|
||||||
void init(size_type sz, size_type cap)
|
|
||||||
{
|
|
||||||
if (cap)
|
|
||||||
{
|
|
||||||
// Lee: the original form:
|
|
||||||
// rep_ = static_cast<Rep*>(operator new(sizeof(Rep) + cap));
|
|
||||||
// doesn't work in some cases of new being overloaded. Switching
|
|
||||||
// to the normal allocation, although use an 'int' for systems
|
|
||||||
// that are overly picky about structure alignment.
|
|
||||||
const size_type bytesNeeded = sizeof(Rep) + cap;
|
|
||||||
const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int );
|
|
||||||
rep_ = reinterpret_cast<Rep*>( new int[ intsNeeded ] );
|
|
||||||
|
|
||||||
rep_->str[ rep_->size = sz ] = '\0';
|
|
||||||
rep_->capacity = cap;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rep_ = &nullrep_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void quit()
|
|
||||||
{
|
|
||||||
if (rep_ != &nullrep_)
|
|
||||||
{
|
|
||||||
// The rep_ is really an array of ints. (see the allocator, above).
|
|
||||||
// Cast it back before delete, so the compiler won't incorrectly call destructors.
|
|
||||||
delete [] ( reinterpret_cast<int*>( rep_ ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rep * rep_;
|
|
||||||
static Rep nullrep_;
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
inline bool operator == (const TiXmlString & a, const TiXmlString & b)
|
|
||||||
{
|
|
||||||
return ( a.length() == b.length() ) // optimization on some platforms
|
|
||||||
&& ( strcmp(a.c_str(), b.c_str()) == 0 ); // actual compare
|
|
||||||
}
|
|
||||||
inline bool operator < (const TiXmlString & a, const TiXmlString & b)
|
|
||||||
{
|
|
||||||
return strcmp(a.c_str(), b.c_str()) < 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); }
|
|
||||||
inline bool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; }
|
|
||||||
inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); }
|
|
||||||
inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); }
|
|
||||||
|
|
||||||
inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; }
|
|
||||||
inline bool operator == (const char* a, const TiXmlString & b) { return b == a; }
|
|
||||||
inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); }
|
|
||||||
inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); }
|
|
||||||
|
|
||||||
TiXmlString operator + (const TiXmlString & a, const TiXmlString & b);
|
|
||||||
TiXmlString operator + (const TiXmlString & a, const char* b);
|
|
||||||
TiXmlString operator + (const char* a, const TiXmlString & b);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString.
|
|
||||||
Only the operators that we need for TinyXML have been developped.
|
|
||||||
*/
|
|
||||||
class TiXmlOutStream : public TiXmlString
|
|
||||||
{
|
|
||||||
public :
|
|
||||||
|
|
||||||
// TiXmlOutStream << operator.
|
|
||||||
TiXmlOutStream & operator << (const TiXmlString & in)
|
|
||||||
{
|
|
||||||
*this += in;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TiXmlOutStream << operator.
|
|
||||||
TiXmlOutStream & operator << (const char * in)
|
|
||||||
{
|
|
||||||
*this += in;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
#endif // TIXML_STRING_INCLUDED
|
|
||||||
#endif // TIXML_USE_STL
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
www.sourceforge.net/projects/tinyxml
|
|
||||||
Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
|
||||||
warranty. In no event will the authors be held liable for any
|
|
||||||
damages arising from the use of this software.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any
|
|
||||||
purpose, including commercial applications, and to alter it and
|
|
||||||
redistribute it freely, subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you must
|
|
||||||
not claim that you wrote the original software. If you use this
|
|
||||||
software in a product, an acknowledgment in the product documentation
|
|
||||||
would be appreciated but is not required.
|
|
||||||
|
|
||||||
2. Altered source versions must be plainly marked as such, and
|
|
||||||
must not be misrepresented as being the original software.
|
|
||||||
|
|
||||||
3. This notice may not be removed or altered from any source
|
|
||||||
distribution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "tinyxml.h"
|
|
||||||
|
|
||||||
// The goal of the seperate error file is to make the first
|
|
||||||
// step towards localization. tinyxml (currently) only supports
|
|
||||||
// english error messages, but the could now be translated.
|
|
||||||
//
|
|
||||||
// It also cleans up the code a bit.
|
|
||||||
//
|
|
||||||
|
|
||||||
const char* TiXmlBase::errorString[ TiXmlBase::TIXML_ERROR_STRING_COUNT ] =
|
|
||||||
{
|
|
||||||
"No error",
|
|
||||||
"Error",
|
|
||||||
"Failed to open file",
|
|
||||||
"Error parsing Element.",
|
|
||||||
"Failed to read Element name",
|
|
||||||
"Error reading Element value.",
|
|
||||||
"Error reading Attributes.",
|
|
||||||
"Error: empty tag.",
|
|
||||||
"Error reading end tag.",
|
|
||||||
"Error parsing Unknown.",
|
|
||||||
"Error parsing Comment.",
|
|
||||||
"Error parsing Declaration.",
|
|
||||||
"Error document empty.",
|
|
||||||
"Error null (0) or unexpected EOF found in input stream.",
|
|
||||||
"Error parsing CDATA.",
|
|
||||||
"Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
|
|
||||||
};
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
IF (BUILD_BLEND_DEMO OR INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
IF (BUILD_BLEND_DEMO OR INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
|
||||||
SUBDIRS(BlenderSerialize )
|
#SUBDIRS(BlenderSerialize )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ SET(includes
|
|||||||
|
|
||||||
|
|
||||||
LINK_LIBRARIES(
|
LINK_LIBRARIES(
|
||||||
BulletFileLoader BlenderSerialize LinearMath
|
BulletFileLoader LinearMath
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${includes})
|
INCLUDE_DIRECTORIES(${includes})
|
||||||
|
|||||||
@@ -86,10 +86,12 @@ typedef unsigned __int64 uint64_t;
|
|||||||
|
|
||||||
/* Linux-i386, Linux-Alpha, Linux-ppc */
|
/* Linux-i386, Linux-Alpha, Linux-ppc */
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
typedef intptr_t btintptr_t;
|
||||||
|
|
||||||
#elif defined (__APPLE__)
|
#elif defined (__APPLE__)
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
typedef intptr_t btintptr_t;
|
||||||
|
|
||||||
#elif defined(FREE_WINDOWS)
|
#elif defined(FREE_WINDOWS)
|
||||||
|
|
||||||
@@ -132,6 +134,7 @@ typedef unsigned __int64 uint64_t;
|
|||||||
#include "BulletCollision/CollisionShapes/btConeShape.h"
|
#include "BulletCollision/CollisionShapes/btConeShape.h"
|
||||||
#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
|
#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
|
||||||
#include "BulletCollision/CollisionShapes/btTriangleInfoMap.h"
|
#include "BulletCollision/CollisionShapes/btTriangleInfoMap.h"
|
||||||
|
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
|
||||||
#include "BulletCollision/Gimpact/btGImpactShape.h"
|
#include "BulletCollision/Gimpact/btGImpactShape.h"
|
||||||
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
|
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
|
||||||
#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
|
#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
|
||||||
@@ -149,6 +152,7 @@ typedef unsigned __int64 uint64_t;
|
|||||||
#include "BulletDynamics/Dynamics/btRigidBody.h"
|
#include "BulletDynamics/Dynamics/btRigidBody.h"
|
||||||
#include "BulletSoftBody/btSoftBodyData.h"
|
#include "BulletSoftBody/btSoftBodyData.h"
|
||||||
#include "BulletDynamics/Featherstone/btMultiBody.h"
|
#include "BulletDynamics/Featherstone/btMultiBody.h"
|
||||||
|
#include "BulletDynamics/Featherstone/btMultiBodyLinkCollider.h"
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@@ -180,6 +184,7 @@ char *includefiles[] = {
|
|||||||
"../../../src/BulletCollision/CollisionShapes/btConeShape.h",
|
"../../../src/BulletCollision/CollisionShapes/btConeShape.h",
|
||||||
"../../../src/BulletCollision/CollisionShapes/btCapsuleShape.h",
|
"../../../src/BulletCollision/CollisionShapes/btCapsuleShape.h",
|
||||||
"../../../src/BulletCollision/CollisionShapes/btTriangleInfoMap.h",
|
"../../../src/BulletCollision/CollisionShapes/btTriangleInfoMap.h",
|
||||||
|
"../../../src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h",
|
||||||
"../../../src/BulletCollision/Gimpact/btGImpactShape.h",
|
"../../../src/BulletCollision/Gimpact/btGImpactShape.h",
|
||||||
"../../../src/BulletCollision/CollisionShapes/btConvexHullShape.h",
|
"../../../src/BulletCollision/CollisionShapes/btConvexHullShape.h",
|
||||||
"../../../src/BulletCollision/CollisionDispatch/btCollisionObject.h",
|
"../../../src/BulletCollision/CollisionDispatch/btCollisionObject.h",
|
||||||
@@ -198,6 +203,7 @@ char *includefiles[] = {
|
|||||||
|
|
||||||
"../../../src/BulletSoftBody/btSoftBodyData.h",
|
"../../../src/BulletSoftBody/btSoftBodyData.h",
|
||||||
"../../../src/BulletDynamics/Featherstone/btMultiBody.h",
|
"../../../src/BulletDynamics/Featherstone/btMultiBody.h",
|
||||||
|
"../../../src/BulletDynamics/Featherstone/btMultiBodyLinkCollider.h",
|
||||||
// empty string to indicate end of includefiles
|
// empty string to indicate end of includefiles
|
||||||
""
|
""
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
project "vhacd"
|
project "vhacd"
|
||||||
|
|
||||||
kind "StaticLib"
|
kind "StaticLib"
|
||||||
|
if os.is("Linux") then
|
||||||
|
buildoptions{"-fPIC"}
|
||||||
|
end
|
||||||
includedirs {
|
includedirs {
|
||||||
"../inc","../public",
|
"../inc","../public",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,14 @@
|
|||||||
using namespace VHACD;
|
using namespace VHACD;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
bool replace(std::string& str, const std::string& from, const std::string& to) {
|
||||||
|
size_t start_pos = str.find(from);
|
||||||
|
if(start_pos == std::string::npos)
|
||||||
|
return false;
|
||||||
|
str.replace(start_pos, from.length(), to);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
class MyCallback : public IVHACD::IUserCallback {
|
class MyCallback : public IVHACD::IUserCallback {
|
||||||
public:
|
public:
|
||||||
MyCallback(void) {}
|
MyCallback(void) {}
|
||||||
@@ -293,7 +301,16 @@ void ParseParameters(int argc, char* argv[], Parameters& params)
|
|||||||
for (int i = 1; i < argc; ++i) {
|
for (int i = 1; i < argc; ++i) {
|
||||||
if (!strcmp(argv[i], "--input")) {
|
if (!strcmp(argv[i], "--input")) {
|
||||||
if (++i < argc)
|
if (++i < argc)
|
||||||
|
{
|
||||||
params.m_fileNameIn = argv[i];
|
params.m_fileNameIn = argv[i];
|
||||||
|
//come up with some default output name, if not provided
|
||||||
|
if (params.m_fileNameOut.length()==0)
|
||||||
|
{
|
||||||
|
string tmp = argv[i];
|
||||||
|
replace(tmp,".obj",".vhacd.obj");
|
||||||
|
params.m_fileNameOut = tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!strcmp(argv[i], "--output")) {
|
else if (!strcmp(argv[i], "--output")) {
|
||||||
if (++i < argc)
|
if (++i < argc)
|
||||||
|
|||||||
@@ -13,6 +13,22 @@
|
|||||||
#include "Bullet3Common/b3FileUtils.h"
|
#include "Bullet3Common/b3FileUtils.h"
|
||||||
#include "../Utils/b3ResourcePath.h"
|
#include "../Utils/b3ResourcePath.h"
|
||||||
#include "Bullet3Common/b3CommandLineArgs.h"
|
#include "Bullet3Common/b3CommandLineArgs.h"
|
||||||
|
#include "Bullet3Common/b3HashMap.h"
|
||||||
|
|
||||||
|
struct ShapeContainer
|
||||||
|
{
|
||||||
|
std::string m_matName;
|
||||||
|
std::string m_shapeName;
|
||||||
|
tinyobj::material_t material;
|
||||||
|
std::vector<float> positions;
|
||||||
|
std::vector<float> normals;
|
||||||
|
std::vector<float> texcoords;
|
||||||
|
std::vector<unsigned int> indices;
|
||||||
|
|
||||||
|
b3AlignedObjectArray<int> m_shapeIndices;
|
||||||
|
};
|
||||||
|
|
||||||
|
b3HashMap<b3HashString, ShapeContainer> gMaterialNames;
|
||||||
|
|
||||||
#define MAX_PATH_LEN 1024
|
#define MAX_PATH_LEN 1024
|
||||||
|
|
||||||
@@ -53,6 +69,8 @@ int main(int argc, char* argv[])
|
|||||||
printf("Please use --fileName=\"pathToObj\".");
|
printf("Please use --fileName=\"pathToObj\".");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
bool mergeMaterials = args.CheckCmdLineFlag("mergeMaterials");
|
||||||
|
|
||||||
char fileNameWithPath[MAX_PATH_LEN];
|
char fileNameWithPath[MAX_PATH_LEN];
|
||||||
bool fileFound = (b3ResourcePath::findResourcePath(fileName,fileNameWithPath,MAX_PATH_LEN))>0;
|
bool fileFound = (b3ResourcePath::findResourcePath(fileName,fileNameWithPath,MAX_PATH_LEN))>0;
|
||||||
char materialPrefixPath[MAX_PATH_LEN];
|
char materialPrefixPath[MAX_PATH_LEN];
|
||||||
@@ -72,6 +90,220 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
fprintf(sdfFile, "<sdf version='1.6'>\n\t<world name='default'>\n\t<gravity>0 0 -9.8</gravity>\n");
|
fprintf(sdfFile, "<sdf version='1.6'>\n\t<world name='default'>\n\t<gravity>0 0 -9.8</gravity>\n");
|
||||||
|
|
||||||
|
for (int s = 0; s < (int)shapes.size(); s++)
|
||||||
|
{
|
||||||
|
tinyobj::shape_t& shape = shapes[s];
|
||||||
|
tinyobj::material_t mat = shape.material;
|
||||||
|
|
||||||
|
b3HashString key = mat.name.length() ? mat.name.c_str() : "";
|
||||||
|
if (!gMaterialNames.find(key))
|
||||||
|
{
|
||||||
|
ShapeContainer container;
|
||||||
|
container.m_matName = mat.name;
|
||||||
|
container.m_shapeName = shape.name;
|
||||||
|
container.material = mat;
|
||||||
|
gMaterialNames.insert(key, container);
|
||||||
|
}
|
||||||
|
|
||||||
|
ShapeContainer* shapeC = gMaterialNames.find(key);
|
||||||
|
if (shapeC)
|
||||||
|
{
|
||||||
|
shapeC->m_shapeIndices.push_back(s);
|
||||||
|
|
||||||
|
int curPositions = shapeC->positions.size()/3;
|
||||||
|
int curNormals = shapeC->normals.size()/3;
|
||||||
|
int curTexcoords = shapeC->texcoords.size()/2;
|
||||||
|
|
||||||
|
int faceCount = shape.mesh.indices.size();
|
||||||
|
int vertexCount = shape.mesh.positions.size();
|
||||||
|
for (int v = 0; v < vertexCount; v++)
|
||||||
|
{
|
||||||
|
shapeC->positions.push_back(shape.mesh.positions[v]);
|
||||||
|
}
|
||||||
|
int numNormals = int(shape.mesh.normals.size());
|
||||||
|
for (int vn = 0; vn < numNormals; vn++)
|
||||||
|
{
|
||||||
|
shapeC->normals.push_back(shape.mesh.normals[vn]);
|
||||||
|
}
|
||||||
|
int numTexCoords = int(shape.mesh.texcoords.size());
|
||||||
|
for (int vt = 0; vt < numTexCoords; vt++)
|
||||||
|
{
|
||||||
|
shapeC->texcoords.push_back(shape.mesh.texcoords[vt]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int face = 0; face < faceCount; face += 3)
|
||||||
|
{
|
||||||
|
if (face < 0 && face >= int(shape.mesh.indices.size()))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
shapeC->indices.push_back(shape.mesh.indices[face] + curPositions);
|
||||||
|
shapeC->indices.push_back(shape.mesh.indices[face+1] + curPositions);
|
||||||
|
shapeC->indices.push_back(shape.mesh.indices[face + 2] + curPositions);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("unique materials=%d\n", gMaterialNames.size());
|
||||||
|
|
||||||
|
|
||||||
|
if (mergeMaterials)
|
||||||
|
{
|
||||||
|
for (int m = 0; m < gMaterialNames.size();m++)
|
||||||
|
{
|
||||||
|
if (gMaterialNames.getAtIndex(m)->m_shapeIndices.size() == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
ShapeContainer* shapeCon =gMaterialNames.getAtIndex(m);
|
||||||
|
|
||||||
|
printf("object name = %s\n", shapeCon->m_shapeName.c_str());
|
||||||
|
|
||||||
|
char objSdfPartFileName[MAX_PATH_LEN];
|
||||||
|
sprintf(objSdfPartFileName, "part%d.obj", m);
|
||||||
|
|
||||||
|
char objFileName[MAX_PATH_LEN];
|
||||||
|
if (strlen(materialPrefixPath) > 0)
|
||||||
|
{
|
||||||
|
sprintf(objFileName, "%s/part%d.obj", materialPrefixPath, m);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprintf(objFileName, "part%d.obj", m);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FILE* f = fopen(objFileName, "w");
|
||||||
|
if (f == 0)
|
||||||
|
{
|
||||||
|
printf("Fatal error: cannot create part obj file %s\n", objFileName);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
fprintf(f, "# Exported using automatic converter by Erwin Coumans\n");
|
||||||
|
if (matLibName.length())
|
||||||
|
{
|
||||||
|
fprintf(f, "mtllib %s.mtl\n", matLibName.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf(f, "mtllib bedroom.mtl\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int faceCount = shapeCon->indices.size();
|
||||||
|
int vertexCount = shapeCon->positions.size();
|
||||||
|
tinyobj::material_t mat = shapeCon->material;
|
||||||
|
if (shapeCon->m_matName.length())
|
||||||
|
{
|
||||||
|
const char* objName = shapeCon->m_matName.c_str();
|
||||||
|
printf("mat.name = %s\n", objName);
|
||||||
|
fprintf(f, "#object %s\n\n", objName);
|
||||||
|
}
|
||||||
|
for (int v = 0; v < vertexCount / 3; v++)
|
||||||
|
{
|
||||||
|
fprintf(f, "v %f %f %f\n", shapeCon->positions[v * 3 + 0], shapeCon->positions[v * 3 + 1], shapeCon->positions[v * 3 + 2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mat.name.length())
|
||||||
|
{
|
||||||
|
fprintf(f, "usemtl %s\n", mat.name.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf(f, "usemtl wire_028089177\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(f, "\n");
|
||||||
|
int numNormals = int(shapeCon->normals.size());
|
||||||
|
|
||||||
|
for (int vn = 0; vn < numNormals / 3; vn++)
|
||||||
|
{
|
||||||
|
fprintf(f, "vn %f %f %f\n", shapeCon->normals[vn * 3 + 0], shapeCon->normals[vn * 3 + 1], shapeCon->normals[vn * 3 + 2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(f, "\n");
|
||||||
|
int numTexCoords = int(shapeCon->texcoords.size());
|
||||||
|
for (int vt = 0; vt < numTexCoords / 2; vt++)
|
||||||
|
{
|
||||||
|
fprintf(f, "vt %f %f\n", shapeCon->texcoords[vt * 2 + 0], shapeCon->texcoords[vt * 2 + 1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(f, "s off\n");
|
||||||
|
|
||||||
|
for (int face = 0; face < faceCount; face += 3)
|
||||||
|
{
|
||||||
|
if (face < 0 && face >= int(shapeCon->indices.size()))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
fprintf(f, "f %d/%d/%d %d/%d/%d %d/%d/%d\n",
|
||||||
|
shapeCon->indices[face] + 1, shapeCon->indices[face] + 1, shapeCon->indices[face] + 1,
|
||||||
|
shapeCon->indices[face + 1] + 1, shapeCon->indices[face + 1] + 1, shapeCon->indices[face + 1] + 1,
|
||||||
|
shapeCon->indices[face + 2] + 1, shapeCon->indices[face + 2] + 1, shapeCon->indices[face + 2] + 1);
|
||||||
|
}
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
float kdRed = mat.diffuse[0];
|
||||||
|
float kdGreen = mat.diffuse[1];
|
||||||
|
float kdBlue = mat.diffuse[2];
|
||||||
|
float transparency = mat.transparency;
|
||||||
|
|
||||||
|
fprintf(sdfFile, "\t\t<model name='%s'>\n"
|
||||||
|
"\t\t\t<static>1</static>\n"
|
||||||
|
"\t\t\t<pose frame=''>0 0 0 0 0 0</pose>\n"
|
||||||
|
"\t\t\t<link name='link_d%d'>\n"
|
||||||
|
"\t\t\t<inertial>\n"
|
||||||
|
"\t\t\t<mass>0</mass>\n"
|
||||||
|
"\t\t\t<inertia>\n"
|
||||||
|
"\t\t\t<ixx>0.166667</ixx>\n"
|
||||||
|
"\t\t\t<ixy>0</ixy>\n"
|
||||||
|
"\t\t\t<ixz>0</ixz>\n"
|
||||||
|
"\t\t\t<iyy>0.166667</iyy>\n"
|
||||||
|
"\t\t\t<iyz>0</iyz>\n"
|
||||||
|
"\t\t\t<izz>0.166667</izz>\n"
|
||||||
|
"\t\t\t</inertia>\n"
|
||||||
|
"\t\t\t</inertial>\n"
|
||||||
|
"\t\t\t<collision concave='yes' name='collision_%d'>\n"
|
||||||
|
"\t\t\t<geometry>\n"
|
||||||
|
"\t\t\t<mesh>\n"
|
||||||
|
"\t\t\t<scale>1 1 1</scale>\n"
|
||||||
|
"\t\t\t\t<uri>%s</uri>\n"
|
||||||
|
"\t\t\t</mesh>\n"
|
||||||
|
"\t\t\t</geometry>\n"
|
||||||
|
"\t\t\t </collision>\n"
|
||||||
|
"\t\t\t<visual name='visual'>\n"
|
||||||
|
"\t\t\t\t<geometry>\n"
|
||||||
|
"\t\t\t\t<mesh>\n"
|
||||||
|
"\t\t\t\t\t<scale>1 1 1</scale>\n"
|
||||||
|
"\t\t\t\t\t<uri>%s</uri>\n"
|
||||||
|
"\t\t\t\t</mesh>\n"
|
||||||
|
"\t\t\t\t</geometry>\n"
|
||||||
|
"\t\t\t<material>\n"
|
||||||
|
"\t\t\t\t<ambient>1 0 0 1</ambient>\n"
|
||||||
|
"\t\t\t\t<diffuse>%f %f %f %f</diffuse>\n"
|
||||||
|
"\t\t\t\t<specular>0.1 0.1 0.1 1</specular>\n"
|
||||||
|
"\t\t\t\t<emissive>0 0 0 0</emissive>\n"
|
||||||
|
"\t\t\t </material>\n"
|
||||||
|
"\t\t\t </visual>\n"
|
||||||
|
"\t\t\t </link>\n"
|
||||||
|
"\t\t\t</model>\n", objSdfPartFileName, m, m,
|
||||||
|
objSdfPartFileName, objSdfPartFileName,
|
||||||
|
kdRed, kdGreen, kdBlue, transparency);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
for (int s = 0; s < (int)shapes.size(); s++)
|
for (int s = 0; s < (int)shapes.size(); s++)
|
||||||
{
|
{
|
||||||
tinyobj::shape_t& shape = shapes[s];
|
tinyobj::shape_t& shape = shapes[s];
|
||||||
@@ -85,7 +317,8 @@ int main(int argc, char* argv[])
|
|||||||
if (strlen(materialPrefixPath) > 0)
|
if (strlen(materialPrefixPath) > 0)
|
||||||
{
|
{
|
||||||
sprintf(objFileName, "%s/part%d.obj", materialPrefixPath, s);
|
sprintf(objFileName, "%s/part%d.obj", materialPrefixPath, s);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
sprintf(objFileName, "part%d.obj", s);
|
sprintf(objFileName, "part%d.obj", s);
|
||||||
}
|
}
|
||||||
@@ -99,7 +332,8 @@ int main(int argc, char* argv[])
|
|||||||
if (matLibName.length())
|
if (matLibName.length())
|
||||||
{
|
{
|
||||||
fprintf(f, "mtllib %s.mtl\n", matLibName.c_str());
|
fprintf(f, "mtllib %s.mtl\n", matLibName.c_str());
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
fprintf(f, "mtllib bedroom.mtl\n");
|
fprintf(f, "mtllib bedroom.mtl\n");
|
||||||
|
|
||||||
@@ -123,7 +357,8 @@ int main(int argc, char* argv[])
|
|||||||
if (mat.name.length())
|
if (mat.name.length())
|
||||||
{
|
{
|
||||||
fprintf(f, "usemtl %s\n", mat.name.c_str());
|
fprintf(f, "usemtl %s\n", mat.name.c_str());
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
fprintf(f, "usemtl wire_028089177\n");
|
fprintf(f, "usemtl wire_028089177\n");
|
||||||
}
|
}
|
||||||
@@ -161,7 +396,7 @@ int main(int argc, char* argv[])
|
|||||||
float kdRed = mat.diffuse[0];
|
float kdRed = mat.diffuse[0];
|
||||||
float kdGreen = mat.diffuse[1];
|
float kdGreen = mat.diffuse[1];
|
||||||
float kdBlue = mat.diffuse[2];
|
float kdBlue = mat.diffuse[2];
|
||||||
|
float transparency = mat.transparency;
|
||||||
char objSdfPartFileName[MAX_PATH_LEN];
|
char objSdfPartFileName[MAX_PATH_LEN];
|
||||||
sprintf(objSdfPartFileName, "part%d.obj", s);
|
sprintf(objSdfPartFileName, "part%d.obj", s);
|
||||||
fprintf(sdfFile, "\t\t<model name='%s'>\n"
|
fprintf(sdfFile, "\t\t<model name='%s'>\n"
|
||||||
@@ -196,7 +431,7 @@ int main(int argc, char* argv[])
|
|||||||
"\t\t\t\t</geometry>\n"
|
"\t\t\t\t</geometry>\n"
|
||||||
"\t\t\t<material>\n"
|
"\t\t\t<material>\n"
|
||||||
"\t\t\t\t<ambient>1 0 0 1</ambient>\n"
|
"\t\t\t\t<ambient>1 0 0 1</ambient>\n"
|
||||||
"\t\t\t\t<diffuse>%f %f %f 1</diffuse>\n"
|
"\t\t\t\t<diffuse>%f %f %f %f</diffuse>\n"
|
||||||
"\t\t\t\t<specular>0.1 0.1 0.1 1</specular>\n"
|
"\t\t\t\t<specular>0.1 0.1 0.1 1</specular>\n"
|
||||||
"\t\t\t\t<emissive>0 0 0 0</emissive>\n"
|
"\t\t\t\t<emissive>0 0 0 0</emissive>\n"
|
||||||
"\t\t\t </material>\n"
|
"\t\t\t </material>\n"
|
||||||
@@ -204,10 +439,11 @@ int main(int argc, char* argv[])
|
|||||||
"\t\t\t </link>\n"
|
"\t\t\t </link>\n"
|
||||||
"\t\t\t</model>\n", objSdfPartFileName, s, s,
|
"\t\t\t</model>\n", objSdfPartFileName, s, s,
|
||||||
objSdfPartFileName, objSdfPartFileName,
|
objSdfPartFileName, objSdfPartFileName,
|
||||||
kdRed, kdGreen, kdBlue);
|
kdRed, kdGreen, kdBlue, transparency);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fprintf(sdfFile,"\t</world>\n</sdf>\n");
|
fprintf(sdfFile,"\t</world>\n</sdf>\n");
|
||||||
|
|
||||||
fclose(sdfFile);
|
fclose(sdfFile);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ recursive-include src *.hpp
|
|||||||
recursive-include examples/pybullet/gym *.*
|
recursive-include examples/pybullet/gym *.*
|
||||||
include examples/ThirdPartyLibs/enet/unix.c
|
include examples/ThirdPartyLibs/enet/unix.c
|
||||||
include examples/OpenGLWindow/X11OpenGLWindow.cpp
|
include examples/OpenGLWindow/X11OpenGLWindow.cpp
|
||||||
include examples/ThirdPartyLibs/Glew/glew.c
|
recursive-include examples/ThirdPartyLibs/glad *.*
|
||||||
include examples/ThirdPartyLibs/enet/win32.c
|
include examples/ThirdPartyLibs/enet/win32.c
|
||||||
include examples/OpenGLWindow/Win32Window.cpp
|
include examples/OpenGLWindow/Win32Window.cpp
|
||||||
include examples/OpenGLWindow/Win32OpenGLWindow.cpp
|
include examples/OpenGLWindow/Win32OpenGLWindow.cpp
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
This is the official C++ source code repository of the Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
|
This is the official C++ source code repository of the Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
|
||||||
|
|
||||||
New in Bullet 2.85: pybullet Python bindings, improved support for robotics and VR
|
New in Bullet 2.85: pybullet Python bindings, improved support for robotics and VR. Use pip install pybullet and see [PyBullet Quickstart Guide](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#heading=h.2ye70wns7io3).
|
||||||
|
|
||||||
The Bullet 2 API will stay default and up-to-date while slowly moving to a new API.
|
The Bullet 2 API will stay default and up-to-date while slowly moving to a new API.
|
||||||
The steps towards a new API is in a nutshell:
|
The steps towards a new API is in a nutshell:
|
||||||
@@ -80,9 +80,9 @@ Depending on your system (Linux 32bit, 64bit or Mac OSX) use one of the followin
|
|||||||
Using premake:
|
Using premake:
|
||||||
```
|
```
|
||||||
cd build3
|
cd build3
|
||||||
./premake4_linux gmake --double
|
./premake4_linux --double gmake
|
||||||
./premake4_linux64 gmake --double
|
./premake4_linux64 --double gmake
|
||||||
./premake4_osx gmake --double --enable_pybullet
|
./premake4_osx --double --enable_pybullet gmake
|
||||||
```
|
```
|
||||||
Then
|
Then
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ if(EXISTS "${PYTHON_INCLUDE_DIR}" AND EXISTS "${PYTHON_LIBRARY}")
|
|||||||
else()
|
else()
|
||||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||||
set(_PYTHON3_VERSIONS 3.4 3.3 3.2 3.1 3.0)
|
set(_PYTHON3_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||||
|
|
||||||
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
||||||
if(PythonLibs_FIND_VERSION)
|
if(PythonLibs_FIND_VERSION)
|
||||||
@@ -124,7 +124,7 @@ else()
|
|||||||
STRING(REGEX REPLACE "^([0-9]+).*$" "\\1" _VERSION_MAJOR "${_CURRENT_VERSION}")
|
STRING(REGEX REPLACE "^([0-9]+).*$" "\\1" _VERSION_MAJOR "${_CURRENT_VERSION}")
|
||||||
STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*$" "\\1" _VERSION_MINOR "${_CURRENT_VERSION}")
|
STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+).*$" "\\1" _VERSION_MINOR "${_CURRENT_VERSION}")
|
||||||
|
|
||||||
set(_PYTHON_NAMES python)
|
set(_PYTHON_NAMES ${PYTHON_EXECUTABLE} python)
|
||||||
|
|
||||||
if (_CURRENT_VERSION MATCHES "^[0-9]+.*$")
|
if (_CURRENT_VERSION MATCHES "^[0-9]+.*$")
|
||||||
list(APPEND _PYTHON_NAMES "python${_VERSION_MAJOR}")
|
list(APPEND _PYTHON_NAMES "python${_VERSION_MAJOR}")
|
||||||
@@ -144,7 +144,7 @@ else()
|
|||||||
if(_PYTHON_EXECUTABLE)
|
if(_PYTHON_EXECUTABLE)
|
||||||
|
|
||||||
EXECUTE_PROCESS(
|
EXECUTE_PROCESS(
|
||||||
COMMAND ${_PYTHON_EXECUTABLE} "${_FIND_LIB_PYTHON_PY}"
|
COMMAND "${_PYTHON_EXECUTABLE}" "${_FIND_LIB_PYTHON_PY}"
|
||||||
OUTPUT_VARIABLE _PYTHON_CONFIG
|
OUTPUT_VARIABLE _PYTHON_CONFIG
|
||||||
RESULT_VARIABLE _PYTHON_CONFIG_RESULT
|
RESULT_VARIABLE _PYTHON_CONFIG_RESULT
|
||||||
ERROR_QUIET)
|
ERROR_QUIET)
|
||||||
@@ -172,16 +172,17 @@ else()
|
|||||||
|
|
||||||
if(NOT EXISTS "${PYTHON_LIBRARY}")
|
if(NOT EXISTS "${PYTHON_LIBRARY}")
|
||||||
set(_PYTHON_SHORT_VERSION_NO_DOT "${_PYTHON_MAJOR_VERSION}${_PYTHON_MINOR_VERSION}")
|
set(_PYTHON_SHORT_VERSION_NO_DOT "${_PYTHON_MAJOR_VERSION}${_PYTHON_MINOR_VERSION}")
|
||||||
set(_PYTHON_LIBRARY_NAMES python${_PYTHON_SHORT_VERSION} python${_PYTHON_SHORT_VERSION_NO_DOT})
|
set(_PYTHON_LIBRARY_NAMES python${_PYTHON_SHORT_VERSION} python${_PYTHON_SHORT_VERSION_NO_DOT} python${_PYTHON_SHORT_VERSION}m python${_PYTHON_SHORT_VERSION_NO_DOT}m)
|
||||||
FIND_LIBRARY(PYTHON_LIBRARY
|
FIND_LIBRARY(PYTHON_LIBRARY
|
||||||
NAMES ${_PYTHON_LIBRARY_NAMES}
|
NAMES ${_PYTHON_LIBRARY_NAMES}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
python${_PYTHON_SHORT_VERSION}/config
|
"python${_PYTHON_SHORT_VERSION}/config"
|
||||||
python${_PYTHON_SHORT_VERSION_NO_DOT}/config
|
"python${_PYTHON_SHORT_VERSION_NO_DOT}/config"
|
||||||
PATHS
|
PATHS
|
||||||
${_PYTHON_LIBRARY_DIR}
|
${_PYTHON_LIBRARY_DIR}
|
||||||
${_PYTHON_PREFIX}/lib $
|
${_PYTHON_PREFIX}/lib
|
||||||
{_PYTHON_PREFIX}/libs
|
${_PYTHON_PREFIX}/libs
|
||||||
|
${_PYTHON_LIBRARY_DIR}/x86_64-linux-gnu/
|
||||||
NO_DEFAULT_PATH)
|
NO_DEFAULT_PATH)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@@ -254,6 +255,10 @@ set(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}")
|
|||||||
set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
|
set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
||||||
SELECT_LIBRARY_CONFIGURATIONS(PYTHON)
|
SELECT_LIBRARY_CONFIGURATIONS(PYTHON)
|
||||||
|
|
||||||
|
if(PYTHON_LIBRARY AND NOT PYTHON_LIBRARIES)
|
||||||
|
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||||
|
endif()
|
||||||
# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library.
|
# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library.
|
||||||
# Unset this, this prefix doesn't match the module prefix, they are different
|
# Unset this, this prefix doesn't match the module prefix, they are different
|
||||||
# for historical reasons.
|
# for historical reasons.
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
if _OPTIONS["enable_system_opengl"] and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h")) then
|
if _OPTIONS["enable_system_opengl"] and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h")) then
|
||||||
links {"GL"}
|
links {"GL"}
|
||||||
else
|
else
|
||||||
print("No GL/gl.h found, using dynamic loading of GL using glew")
|
print("No GL/gl.h found, using dynamic loading of GL using glad")
|
||||||
defines {"GLEW_INIT_OPENGL11_FUNCTIONS=1"}
|
defines {"GLEW_INIT_OPENGL11_FUNCTIONS=1"}
|
||||||
links {"dl"}
|
links {"dl"}
|
||||||
end
|
end
|
||||||
@@ -50,25 +50,37 @@
|
|||||||
configuration {"Windows"}
|
configuration {"Windows"}
|
||||||
defines { "GLEW_STATIC"}
|
defines { "GLEW_STATIC"}
|
||||||
includedirs {
|
includedirs {
|
||||||
projectRootDir .. "examples/ThirdPartyLibs/Glew"
|
projectRootDir .. "examples/ThirdPartyLibs/glad"
|
||||||
}
|
}
|
||||||
files { projectRootDir .. "examples/ThirdPartyLibs/Glew/glew.c"}
|
files { projectRootDir .. "examples/ThirdPartyLibs/glad/glad.c"}
|
||||||
end
|
end
|
||||||
|
if os.is("MacOSX") then
|
||||||
|
includedirs {
|
||||||
|
projectRootDir .. "examples/ThirdPartyLibs/glad"
|
||||||
|
}
|
||||||
|
files { projectRootDir .. "examples/ThirdPartyLibs/glad/glad.c"}
|
||||||
|
end
|
||||||
|
|
||||||
if os.is("Linux") then
|
if os.is("Linux") then
|
||||||
configuration{"Linux"}
|
configuration{"Linux"}
|
||||||
if _OPTIONS["enable_system_opengl"] and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h") and os.isfile("/usr/include/GL/glew.h")) then
|
if _OPTIONS["enable_system_glx"] then --# and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/glx.h")) then
|
||||||
links {"GLEW"}
|
links{"X11","pthread"}
|
||||||
print ("linking against system GLEW")
|
print("Using system GL/glx.h")
|
||||||
else
|
else
|
||||||
print("Using static glew and dynamic loading of glx functions")
|
print("Using glad_glx")
|
||||||
defines { "GLEW_STATIC","GLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1"}
|
defines { "GLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1"}
|
||||||
includedirs {
|
files {
|
||||||
projectRootDir .. "examples/ThirdPartyLibs/Glew"
|
projectRootDir .. "examples/ThirdPartyLibs/glad/glad_glx.c"}
|
||||||
}
|
|
||||||
files { projectRootDir .. "examples/ThirdPartyLibs/Glew/glew.c"}
|
|
||||||
links {"dl"}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print("Using glad and dynamic loading of GL functions")
|
||||||
|
defines { "GLEW_STATIC"}
|
||||||
|
includedirs {
|
||||||
|
projectRootDir .. "examples/ThirdPartyLibs/glad"
|
||||||
|
}
|
||||||
|
files { projectRootDir .. "examples/ThirdPartyLibs/glad/glad.c"}
|
||||||
|
links {"dl"}
|
||||||
|
|
||||||
end
|
end
|
||||||
configuration{}
|
configuration{}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -28,6 +28,12 @@
|
|||||||
description = "Enable iOS target (requires xcode4)"
|
description = "Enable iOS target (requires xcode4)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newoption
|
||||||
|
{
|
||||||
|
trigger = "enable_system_glx",
|
||||||
|
description = "Try to link against system glx instead of using glad_glx (default)"
|
||||||
|
}
|
||||||
|
|
||||||
newoption
|
newoption
|
||||||
{
|
{
|
||||||
trigger = "enable_system_opengl",
|
trigger = "enable_system_opengl",
|
||||||
@@ -45,6 +51,13 @@
|
|||||||
description = "Try to link and use system X11 headers instead of dynamically loading X11 (dlopen is default)"
|
description = "Try to link and use system X11 headers instead of dynamically loading X11 (dlopen is default)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newoption
|
||||||
|
{
|
||||||
|
trigger = "enable_static_vr_plugin",
|
||||||
|
description = "Statically link vr plugin (in examples/SharedMemory/plugins/vrSyncPlugin)"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
newoption
|
newoption
|
||||||
{
|
{
|
||||||
trigger = "noopengl3",
|
trigger = "noopengl3",
|
||||||
@@ -169,6 +182,14 @@ end
|
|||||||
trigger = "audio",
|
trigger = "audio",
|
||||||
description = "Enable audio"
|
description = "Enable audio"
|
||||||
}
|
}
|
||||||
|
newoption
|
||||||
|
{
|
||||||
|
trigger = "enable_multithreading",
|
||||||
|
description = "enable CPU multithreading for bullet2 libs"
|
||||||
|
}
|
||||||
|
if _OPTIONS["enable_multithreading"] then
|
||||||
|
defines {"BT_THREADSAFE=1"}
|
||||||
|
end
|
||||||
if _OPTIONS["double"] then
|
if _OPTIONS["double"] then
|
||||||
defines {"BT_USE_DOUBLE_PRECISION"}
|
defines {"BT_USE_DOUBLE_PRECISION"}
|
||||||
end
|
end
|
||||||
@@ -238,6 +259,9 @@ end
|
|||||||
targetdir( _OPTIONS["targetdir"] or "../bin" )
|
targetdir( _OPTIONS["targetdir"] or "../bin" )
|
||||||
location("./" .. act .. postfix)
|
location("./" .. act .. postfix)
|
||||||
|
|
||||||
|
projectRootDir = os.getcwd() .. "/../"
|
||||||
|
print("Project root directory: " .. projectRootDir);
|
||||||
|
|
||||||
if not _OPTIONS["python_include_dir"] then
|
if not _OPTIONS["python_include_dir"] then
|
||||||
_OPTIONS["python_include_dir"] = default_python_include_dir
|
_OPTIONS["python_include_dir"] = default_python_include_dir
|
||||||
end
|
end
|
||||||
@@ -246,21 +270,115 @@ end
|
|||||||
_OPTIONS["python_lib_dir"] = default_python_lib_dir
|
_OPTIONS["python_lib_dir"] = default_python_lib_dir
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if os.is("Linux") then
|
||||||
|
default_glfw_include_dir = "usr/local/include/GLFW"
|
||||||
|
default_glfw_lib_dir = "/usr/local/lib/"
|
||||||
|
default_glfw_lib_name = "glfw3"
|
||||||
|
end
|
||||||
|
|
||||||
projectRootDir = os.getcwd() .. "/../"
|
if os.is("macosx") then
|
||||||
print("Project root directory: " .. projectRootDir);
|
default_glfw_include_dir = "/usr/local/Cellar/glfw/3.2.1/include"
|
||||||
|
default_glfw_lib_dir = "/usr/local/Cellar/glfw/3.2.1/lib"
|
||||||
|
default_glfw_lib_name = "glfw"
|
||||||
|
end
|
||||||
|
|
||||||
dofile ("findOpenCL.lua")
|
if os.is("Windows") then
|
||||||
dofile ("findDirectX11.lua")
|
default_glfw_include_dir = "c:/glfw/include"
|
||||||
|
default_glfw_lib_dir = "c:/glfw/lib"
|
||||||
|
default_glfw_lib_name = "glfw3"
|
||||||
|
end
|
||||||
|
|
||||||
|
if not _OPTIONS["glfw_lib_dir"] then
|
||||||
|
_OPTIONS["glfw_lib_dir"] = default_glfw_lib_dir
|
||||||
|
end
|
||||||
|
if not _OPTIONS["glfw_include_dir"] then
|
||||||
|
_OPTIONS["glfw_include_dir"] = default_glfw_include_dir
|
||||||
|
end
|
||||||
|
if not _OPTIONS["glfw_lib_name"] then
|
||||||
|
_OPTIONS["glfw_lib_name"] = default_glfw_lib_name
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
newoption
|
||||||
|
{
|
||||||
|
trigger = "glfw_include_dir",
|
||||||
|
value = default_glfw_include_dir,
|
||||||
|
description = "GLFW 3.x include directory"
|
||||||
|
}
|
||||||
|
|
||||||
|
newoption
|
||||||
|
{
|
||||||
|
trigger = "glfw_lib_name",
|
||||||
|
value = default_glfw_lib_name,
|
||||||
|
description = "GLFW 3.x library name (glfw, glfw3)"
|
||||||
|
}
|
||||||
|
|
||||||
|
newoption
|
||||||
|
{
|
||||||
|
trigger = "glfw_lib_dir",
|
||||||
|
value = default_glfw_lib_dir,
|
||||||
|
description = "(optional) GLFW 3.x library directory "
|
||||||
|
}
|
||||||
|
|
||||||
|
newoption
|
||||||
|
{
|
||||||
|
trigger = "enable_glfw",
|
||||||
|
value = false,
|
||||||
|
description = "(optional) use GLFW 3.x library"
|
||||||
|
}
|
||||||
|
|
||||||
|
if _OPTIONS["enable_glfw"] then
|
||||||
|
defines {"B3_USE_GLFW"}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function initOpenGL()
|
||||||
|
includedirs {
|
||||||
|
projectRootDir .. "examples/ThirdPartyLibs/glad"
|
||||||
|
}
|
||||||
|
|
||||||
|
includedirs {
|
||||||
|
_OPTIONS["glfw_include_dir"],
|
||||||
|
}
|
||||||
|
|
||||||
|
libdirs {
|
||||||
|
_OPTIONS["glfw_lib_dir"]
|
||||||
|
}
|
||||||
|
links { _OPTIONS["glfw_lib_name"]}
|
||||||
|
files { projectRootDir .. "examples/ThirdPartyLibs/glad/glad.c" }
|
||||||
|
end
|
||||||
|
function findOpenGL3()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
function initGlew()
|
||||||
|
end
|
||||||
|
function initX11()
|
||||||
|
links {"X11", "dl","pthread"}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
dofile ("findOpenGLGlewGlut.lua")
|
dofile ("findOpenGLGlewGlut.lua")
|
||||||
|
|
||||||
if (not findOpenGL3()) then
|
if (not findOpenGL3()) then
|
||||||
defines {"NO_OPENGL3"}
|
defines {"NO_OPENGL3"}
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dofile ("findOpenCL.lua")
|
||||||
|
dofile ("findDirectX11.lua")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
language "C++"
|
language "C++"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if _OPTIONS["audio"] then
|
if _OPTIONS["audio"] then
|
||||||
include "../examples/TinyAudio"
|
include "../examples/TinyAudio"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/
|
|||||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingPS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingPS.h" --stringname="useShadowMapInstancingFragmentShader" stringify
|
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingPS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingPS.h" --stringname="useShadowMapInstancingFragmentShader" stringify
|
||||||
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingVS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingVS.h" --stringname="useShadowMapInstancingVertexShader" stringify
|
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingVS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/useShadowMapInstancingVS.h" --stringname="useShadowMapInstancingVertexShader" stringify
|
||||||
|
|
||||||
|
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/projectiveTextureInstancingPS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/projectiveTextureInstancingPS.h" --stringname="projectiveTextureInstancingFragmentShader" stringify
|
||||||
|
premake4 --file=stringifyKernel.lua --kernelfile="../btgui/OpenGLWindow/Shaders/projectiveTextureInstancingVS.glsl" --headerfile="../btgui/OpenGLWindow/Shaders/projectiveTextureInstancingVS.h" --stringname="projectiveTextureInstancingVertexShader" stringify
|
||||||
|
|
||||||
|
|
||||||
premake4 --file=stringifyKernel.lua --kernelfile="../Demos3/GpuDemos/broadphase/pairsKernel.cl" --headerfile="../Demos3/GpuDemos/broadphase/pairsKernel.h" --stringname="pairsKernelsCL" stringify
|
premake4 --file=stringifyKernel.lua --kernelfile="../Demos3/GpuDemos/broadphase/pairsKernel.cl" --headerfile="../Demos3/GpuDemos/broadphase/pairsKernel.h" --stringname="pairsKernelsCL" stringify
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWin
|
|||||||
|
|
||||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.h" --stringname="useShadowMapInstancingFragmentShader" stringify'
|
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.h" --stringname="useShadowMapInstancingFragmentShader" stringify'
|
||||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.h" --stringname="useShadowMapInstancingVertexShader" stringify'
|
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.h" --stringname="useShadowMapInstancingVertexShader" stringify'
|
||||||
|
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingPS.h" --stringname="projectiveTextureInstancingFragmentShader" stringify'
|
||||||
|
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingVS.h" --stringname="projectiveTextureInstancingVertexShader" stringify'
|
||||||
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenCL/broadphase/pairsKernel.cl" --headerfile="../examples/OpenCL/broadphase/pairsKernel.h" --stringname="pairsKernelsCL" stringify'
|
eval '$mypremake --file=stringifyKernel.lua --kernelfile="../examples/OpenCL/broadphase/pairsKernel.cl" --headerfile="../examples/OpenCL/broadphase/pairsKernel.h" --stringname="pairsKernelsCL" stringify'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shade
|
|||||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingVS.h" --stringname="createShadowMapInstancingVertexShader" stringify
|
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/createShadowMapInstancingVS.h" --stringname="createShadowMapInstancingVertexShader" stringify
|
||||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.h" --stringname="useShadowMapInstancingFragmentShader" stringify
|
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingPS.h" --stringname="useShadowMapInstancingFragmentShader" stringify
|
||||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.h" --stringname="useShadowMapInstancingVertexShader" stringify
|
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/useShadowMapInstancingVS.h" --stringname="useShadowMapInstancingVertexShader" stringify
|
||||||
|
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingPS.h" --stringname="projectiveTextureInstancingFragmentShader" stringify
|
||||||
|
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/projectiveTextureInstancingVS.h" --stringname="projectiveTextureInstancingVertexShader" stringify
|
||||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/linesVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/linesVS.h" --stringname="linesVertexShader" stringify
|
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/linesVS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/linesVS.h" --stringname="linesVertexShader" stringify
|
||||||
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/linesPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/linesPS.h" --stringname="linesFragmentShader" stringify
|
premake4 --file=stringifyKernel.lua --kernelfile="../examples/OpenGLWindow/Shaders/linesPS.glsl" --headerfile="../examples/OpenGLWindow/Shaders/linesPS.h" --stringname="linesFragmentShader" stringify
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -e CMakeCache.txt ]; then
|
||||||
rm CMakeCache.txt
|
rm CMakeCache.txt
|
||||||
mkdir build_cmake
|
fi
|
||||||
|
mkdir -p build_cmake
|
||||||
cd build_cmake
|
cd build_cmake
|
||||||
cmake -DBUILD_PYBULLET=ON -DBUILD_PYBULLET_NUMPY=OFF -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release ..
|
cmake -DBUILD_PYBULLET=ON -DBUILD_PYBULLET_NUMPY=OFF -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release .. || exit 1
|
||||||
make -j12
|
make -j $(command nproc 2>/dev/null || echo 12) || exit 1
|
||||||
cd examples
|
cd examples
|
||||||
cd pybullet
|
cd pybullet
|
||||||
ln -s pybullet.dylib pybullet.so
|
if [ -e pybullet.dylib ]; then
|
||||||
|
ln -f -s pybullet.dylib pybullet.so
|
||||||
|
fi
|
||||||
|
echo "Completed build of Bullet."
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ del tmp1234.txt
|
|||||||
|
|
||||||
cd build3
|
cd build3
|
||||||
|
|
||||||
premake4 --double --midi --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
|
|
||||||
|
premake4 --double --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
|
||||||
|
|
||||||
#premake4 --serial --audio --double --midi --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
|
#premake4 --serial --audio --double --midi --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
|
||||||
|
|
||||||
|
|||||||
182
data/TwoJointRobot_w_fixedJoints.urdf
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<!-- =================================================================================== -->
|
||||||
|
<!-- | This document was autogenerated by xacro from TwoJointRobot.xacro | -->
|
||||||
|
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
|
||||||
|
<!-- =================================================================================== -->
|
||||||
|
<robot name="TwoJointRobot" xmlns:xacro="http://www.ros.org/wiki/xacro">
|
||||||
|
<material name="blue">
|
||||||
|
<color rgba="0 0 0.8 1"/>
|
||||||
|
</material>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
<link name="base_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.025"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.025"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.2"/>
|
||||||
|
<inertia ixx="0.000322916666667" ixy="0.0" ixz="0.0" iyy="0.000322916666667" iyz="0.0" izz="0.0005625"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<link name="link_01_cyl">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<material name="blue"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.2"/>
|
||||||
|
<inertia ixx="0.000322916666667" ixy="0.0" ixz="0.0" iyy="0.000322916666667" iyz="0.0" izz="0.0005625"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<link name="link_12_cyl">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<material name="blue"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.2"/>
|
||||||
|
<inertia ixx="0.000322916666667" ixy="0.0" ixz="0.0" iyy="0.000322916666667" iyz="0.0" izz="0.0005625"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<link name="link_21_cyl">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<material name="white"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.2"/>
|
||||||
|
<inertia ixx="0.000322916666667" ixy="0.0" ixz="0.0" iyy="0.000322916666667" iyz="0.0" izz="0.0005625"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<link name="link_23_cyl">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<material name="white"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.2"/>
|
||||||
|
<inertia ixx="0.000322916666667" ixy="0.0" ixz="0.0" iyy="0.000322916666667" iyz="0.0" izz="0.0005625"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<link name="link_1">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="1.0 0.1 0.05"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0.5 0 0"/>
|
||||||
|
<material name="blue"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size="1.0 0.1 0.05"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0.5 0 0"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.5"/>
|
||||||
|
<inertia ixx="0.00208333333333" ixy="0.0125" ixz="0.00625" iyy="0.167083333333" iyz="0.000625" izz="0.168333333333"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<link name="link_2">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="1.0 0.1 0.05"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0.5 0 0"/>
|
||||||
|
<material name="white"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size="1.0 0.1 0.05"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0.5 0 0"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.5"/>
|
||||||
|
<inertia ixx="0.00208333333333" ixy="0.0125" ixz="0.00625" iyy="0.167083333333" iyz="0.000625" izz="0.168333333333"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="link_01" type="fixed">
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<parent link="link_01_cyl"/>
|
||||||
|
<child link="link_1"/>
|
||||||
|
</joint>
|
||||||
|
<joint name="link_12" type="fixed">
|
||||||
|
<origin rpy="0 0 0" xyz="1.0 0 0"/>
|
||||||
|
<parent link="link_1"/>
|
||||||
|
<child link="link_12_cyl"/>
|
||||||
|
</joint>
|
||||||
|
<joint name="link_21" type="fixed">
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<parent link="link_21_cyl"/>
|
||||||
|
<child link="link_2"/>
|
||||||
|
</joint>
|
||||||
|
<joint name="link_23" type="fixed">
|
||||||
|
<origin rpy="0 0 0" xyz="1.0 0 0"/>
|
||||||
|
<parent link="link_2"/>
|
||||||
|
<child link="link_23_cyl"/>
|
||||||
|
</joint>
|
||||||
|
<joint name="joint_1" type="revolute">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<limit effort="10000" lower="-3" upper="+3" velocity="5"/>
|
||||||
|
<dynamics damping="0" friction="0"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.075"/>
|
||||||
|
<parent link="base_link"/>
|
||||||
|
<child link="link_01_cyl"/>
|
||||||
|
</joint>
|
||||||
|
<joint name="joint_2" type="revolute">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<limit effort="10000" lower="-3" upper="+3" velocity="5"/>
|
||||||
|
<dynamics damping="0" friction="0"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0.0 0. 0.05"/>
|
||||||
|
<parent link="link_12_cyl"/>
|
||||||
|
<child link="link_21_cyl"/>
|
||||||
|
</joint>
|
||||||
|
</robot>
|
||||||
|
|
||||||
110
data/TwoJointRobot_wo_fixedJoints.urdf
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<!-- =================================================================================== -->
|
||||||
|
<!-- | This document was autogenerated by xacro from TwoJointRobot_woCyl.xacro | -->
|
||||||
|
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
|
||||||
|
<!-- =================================================================================== -->
|
||||||
|
<robot name="TwoJointRobot" xmlns:xacro="http://www.ros.org/wiki/xacro">
|
||||||
|
<material name="blue">
|
||||||
|
<color rgba="0 0 0.8 1"/>
|
||||||
|
</material>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
<link name="base_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.025"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.025"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.2"/>
|
||||||
|
<inertia ixx="0.000322916666667" ixy="0.0" ixz="0.0" iyy="0.000322916666667" iyz="0.0" izz="0.0005625"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<link name="link_23_cyl">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<material name="white"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.05" radius="0.075"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.2"/>
|
||||||
|
<inertia ixx="0.000322916666667" ixy="0.0" ixz="0.0" iyy="0.000322916666667" iyz="0.0" izz="0.0005625"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<link name="link_1">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="1.0 0.1 0.05"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0.5 0 0"/>
|
||||||
|
<material name="blue"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size="1.0 0.1 0.05"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0.5 0 0"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.5"/>
|
||||||
|
<inertia ixx="0.00208333333333" ixy="0.0125" ixz="0.00625" iyy="0.167083333333" iyz="0.000625" izz="0.168333333333"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<link name="link_2">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="1.0 0.1 0.05"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0.5 0 0"/>
|
||||||
|
<material name="white"/>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size="1.0 0.1 0.05"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0.5 0 0"/>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.5"/>
|
||||||
|
<inertia ixx="0.00208333333333" ixy="0.0125" ixz="0.00625" iyy="0.167083333333" iyz="0.000625" izz="0.168333333333"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="joint_1" type="revolute">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<limit effort="10000" lower="-3.14" upper="3.14" velocity="5"/>
|
||||||
|
<dynamics damping="0" friction="0"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.075"/>
|
||||||
|
<parent link="base_link"/>
|
||||||
|
<child link="link_1"/>
|
||||||
|
</joint>
|
||||||
|
<joint name="joint_2" type="revolute">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<limit effort="10000" lower="-3.14" upper="3.14" velocity="5"/>
|
||||||
|
<dynamics damping="0" friction="0"/>
|
||||||
|
<origin rpy="0 0 0" xyz="1.0 0. 0.05"/>
|
||||||
|
<parent link="link_1"/>
|
||||||
|
<child link="link_2"/>
|
||||||
|
</joint>
|
||||||
|
<joint name="link_23" type="fixed">
|
||||||
|
<origin rpy="0 0 0" xyz="1.0 0 0"/>
|
||||||
|
<parent link="link_2"/>
|
||||||
|
<child link="link_23_cyl"/>
|
||||||
|
</joint>
|
||||||
|
</robot>
|
||||||
|
|
||||||
1360
data/bunny.obj
Normal file
@@ -62,6 +62,12 @@
|
|||||||
<mass value="10"/>
|
<mass value="10"/>
|
||||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||||
</inertial>
|
</inertial>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.05 0.05 1.0"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.5"/>
|
||||||
|
</collision>
|
||||||
</link>
|
</link>
|
||||||
|
|
||||||
<joint name="cart_to_pole" type="continuous">
|
<joint name="cart_to_pole" type="continuous">
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<robot name="cube.urdf">
|
<robot name="cube.urdf">
|
||||||
<link name="baseLink">
|
<link name="baseLink">
|
||||||
<contact>
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
<lateral_friction value="1.0"/>
|
<lateral_friction value="1.0"/>
|
||||||
<inertia_scaling value="3.0"/>
|
|
||||||
</contact>
|
</contact>
|
||||||
<inertial>
|
<inertial>
|
||||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
|||||||
128
data/dinnerware/cup/Cup/cup_vhacd.mtl
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
# Blender MTL File: 'None'
|
||||||
|
# Material Count: 14
|
||||||
|
|
||||||
|
newmtl Shape.014
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.664000 0.688000 0.616000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.015
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.120000 0.744000 0.280000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.016
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.688000 0.736000 0.392000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.017
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.168000 0.496000 0.216000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.018
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.720000 0.472000 0.504000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.019
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.576000 0.288000 0.088000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.020
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.544000 0.536000 0.232000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.021
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.656000 0.240000 0.496000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.022
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.184000 0.536000 0.280000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.023
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.232000 0.016000 0.176000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.024
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.464000 0.552000 0.536000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.025
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.744000 0.448000 0.088000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.026
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.336000 0.232000 0.584000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
|
|
||||||
|
newmtl Shape.027
|
||||||
|
Ns 400.000000
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.168000 0.152000 0.672000
|
||||||
|
Ks 0.250000 0.250000 0.250000
|
||||||
|
Ni 1.000000
|
||||||
|
d 0.500000
|
||||||
|
illum 2
|
||||||
1413
data/dinnerware/cup/Cup/cup_vhacd.obj
Normal file
BIN
data/dinnerware/cup/Cup/textured-0008192-diffuse_map.jpg
Normal file
|
After Width: | Height: | Size: 626 KiB |
4
data/dinnerware/cup/Cup/textured-0008192.mtl
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
newmtl material_0
|
||||||
|
# shader_type beckmann
|
||||||
|
map_Kd textured-0008192-diffuse_map.jpg
|
||||||
|
|
||||||
21274
data/dinnerware/cup/Cup/textured-0008192.obj
Executable file
30
data/dinnerware/cup/cup_small.urdf
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="0.0" ?>
|
||||||
|
<robot name="cube.urdf">
|
||||||
|
<link name="baseLink">
|
||||||
|
<contact>
|
||||||
|
<lateral_friction value="1.0"/>
|
||||||
|
<inertia_scaling value="3.0"/>
|
||||||
|
</contact>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="-0.01 0 0.02"/>
|
||||||
|
<mass value=".1"/>
|
||||||
|
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||||
|
</inertial>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="Cup/textured-0008192.obj" scale="0.5 0.5 0.5"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="Cup/cup_vhacd.obj" scale="0.5 0.5 0.5"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
</robot>
|
||||||
|
|
||||||
14749
data/duck.obj
@@ -4135,123 +4135,7 @@
|
|||||||
</visual>
|
</visual>
|
||||||
</link>
|
</link>
|
||||||
</model>
|
</model>
|
||||||
<model name='part106.obj'>
|
|
||||||
<static>1</static>
|
|
||||||
<pose frame=''>-12.0 -13.9 0 0 0 0</pose>
|
|
||||||
<link name='link_d106'>
|
|
||||||
<inertial>
|
|
||||||
<mass>0</mass>
|
|
||||||
<inertia>
|
|
||||||
<ixx>0.166667</ixx>
|
|
||||||
<ixy>0</ixy>
|
|
||||||
<ixz>0</ixz>
|
|
||||||
<iyy>0.166667</iyy>
|
|
||||||
<iyz>0</iyz>
|
|
||||||
<izz>0.166667</izz>
|
|
||||||
</inertia>
|
|
||||||
</inertial>
|
|
||||||
<collision concave='yes' name='collision_106'>
|
|
||||||
<geometry>
|
|
||||||
<mesh>
|
|
||||||
<scale>.1 .1 .1</scale>
|
|
||||||
<uri>fatihrmutfak/part106.obj</uri>
|
|
||||||
</mesh>
|
|
||||||
</geometry>
|
|
||||||
</collision>
|
|
||||||
<visual name='visual'>
|
|
||||||
<geometry>
|
|
||||||
<mesh>
|
|
||||||
<scale>.1 .1 .1</scale>
|
|
||||||
<uri>fatihrmutfak/part106.obj</uri>
|
|
||||||
</mesh>
|
|
||||||
</geometry>
|
|
||||||
<material>
|
|
||||||
<ambient>1 0 0 1</ambient>
|
|
||||||
<diffuse>0.600000 0.894100 0.600000 1</diffuse>
|
|
||||||
<specular>0.1 0.1 0.1 1</specular>
|
|
||||||
<emissive>0 0 0 0</emissive>
|
|
||||||
</material>
|
|
||||||
</visual>
|
|
||||||
</link>
|
|
||||||
</model>
|
|
||||||
<model name='part107.obj'>
|
|
||||||
<static>1</static>
|
|
||||||
<pose frame=''>-12.0 -13.9 0 0 0 0</pose>
|
|
||||||
<link name='link_d107'>
|
|
||||||
<inertial>
|
|
||||||
<mass>0</mass>
|
|
||||||
<inertia>
|
|
||||||
<ixx>0.166667</ixx>
|
|
||||||
<ixy>0</ixy>
|
|
||||||
<ixz>0</ixz>
|
|
||||||
<iyy>0.166667</iyy>
|
|
||||||
<iyz>0</iyz>
|
|
||||||
<izz>0.166667</izz>
|
|
||||||
</inertia>
|
|
||||||
</inertial>
|
|
||||||
<collision concave='yes' name='collision_107'>
|
|
||||||
<geometry>
|
|
||||||
<mesh>
|
|
||||||
<scale>.1 .1 .1</scale>
|
|
||||||
<uri>fatihrmutfak/part107.obj</uri>
|
|
||||||
</mesh>
|
|
||||||
</geometry>
|
|
||||||
</collision>
|
|
||||||
<visual name='visual'>
|
|
||||||
<geometry>
|
|
||||||
<mesh>
|
|
||||||
<scale>.1 .1 .1</scale>
|
|
||||||
<uri>fatihrmutfak/part107.obj</uri>
|
|
||||||
</mesh>
|
|
||||||
</geometry>
|
|
||||||
<material>
|
|
||||||
<ambient>1 0 0 1</ambient>
|
|
||||||
<diffuse>0.690200 0.102000 0.102000 1</diffuse>
|
|
||||||
<specular>0.1 0.1 0.1 1</specular>
|
|
||||||
<emissive>0 0 0 0</emissive>
|
|
||||||
</material>
|
|
||||||
</visual>
|
|
||||||
</link>
|
|
||||||
</model>
|
|
||||||
<model name='part108.obj'>
|
|
||||||
<static>1</static>
|
|
||||||
<pose frame=''>-12.0 -13.9 0 0 0 0</pose>
|
|
||||||
<link name='link_d108'>
|
|
||||||
<inertial>
|
|
||||||
<mass>0</mass>
|
|
||||||
<inertia>
|
|
||||||
<ixx>0.166667</ixx>
|
|
||||||
<ixy>0</ixy>
|
|
||||||
<ixz>0</ixz>
|
|
||||||
<iyy>0.166667</iyy>
|
|
||||||
<iyz>0</iyz>
|
|
||||||
<izz>0.166667</izz>
|
|
||||||
</inertia>
|
|
||||||
</inertial>
|
|
||||||
<collision concave='yes' name='collision_108'>
|
|
||||||
<geometry>
|
|
||||||
<mesh>
|
|
||||||
<scale>.1 .1 .1</scale>
|
|
||||||
<uri>fatihrmutfak/part108.obj</uri>
|
|
||||||
</mesh>
|
|
||||||
</geometry>
|
|
||||||
</collision>
|
|
||||||
<visual name='visual'>
|
|
||||||
<geometry>
|
|
||||||
<mesh>
|
|
||||||
<scale>.1 .1 .1</scale>
|
|
||||||
<uri>fatihrmutfak/part108.obj</uri>
|
|
||||||
</mesh>
|
|
||||||
</geometry>
|
|
||||||
<material>
|
|
||||||
<ambient>1 0 0 1</ambient>
|
|
||||||
<diffuse>0.600000 0.894100 0.600000 1</diffuse>
|
|
||||||
<specular>0.1 0.1 0.1 1</specular>
|
|
||||||
<emissive>0 0 0 0</emissive>
|
|
||||||
</material>
|
|
||||||
</visual>
|
|
||||||
</link>
|
|
||||||
</model>
|
|
||||||
<model name='part109.obj'>
|
<model name='part109.obj'>
|
||||||
<static>1</static>
|
<static>1</static>
|
||||||
<pose frame=''>-12.0 -13.9 0 0 0 0</pose>
|
<pose frame=''>-12.0 -13.9 0 0 0 0</pose>
|
||||||
|
|||||||
BIN
data/kitchens/fatihrmutfak/Concrete.jpg
Normal file
|
After Width: | Height: | Size: 159 KiB |
BIN
data/kitchens/fatihrmutfak/Seamless_Aegean_Marble_Texture.jpg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
data/kitchens/fatihrmutfak/WoodFine0010_M.jpg
Normal file
|
After Width: | Height: | Size: 335 KiB |
@@ -10,6 +10,7 @@ newmtl wire_028089177
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 0.1098 0.3490 0.6941
|
Kd 0.1098 0.3490 0.6941
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl wire_214229166
|
newmtl wire_214229166
|
||||||
Ns 32
|
Ns 32
|
||||||
@@ -20,6 +21,7 @@ newmtl wire_214229166
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 0.8392 0.8980 0.6510
|
Kd 0.8392 0.8980 0.6510
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl Rubi
|
newmtl Rubi
|
||||||
Ns 10.0000
|
Ns 10.0000
|
||||||
@@ -54,6 +56,7 @@ newmtl wire_115115115
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 0.4510 0.4510 0.4510
|
Kd 0.4510 0.4510 0.4510
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl wire_087224198
|
newmtl wire_087224198
|
||||||
Ns 32
|
Ns 32
|
||||||
@@ -64,6 +67,7 @@ newmtl wire_087224198
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 0.3412 0.8784 0.7765
|
Kd 0.3412 0.8784 0.7765
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl wire_086086086
|
newmtl wire_086086086
|
||||||
Ns 32
|
Ns 32
|
||||||
@@ -74,6 +78,7 @@ newmtl wire_086086086
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 0.3373 0.3373 0.3373
|
Kd 0.3373 0.3373 0.3373
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl wire_026177088
|
newmtl wire_026177088
|
||||||
Ns 32
|
Ns 32
|
||||||
@@ -84,6 +89,7 @@ newmtl wire_026177088
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 0.1020 0.6941 0.3451
|
Kd 0.1020 0.6941 0.3451
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl wire_000000000
|
newmtl wire_000000000
|
||||||
Ns 32
|
Ns 32
|
||||||
@@ -94,6 +100,7 @@ newmtl wire_000000000
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 0.0000 0.0000 0.0000
|
Kd 0.0000 0.0000 0.0000
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl wire_153228153
|
newmtl wire_153228153
|
||||||
Ns 32
|
Ns 32
|
||||||
@@ -104,6 +111,7 @@ newmtl wire_153228153
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 0.6000 0.8941 0.6000
|
Kd 0.6000 0.8941 0.6000
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl wire_176026026
|
newmtl wire_176026026
|
||||||
Ns 32
|
Ns 32
|
||||||
@@ -114,6 +122,7 @@ newmtl wire_176026026
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 0.6902 0.1020 0.1020
|
Kd 0.6902 0.1020 0.1020
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl wire_255255255
|
newmtl wire_255255255
|
||||||
Ns 32
|
Ns 32
|
||||||
@@ -124,6 +133,18 @@ newmtl wire_255255255
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 1.0000 1.0000 1.0000
|
Kd 1.0000 1.0000 1.0000
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd WoodFine0010_M.jpg
|
||||||
|
|
||||||
|
newmtl marble_255255255
|
||||||
|
Ns 32
|
||||||
|
d 1
|
||||||
|
Tr 1
|
||||||
|
Tf 1 1 1
|
||||||
|
illum 2
|
||||||
|
Ka 0.0000 0.0000 0.0000
|
||||||
|
Kd 1.0000 1.0000 1.0000
|
||||||
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Seamless_Aegean_Marble_Texture.jpg
|
||||||
|
|
||||||
newmtl wire_165000082
|
newmtl wire_165000082
|
||||||
Ns 32
|
Ns 32
|
||||||
@@ -145,6 +166,7 @@ newmtl wire_255223127
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 1.0000 0.8745 0.4980
|
Kd 1.0000 0.8745 0.4980
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl wire_165103082
|
newmtl wire_165103082
|
||||||
Ns 32
|
Ns 32
|
||||||
@@ -155,6 +177,7 @@ newmtl wire_165103082
|
|||||||
Ka 0.0000 0.0000 0.0000
|
Ka 0.0000 0.0000 0.0000
|
||||||
Kd 0.6471 0.4039 0.3216
|
Kd 0.6471 0.4039 0.3216
|
||||||
Ks 0.3500 0.3500 0.3500
|
Ks 0.3500 0.3500 0.3500
|
||||||
|
map_Kd Concrete.jpg
|
||||||
|
|
||||||
newmtl 02___Default
|
newmtl 02___Default
|
||||||
Ns 32.0000
|
Ns 32.0000
|
||||||
|
|||||||
BIN
data/kitchens/fatihrmutfak/marble.jpg
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
data/kitchens/fatihrmutfak/metal.jpg
Normal file
|
After Width: | Height: | Size: 289 KiB |
@@ -479,7 +479,7 @@ v 119.729897 158.723099 9.000000
|
|||||||
v 150.229904 158.723099 9.000000
|
v 150.229904 158.723099 9.000000
|
||||||
v 119.729897 158.723099 8.700000
|
v 119.729897 158.723099 8.700000
|
||||||
v 150.229904 158.723099 8.700000
|
v 150.229904 158.723099 8.700000
|
||||||
usemtl wire_255255255
|
usemtl marble_255255255
|
||||||
|
|
||||||
vn -1.000000 0.000000 0.000000
|
vn -1.000000 0.000000 0.000000
|
||||||
vn -1.000000 0.000000 0.000000
|
vn -1.000000 0.000000 0.000000
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<sdf version="1.4">
|
<sdf version="1.4">
|
||||||
|
<world name='default'>
|
||||||
<model name="Amazon Pod">
|
<model name="Amazon Pod">
|
||||||
<static>1</static>
|
<static>1</static>
|
||||||
<pose>0 1 0 0 0 0</pose>
|
<pose>0 1 0 0 0 0</pose>
|
||||||
@@ -202,4 +203,5 @@
|
|||||||
</collision>
|
</collision>
|
||||||
</link>
|
</link>
|
||||||
</model>
|
</model>
|
||||||
|
</world>
|
||||||
</sdf>
|
</sdf>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
<visual>
|
<visual>
|
||||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
<geometry>
|
<geometry>
|
||||||
<mesh filename="meshes/link_0.stl"/>
|
<mesh filename="meshes/link_0.obj"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<material name="Grey"/>
|
<material name="Grey"/>
|
||||||
</visual>
|
</visual>
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
<visual>
|
<visual>
|
||||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
<geometry>
|
<geometry>
|
||||||
<mesh filename="meshes/link_1.stl"/>
|
<mesh filename="meshes/link_1.obj"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<material name="Blue"/>
|
<material name="Blue"/>
|
||||||
</visual>
|
</visual>
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
<visual>
|
<visual>
|
||||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
<geometry>
|
<geometry>
|
||||||
<mesh filename="meshes/link_2.stl"/>
|
<mesh filename="meshes/link_2.obj"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<material name="Blue"/>
|
<material name="Blue"/>
|
||||||
</visual>
|
</visual>
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
<visual>
|
<visual>
|
||||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
<geometry>
|
<geometry>
|
||||||
<mesh filename="meshes/link_3.stl"/>
|
<mesh filename="meshes/link_3.obj"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<material name="Orange"/>
|
<material name="Orange"/>
|
||||||
</visual>
|
</visual>
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
<visual>
|
<visual>
|
||||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
<geometry>
|
<geometry>
|
||||||
<mesh filename="meshes/link_4.stl"/>
|
<mesh filename="meshes/link_4.obj"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<material name="Blue"/>
|
<material name="Blue"/>
|
||||||
</visual>
|
</visual>
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
<visual>
|
<visual>
|
||||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
<geometry>
|
<geometry>
|
||||||
<mesh filename="meshes/link_5.stl"/>
|
<mesh filename="meshes/link_5.obj"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<material name="Blue"/>
|
<material name="Blue"/>
|
||||||
</visual>
|
</visual>
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
<visual>
|
<visual>
|
||||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
<geometry>
|
<geometry>
|
||||||
<mesh filename="meshes/link_6.stl"/>
|
<mesh filename="meshes/link_6.obj"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<material name="Orange"/>
|
<material name="Orange"/>
|
||||||
</visual>
|
</visual>
|
||||||
@@ -273,7 +273,7 @@
|
|||||||
<visual>
|
<visual>
|
||||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
<geometry>
|
<geometry>
|
||||||
<mesh filename="meshes/link_7.stl"/>
|
<mesh filename="meshes/link_7.obj"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<material name="Grey"/>
|
<material name="Grey"/>
|
||||||
</visual>
|
</visual>
|
||||||
|
|||||||
11
data/marble_cube.mtl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Blender MTL File: 'marble_cube.blend'
|
||||||
|
# Material Count: 1
|
||||||
|
|
||||||
|
newmtl None
|
||||||
|
Ns 0
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.8 0.8 0.8
|
||||||
|
Ks 0.8 0.8 0.8
|
||||||
|
d 1
|
||||||
|
illum 2
|
||||||
|
map_Kd tiles.jpg
|
||||||
50
data/marble_cube.obj
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# Blender v2.68 (sub 0) OBJ File: 'marble_cube.blend'
|
||||||
|
# www.blender.org
|
||||||
|
mtllib marble_cube.mtl
|
||||||
|
o Cube
|
||||||
|
v -1.000000 -1.000000 1.000000
|
||||||
|
v -1.000000 -1.000000 -1.000000
|
||||||
|
v 1.000000 -1.000000 -1.000000
|
||||||
|
v 1.000000 -1.000000 1.000000
|
||||||
|
v -1.000000 1.000000 1.000000
|
||||||
|
v -1.000000 1.000000 -1.000000
|
||||||
|
v 1.000000 1.000000 -1.000000
|
||||||
|
v 1.000000 1.000000 1.000000
|
||||||
|
vt 0.900965 0.983117
|
||||||
|
vt 0.607937 0.967373
|
||||||
|
vt 0.920037 0.686085
|
||||||
|
vt 0.327732 0.352741
|
||||||
|
vt 0.031938 0.342703
|
||||||
|
vt 0.332102 0.029274
|
||||||
|
vt 0.618409 0.671643
|
||||||
|
vt 0.324243 0.658970
|
||||||
|
vt 0.630389 0.363047
|
||||||
|
vt 0.919788 0.686473
|
||||||
|
vt 0.618344 0.672098
|
||||||
|
vt 0.939406 0.372060
|
||||||
|
vt 0.039476 0.936128
|
||||||
|
vt 0.319860 0.951754
|
||||||
|
vt 0.036647 0.646397
|
||||||
|
vt 0.642259 0.035851
|
||||||
|
vt 0.630105 0.363646
|
||||||
|
vt 0.332098 0.029351
|
||||||
|
vt 0.617757 0.671237
|
||||||
|
vt 0.027235 0.021626
|
||||||
|
vt 0.327768 0.352473
|
||||||
|
vt 0.630480 0.363422
|
||||||
|
vt 0.325108 0.659325
|
||||||
|
vt 0.327845 0.352523
|
||||||
|
usemtl None
|
||||||
|
s off
|
||||||
|
f 5/1 6/2 1/3
|
||||||
|
f 6/4 7/5 2/6
|
||||||
|
f 7/7 8/8 3/9
|
||||||
|
f 8/10 5/11 4/12
|
||||||
|
f 1/13 2/14 4/15
|
||||||
|
f 8/16 7/17 5/18
|
||||||
|
f 6/2 2/19 1/3
|
||||||
|
f 7/5 3/20 2/6
|
||||||
|
f 8/8 4/21 3/9
|
||||||
|
f 5/11 1/22 4/12
|
||||||
|
f 2/14 3/23 4/15
|
||||||
|
f 7/17 6/24 5/18
|
||||||
32
data/marble_cube.urdf
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="0.0" ?>
|
||||||
|
<robot name="cube">
|
||||||
|
<link name="baseLink">
|
||||||
|
<contact>
|
||||||
|
<lateral_friction value="1.0"/>
|
||||||
|
<rolling_friction value="0.0"/>
|
||||||
|
<contact_cfm value="0.0"/>
|
||||||
|
<contact_erp value="1.0"/>
|
||||||
|
</contact>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<mass value="1.0"/>
|
||||||
|
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||||
|
</inertial>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="marble_cube.obj" scale=".5 .5 .5"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
</robot>
|
||||||
|
|
||||||
11
data/mjcf/sphere.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<!--
|
||||||
|
MuJoCo MJCF test file. See http://mujoco.org/book/index.html
|
||||||
|
-->
|
||||||
|
<mujoco>
|
||||||
|
<worldbody>
|
||||||
|
<body pos="0 0 0">
|
||||||
|
<joint type="free"/>
|
||||||
|
<geom name="sphere_geom" size="0.05" type="sphere"/>
|
||||||
|
</body>
|
||||||
|
</worldbody>
|
||||||
|
</mujoco>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<collision>
|
<collision>
|
||||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
<geometry>
|
<geometry>
|
||||||
<box size="10 10 0.001"/>
|
<box size="200 200 0.001"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
</collision>
|
</collision>
|
||||||
</link>
|
</link>
|
||||||
|
|||||||
29
data/planeMesh.urdf
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="0.0" ?>
|
||||||
|
<robot name="plane">
|
||||||
|
<link name="planeLink">
|
||||||
|
<contact>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<mass value=".0"/>
|
||||||
|
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
|
||||||
|
</inertial>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="plane.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="plane.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
</robot>
|
||||||
|
|
||||||
35
data/plane_implicit.urdf
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="0.0" ?>
|
||||||
|
<robot name="plane">
|
||||||
|
<link name="planeLink">
|
||||||
|
<contact>
|
||||||
|
<!--<friction_anchor/>-->
|
||||||
|
<lateral_friction value="1."/>
|
||||||
|
<rolling_friction value="0.0"/>
|
||||||
|
<stiffness value="30000"/>
|
||||||
|
<damping value="10000"/>
|
||||||
|
</contact>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<mass value=".0"/>
|
||||||
|
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
|
||||||
|
</inertial>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="plane100.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<!--<origin rpy="0 0 0" xyz="0 0 -5"/>-->
|
||||||
|
<geometry>
|
||||||
|
<plane normal="0 0 1"/>
|
||||||
|
<!--<box size="100 100 10"/>-->
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
</robot>
|
||||||
|
|
||||||
@@ -9,6 +9,6 @@ newmtl Material
|
|||||||
Kd 0.5880 0.5880 0.5880
|
Kd 0.5880 0.5880 0.5880
|
||||||
Ks 0.0000 0.0000 0.0000
|
Ks 0.0000 0.0000 0.0000
|
||||||
Ke 0.0000 0.0000 0.0000
|
Ke 0.0000 0.0000 0.0000
|
||||||
map_Kd tex4x4.png
|
map_Kd checker_blue.png
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ v 15.000000 15.000000 0.000000
|
|||||||
v -15.000000 15.000000 0.000000
|
v -15.000000 15.000000 0.000000
|
||||||
v -15.000000 -15.000000 0.000000
|
v -15.000000 -15.000000 0.000000
|
||||||
|
|
||||||
vt 1.000000 0.000000
|
vt 15.000000 0.000000
|
||||||
vt 1.000000 1.000000
|
vt 15.000000 15.000000
|
||||||
vt 0.000000 1.000000
|
vt 0.000000 15.000000
|
||||||
vt 0.000000 0.000000
|
vt 0.000000 0.000000
|
||||||
|
|
||||||
usemtl Material
|
usemtl Material
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<mesh filename="plane_transparent.obj" scale="1 1 1"/>
|
<mesh filename="plane_transparent.obj" scale="1 1 1"/>
|
||||||
</geometry>
|
</geometry>
|
||||||
<material name="white">
|
<material name="white">
|
||||||
<color rgba="1 1 1 0.4"/>
|
<color rgba="1 1 1 .7"/>
|
||||||
</material>
|
</material>
|
||||||
</visual>
|
</visual>
|
||||||
<collision>
|
<collision>
|
||||||
|
|||||||
140
data/pole.urdf
Executable file
@@ -0,0 +1,140 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<robot name="physics">
|
||||||
|
|
||||||
|
<link name="slideBar">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="30 0.05 0.05"/>
|
||||||
|
</geometry>
|
||||||
|
<origin xyz="0 0 0"/>
|
||||||
|
<material name="green">
|
||||||
|
<color rgba="0 0.8 .8 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0"/>
|
||||||
|
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<link name="pole">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.05 0.05 1.0"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<inertial>
|
||||||
|
<origin xyz="0 0 0"/>
|
||||||
|
<mass value="10"/>
|
||||||
|
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||||
|
</inertial>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.05 0.05 1.0"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="cart_to_pole" type="prismatic">
|
||||||
|
<axis xyz="1 0 0"/>
|
||||||
|
<origin xyz="0.0 0.0 0.5"/>
|
||||||
|
<parent link="slideBar"/>
|
||||||
|
<child link="pole"/>
|
||||||
|
<limit effort="1000.0" lower="-5" upper="5" velocity="0.5"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="pole2">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.05 0.05 1.0"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.5"/>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<inertial>
|
||||||
|
<origin xyz="0 0 0.5"/>
|
||||||
|
<mass value="10"/>
|
||||||
|
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||||
|
</inertial>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.05 0.05 1.0"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.5"/>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="pole_to_pole2" type="continuous">
|
||||||
|
<axis xyz="1 0 0"/>
|
||||||
|
<origin xyz="0.0 0.0 0.5"/>
|
||||||
|
<parent link="pole"/>
|
||||||
|
<child link="pole2"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="pole3">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.05 0.05 1.0"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.5"/>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<inertial>
|
||||||
|
<origin xyz="0 0 0.5"/>
|
||||||
|
<mass value="10"/>
|
||||||
|
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||||
|
</inertial>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.05 0.05 1.0"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0.5"/>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="pole2_to_pole3" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<origin xyz="0.0 0.0 1"/>
|
||||||
|
<parent link="pole2"/>
|
||||||
|
<child link="pole3"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="endeffector">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.06 0.06 .06"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<material name="red">
|
||||||
|
<color rgba="1 0 0 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<inertial>
|
||||||
|
<origin xyz="0 0 0"/>
|
||||||
|
<mass value="10"/>
|
||||||
|
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||||
|
</inertial>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size="0.06 0.06 .06"/>
|
||||||
|
</geometry>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="pole2_to_endeffector" type="fixed">
|
||||||
|
<origin xyz="0.0 0.0 1"/>
|
||||||
|
<parent link="pole3"/>
|
||||||
|
<child link="endeffector"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
</robot>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<joint name="left_gripper_joint" type="revolute">
|
<joint name="left_gripper_joint" type="revolute">
|
||||||
<axis xyz="0 0 1"/>
|
<axis xyz="0 0 1"/>
|
||||||
<limit effort="1000.0" lower="0.0" upper="0.548" velocity="0.5"/>
|
<limit effort="1000.0" lower="-2.0" upper="2.548" velocity="0.5"/>
|
||||||
<origin rpy="0 0 0" xyz="0.2 0.01 0"/>
|
<origin rpy="0 0 0" xyz="0.2 0.01 0"/>
|
||||||
<parent link="gripper_pole"/>
|
<parent link="gripper_pole"/>
|
||||||
<child link="left_gripper"/>
|
<child link="left_gripper"/>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
|
|
||||||
<joint name="right_gripper_joint" type="revolute">
|
<joint name="right_gripper_joint" type="revolute">
|
||||||
<axis xyz="0 0 -1"/>
|
<axis xyz="0 0 -1"/>
|
||||||
<limit effort="1000.0" lower="0.0" upper="0.548" velocity="0.5"/>
|
<limit effort="1000.0" lower="-2.0" upper="2." velocity="0.5"/>
|
||||||
<origin rpy="0 0 0" xyz="0.2 -0.01 0"/>
|
<origin rpy="0 0 0" xyz="0.2 -0.01 0"/>
|
||||||
<parent link="gripper_pole"/>
|
<parent link="gripper_pole"/>
|
||||||
<child link="right_gripper"/>
|
<child link="right_gripper"/>
|
||||||
|
|||||||
27
data/quadruped/license.txt
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
LICENSE:
|
||||||
|
Copyright (c) 2017, Erwin Coumans
|
||||||
|
Google Inc.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions or derived work must retain this copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. 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.
|
||||||
1073
data/quadruped/minitaur_derpy.urdf
Normal file
914
data/quadruped/minitaur_rainbow_dash.urdf
Normal file
@@ -0,0 +1,914 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<robot name="quadruped">
|
||||||
|
<link name="base_chassis_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".3 .13 .087"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="black">
|
||||||
|
<color rgba=".3 .3 .3 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz=".10 0 .08"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".08 .08 .08"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".3 .13 .087"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz=".10 0 .08"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".08 .08 .08"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz=".05 0 0"/>
|
||||||
|
<mass value="3.353"/>
|
||||||
|
<inertia ixx=".006837" ixy=".0" ixz=".0" iyy=".027262" iyz=".0" izz=".029870"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<link name="chassis_right">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="1.32"/>
|
||||||
|
<inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="chassis_right_center" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="base_chassis_link"/>
|
||||||
|
<child link="chassis_right"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -.1265 -.0185"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="chassis_left">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="1.32"/>
|
||||||
|
<inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="chassis_left_center" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="base_chassis_link"/>
|
||||||
|
<child link="chassis_left"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .1265 -.0185"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_front_rightR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_rightR_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_right"/>
|
||||||
|
<child link="motor_front_rightR_link"/>
|
||||||
|
<origin rpy="1.57075 0 0" xyz=".2375 -.0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_front_rightL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_rightL_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_right"/>
|
||||||
|
<child link="motor_front_rightL_link"/>
|
||||||
|
<origin rpy="1.57075 0 3.141592" xyz=".2375 .0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_front_leftL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_leftL_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_left"/>
|
||||||
|
<child link="motor_front_leftL_link"/>
|
||||||
|
<origin rpy="1.57075 0 3.141592" xyz=".2375 .0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_front_leftR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_leftR_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_left"/>
|
||||||
|
<child link="motor_front_leftR_link"/>
|
||||||
|
<origin rpy="1.57075 0 0" xyz=".2375 -.0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_back_rightR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_back_rightR_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_right"/>
|
||||||
|
<child link="motor_back_rightR_link"/>
|
||||||
|
<origin rpy="1.57075 0 0" xyz="-.2375 -.0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_back_rightL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_back_rightL_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_right"/>
|
||||||
|
<child link="motor_back_rightL_link"/>
|
||||||
|
<origin rpy="1.57075 0 3.141592" xyz="-.2375 .0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_back_leftL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_back_leftL_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_left"/>
|
||||||
|
<child link="motor_back_leftL_link"/>
|
||||||
|
<origin rpy="1.57075 0 3.141592" xyz="-.2375 .0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_back_leftR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_back_leftR_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_left"/>
|
||||||
|
<child link="motor_back_leftR_link"/>
|
||||||
|
<origin rpy="1.57075 0 0" xyz="-.2375 -.0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_front_rightR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_front_rightR_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_front_rightR_link"/>
|
||||||
|
<child link="upper_leg_front_rightR_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_front_rightR_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".3"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<mass value=".086"/>
|
||||||
|
<inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_front_rightR_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_front_rightR_link"/>
|
||||||
|
<child link="lower_leg_front_rightR_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_front_rightL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_front_rightL_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_front_rightL_link"/>
|
||||||
|
<child link="upper_leg_front_rightL_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_front_rightL_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".3"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .1"/>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00023166" ixy=".0" ixz=".0" iyy=".00023325" iyz=".0" izz=".00000198"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_front_rightL_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_front_rightL_link"/>
|
||||||
|
<child link="lower_leg_front_rightL_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_front_leftR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_front_leftR_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_front_leftR_link"/>
|
||||||
|
<child link="upper_leg_front_leftR_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_front_leftR_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".3"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .1"/>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00023166" ixy=".0" ixz=".0" iyy=".00023325" iyz=".0" izz=".00000198"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_front_leftR_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_front_leftR_link"/>
|
||||||
|
<child link="lower_leg_front_leftR_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_front_leftL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_front_leftL_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_front_leftL_link"/>
|
||||||
|
<child link="upper_leg_front_leftL_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_front_leftL_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".3"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<mass value=".086"/>
|
||||||
|
<inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_front_leftL_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_front_leftL_link"/>
|
||||||
|
<child link="lower_leg_front_leftL_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_back_rightR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_back_rightR_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_back_rightR_link"/>
|
||||||
|
<child link="upper_leg_back_rightR_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_back_rightR_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".3"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<mass value=".086"/>
|
||||||
|
<inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_back_rightR_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_back_rightR_link"/>
|
||||||
|
<child link="lower_leg_back_rightR_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_back_rightL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_back_rightL_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_back_rightL_link"/>
|
||||||
|
<child link="upper_leg_back_rightL_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_back_rightL_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".3"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .1"/>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00023166" ixy=".0" ixz=".0" iyy=".00023325" iyz=".0" izz=".00000198"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_back_rightL_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_back_rightL_link"/>
|
||||||
|
<child link="lower_leg_back_rightL_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_back_leftR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_back_leftR_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_back_leftR_link"/>
|
||||||
|
<child link="upper_leg_back_leftR_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_back_leftR_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".3"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .1"/>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00023166" ixy=".0" ixz=".0" iyy=".00023325" iyz=".0" izz=".00000198"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_back_leftR_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_back_leftR_link"/>
|
||||||
|
<child link="lower_leg_back_leftR_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_back_leftL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_back_leftL_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_back_leftL_link"/>
|
||||||
|
<child link="upper_leg_back_leftL_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_back_leftL_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".3"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<mass value=".086"/>
|
||||||
|
<inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_back_leftL_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_back_leftL_link"/>
|
||||||
|
<child link="lower_leg_back_leftL_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
</robot>
|
||||||
980
data/quadruped/minitaur_rainbow_dash_v1.urdf
Normal file
@@ -0,0 +1,980 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<robot name="quadruped">
|
||||||
|
|
||||||
|
<link name="base_chassis_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".3 .13 .087"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="black">
|
||||||
|
<color rgba=".3 .3 .3 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".3 .13 .087"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz=".05 0 0"/>
|
||||||
|
<mass value="3.353"/>
|
||||||
|
<inertia ixx=".006837" ixy=".0" ixz=".0" iyy=".027262" iyz=".0" izz=".029870"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
|
||||||
|
<link name="chassis_right">
|
||||||
|
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="blue">
|
||||||
|
<color rgba="0 0 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="yellow">
|
||||||
|
<color rgba="1 1 0 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 .054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.322"/>
|
||||||
|
<inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="chassis_right_center" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="base_chassis_link"/>
|
||||||
|
<child link="chassis_right"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -.1265 -.0185"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="chassis_left">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="green">
|
||||||
|
<color rgba="0 1 0 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="green"/>
|
||||||
|
</visual>
|
||||||
|
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 -.054 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.322"/>
|
||||||
|
<inertia ixx=".004147" ixy=".0" ixz=".0" iyy=".040913" iyz=".0" izz=".041840"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="chassis_left_center" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="base_chassis_link"/>
|
||||||
|
<child link="chassis_left"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .1265 -.0185"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_front_rightR_bracket_link">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.02 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="red">
|
||||||
|
<color rgba="1 0 0 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.02 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.03 0"/>
|
||||||
|
<mass value=".16"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_rightR_bracket_joint" type="prismatic">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="base_chassis_link"/>
|
||||||
|
<child link="motor_front_rightR_bracket_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 -0.154 -.0185"/>
|
||||||
|
<limit effort="100" lower="-0.02" upper="0.02" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_front_rightR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".241"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_rightR_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_front_rightR_bracket_link"/>
|
||||||
|
<child link="motor_front_rightR_link"/>
|
||||||
|
<origin rpy="1.57075 0 0" xyz="0 0 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_front_rightL_link">
|
||||||
|
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".241"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_rightL_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_right"/>
|
||||||
|
<child link="motor_front_rightL_link"/>
|
||||||
|
<origin rpy="1.57075 0 3.141592" xyz=".2375 .0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="motor_front_leftL_bracket_link">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.02 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="red">
|
||||||
|
<color rgba="1 0 0 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.02 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.02 0"/>
|
||||||
|
<mass value=".16"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_leftL_bracket_joint" type="prismatic">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="base_chassis_link"/>
|
||||||
|
<child link="motor_front_leftL_bracket_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz=".2375 0.154 -.0185"/>
|
||||||
|
<limit effort="100" lower="-0.02" upper="0.02" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="motor_front_leftL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".241"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_leftL_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_front_leftL_bracket_link"/>
|
||||||
|
<child link="motor_front_leftL_link"/>
|
||||||
|
<origin rpy="1.57075 0 3.141592" xyz="0 0 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_front_leftR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".241"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_leftR_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_left"/>
|
||||||
|
<child link="motor_front_leftR_link"/>
|
||||||
|
<origin rpy="1.57075 0 0" xyz=".2375 -.0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="motor_back_rightR_bracket_link">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.02 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="red">
|
||||||
|
<color rgba="1 0 0 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.02 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.03 0"/>
|
||||||
|
<mass value=".16"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_back_rightR_bracket_joint" type="prismatic">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="base_chassis_link"/>
|
||||||
|
<child link="motor_back_rightR_bracket_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 -0.154 -.0185"/>
|
||||||
|
<limit effort="100" lower="-0.02" upper="0.02" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="motor_back_rightR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white1">
|
||||||
|
<color rgba="1 0 0 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".241"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_back_rightR_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_back_rightR_bracket_link"/>
|
||||||
|
<child link="motor_back_rightR_link"/>
|
||||||
|
<origin rpy="1.57075 0 0" xyz="0 0 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_back_rightL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".241"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_back_rightL_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_right"/>
|
||||||
|
<child link="motor_back_rightL_link"/>
|
||||||
|
<origin rpy="1.57075 0 3.141592" xyz="-.2375 .0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="motor_back_leftL_bracket_link">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.02 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="red">
|
||||||
|
<color rgba="1 0 0 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.02 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".068 .032 .050"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.02 0"/>
|
||||||
|
<mass value=".16"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_back_leftL_bracket_joint" type="prismatic">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="base_chassis_link"/>
|
||||||
|
<child link="motor_back_leftL_bracket_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="-.2375 0.154 -.0185"/>
|
||||||
|
<limit effort="100" lower="-0.02" upper="0.02" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
|
||||||
|
<link name="motor_back_leftL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".241"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_back_leftL_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_back_leftL_bracket_link"/>
|
||||||
|
<child link="motor_back_leftL_link"/>
|
||||||
|
<origin rpy="1.57075 0 3.141592" xyz="0 0 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="motor_back_leftR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length=".021" radius=".0425"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".241"/>
|
||||||
|
<inertia ixx=".00011397" ixy=".0" ixz=".0" iyy=".00011397" iyz=".0" izz=".00021765"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_back_leftR_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_left"/>
|
||||||
|
<child link="motor_back_leftR_link"/>
|
||||||
|
<origin rpy="1.57075 0 0" xyz="-.2375 -.0275 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_front_rightR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_front_rightR_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_front_rightR_link"/>
|
||||||
|
<child link="upper_leg_front_rightR_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_front_rightR_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".05"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<mass value=".086"/>
|
||||||
|
<inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_front_rightR_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_front_rightR_link"/>
|
||||||
|
<child link="lower_leg_front_rightR_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_front_rightL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_front_rightL_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_front_rightL_link"/>
|
||||||
|
<child link="upper_leg_front_rightL_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_front_rightL_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".05"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .1"/>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00023166" ixy=".0" ixz=".0" iyy=".00023325" iyz=".0" izz=".00000198"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_front_rightL_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_front_rightL_link"/>
|
||||||
|
<child link="lower_leg_front_rightL_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_front_leftR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_front_leftR_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_front_leftR_link"/>
|
||||||
|
<child link="upper_leg_front_leftR_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_front_leftR_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".05"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .1"/>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00023166" ixy=".0" ixz=".0" iyy=".00023325" iyz=".0" izz=".00000198"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_front_leftR_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_front_leftR_link"/>
|
||||||
|
<child link="lower_leg_front_leftR_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_front_leftL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_front_leftL_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_front_leftL_link"/>
|
||||||
|
<child link="upper_leg_front_leftL_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_front_leftL_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".05"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<mass value=".086"/>
|
||||||
|
<inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_front_leftL_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_front_leftL_link"/>
|
||||||
|
<child link="lower_leg_front_leftL_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_back_rightR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_back_rightR_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_back_rightR_link"/>
|
||||||
|
<child link="upper_leg_back_rightR_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_back_rightR_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".05"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<mass value=".086"/>
|
||||||
|
<inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_back_rightR_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_back_rightR_link"/>
|
||||||
|
<child link="lower_leg_back_rightR_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_back_rightL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_back_rightL_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_back_rightL_link"/>
|
||||||
|
<child link="upper_leg_back_rightL_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_back_rightL_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".05"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .1"/>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00023166" ixy=".0" ixz=".0" iyy=".00023325" iyz=".0" izz=".00000198"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_back_rightL_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_back_rightL_link"/>
|
||||||
|
<child link="lower_leg_back_rightL_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_back_leftR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_back_leftR_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_back_leftR_link"/>
|
||||||
|
<child link="upper_leg_back_leftR_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_back_leftR_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".05"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .108"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .216"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .1"/>
|
||||||
|
<mass value=".072"/>
|
||||||
|
<inertia ixx=".00023166" ixy=".0" ixz=".0" iyy=".00023325" iyz=".0" izz=".00000198"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_back_leftR_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_back_leftR_link"/>
|
||||||
|
<child link="lower_leg_back_leftR_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="upper_leg_back_leftL_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".039 .008 .129"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".034"/>
|
||||||
|
<inertia ixx=".000038770" ixy=".0" ixz=".0" iyy=".000042198" iyz=".0" izz=".0000036030"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="hip_back_leftL_joint" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="motor_back_leftL_link"/>
|
||||||
|
<child link="upper_leg_back_leftL_link"/>
|
||||||
|
<origin rpy="-1.57075 0 0" xyz="0 .045 -.0145"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
<link name="lower_leg_back_leftL_link">
|
||||||
|
<contact>
|
||||||
|
<friction_anchor/>
|
||||||
|
<stiffness value="3000.0"/>
|
||||||
|
<damping value="100.0"/>
|
||||||
|
<spinning_friction value=".05"/>
|
||||||
|
<lateral_friction value="1"/>
|
||||||
|
</contact>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba=".65 .65 .75 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".017 .009 .240"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 .120"/>
|
||||||
|
<mass value=".086"/>
|
||||||
|
<inertia ixx=".00032459" ixy=".0" ixz=".0" iyy=".00032637" iyz=".0" izz=".000002178"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="knee_back_leftL_joint" type="continuous">
|
||||||
|
<axis xyz="0 1 0"/>
|
||||||
|
<parent link="upper_leg_back_leftL_link"/>
|
||||||
|
<child link="lower_leg_back_leftL_link"/>
|
||||||
|
<origin rpy="0 0 0" xyz="0 .0085 .056"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping=".0" friction=".0"/>
|
||||||
|
</joint>
|
||||||
|
</robot>
|
||||||
203
data/quadruped/minitaur_single_motor.urdf
Normal file
@@ -0,0 +1,203 @@
|
|||||||
|
<?xml version="0.0" ?>
|
||||||
|
<!-- ======================================================================= -->
|
||||||
|
<!--LICENSE: -->
|
||||||
|
<!--Copyright (c) 2017, Erwin Coumans -->
|
||||||
|
<!--Google Inc. -->
|
||||||
|
<!--All rights reserved. -->
|
||||||
|
<!-- -->
|
||||||
|
<!--Redistribution and use in source and binary forms, with or without -->
|
||||||
|
<!--modification, are permitted provided that the following conditions are -->
|
||||||
|
<!--met: -->
|
||||||
|
<!-- -->
|
||||||
|
<!--1. Redistributions or derived work must retain this copyright notice, -->
|
||||||
|
<!-- this list of conditions and the following disclaimer. -->
|
||||||
|
<!-- -->
|
||||||
|
<!--2. 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. -->
|
||||||
|
|
||||||
|
<robot name="quadruped">
|
||||||
|
<link name="base_chassis_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<box size=".33 0.10 .07"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="black">
|
||||||
|
<color rgba="0.3 0.3 0.3 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.10 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".17 0.10 .05"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="black">
|
||||||
|
<color rgba="0.3 0.3 0.3 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.10 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".17 0.10 .05"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="black">
|
||||||
|
<color rgba="0.3 0.3 0.3 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<box size=".33 0.10 .07"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.10 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".17 0.10 .05"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.10 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".17 0.10 .05"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
|
||||||
|
<inertial>
|
||||||
|
<mass value="3"/>
|
||||||
|
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<link name="chassis_right">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.035 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".34 0.01 .04"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba="0.65 0.65 0.75 1"/>
|
||||||
|
</material> </visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.035 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".34 0.01 .04"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba="0.65 0.65 0.75 1"/>
|
||||||
|
</material> </visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.035 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".34 0.01 .04"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.035 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".34 0.01 .04"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".1"/>
|
||||||
|
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="chassis_right_center" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="base_chassis_link"/>
|
||||||
|
<child link="chassis_right"/>
|
||||||
|
<origin rpy="-0.0872665 0 0" xyz="0.0 -0.10 0.0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping="0.0" friction="0.0"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
<link name="chassis_left">
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.035 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".34 0.01 .04"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba="0.65 0.65 0.75 1"/>
|
||||||
|
</material> </visual>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.035 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".34 0.01 .04"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="grey">
|
||||||
|
<color rgba="0.65 0.65 0.75 1"/>
|
||||||
|
</material> </visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0.035 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".34 0.01 .04"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 -0.035 0"/>
|
||||||
|
<geometry>
|
||||||
|
<box size=".34 0.01 .04"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value=".1"/>
|
||||||
|
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
|
||||||
|
<joint name="chassis_left_center" type="fixed">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="base_chassis_link"/>
|
||||||
|
<child link="chassis_left"/>
|
||||||
|
<origin rpy="0.0872665 0 0" xyz="0.0 0.10 0.0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping="0.0" friction="0.0"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link name="motor_front_rightR_link">
|
||||||
|
<visual>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="tmotor3.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.026" radius="0.0434"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
<inertial>
|
||||||
|
<mass value="0.25"/>
|
||||||
|
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||||
|
</inertial>
|
||||||
|
</link>
|
||||||
|
<joint name="motor_front_rightR_joint" type="continuous">
|
||||||
|
<axis xyz="0 0 1"/>
|
||||||
|
<parent link="chassis_right"/>
|
||||||
|
<child link="motor_front_rightR_link"/>
|
||||||
|
<origin rpy="1.57075 0 0" xyz="0.21 -0.025 0"/>
|
||||||
|
<limit effort="100" velocity="100"/>
|
||||||
|
<joint_properties damping="0.0" friction="0.0"/>
|
||||||
|
</joint>
|
||||||
|
|
||||||
|
</robot>
|
||||||
|
|
||||||
30
data/sphere_small_zeroinertia.urdf
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="0.0" ?>
|
||||||
|
<robot name="urdf_robot">
|
||||||
|
<link name="base_link">
|
||||||
|
<contact>
|
||||||
|
<rolling_friction value="0.001"/>
|
||||||
|
<spinning_friction value="0.001"/>
|
||||||
|
</contact>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<mass value=".1"/>
|
||||||
|
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
|
||||||
|
</inertial>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="textured_sphere_smooth.obj" scale="0.03 0.03 0.03"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<sphere radius="0.03"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
</robot>
|
||||||
|
|
||||||
27
data/table/license.txt
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
LICENSE:
|
||||||
|
Copyright (c) 2017, Erwin Coumans
|
||||||
|
Google Inc.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions or derived work must retain this copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. 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.
|
||||||
11
data/table/table2.mtl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Blender MTL File: 'table1.blend'
|
||||||
|
# Material Count: 1
|
||||||
|
|
||||||
|
newmtl None
|
||||||
|
Ns 0
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.8 0.8 0.8
|
||||||
|
Ks 0.8 0.8 0.8
|
||||||
|
d 1
|
||||||
|
illum 2
|
||||||
|
map_Kd tabletop.jpg
|
||||||
2050
data/table/table2.obj
Normal file
32
data/table/table2.urdf
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="0.0" ?>
|
||||||
|
<robot name="cube">
|
||||||
|
<link name="baseLink">
|
||||||
|
<contact>
|
||||||
|
<lateral_friction value="1.0"/>
|
||||||
|
<rolling_friction value="0.0"/>
|
||||||
|
<contact_cfm value="0.0"/>
|
||||||
|
<contact_erp value="1.0"/>
|
||||||
|
</contact>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<mass value="1.0"/>
|
||||||
|
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||||
|
</inertial>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="-1.57079632679 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="table2.obj" scale="1 1 1"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="white">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<cylinder length="0.01" radius="0.5"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
</robot>
|
||||||
|
|
||||||
BIN
data/table/tabletop.jpg
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
32
data/teddy_large.urdf
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="0.0" ?>
|
||||||
|
<robot name="cube.urdf">
|
||||||
|
<link name="baseLink">
|
||||||
|
<contact>
|
||||||
|
<lateral_friction value="0.5"/>
|
||||||
|
<rolling_friction value="0.0"/>
|
||||||
|
<contact_cfm value="0.0"/>
|
||||||
|
<contact_erp value="1.0"/>
|
||||||
|
</contact>
|
||||||
|
<inertial>
|
||||||
|
<origin rpy="0 0 0" xyz="0.07 0.05 0.03"/>
|
||||||
|
<mass value=".1"/>
|
||||||
|
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||||
|
</inertial>
|
||||||
|
<visual>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="teddy2_VHACD_CHs.obj" scale="3 3 3"/>
|
||||||
|
</geometry>
|
||||||
|
<material name="red">
|
||||||
|
<color rgba="1 1 1 1"/>
|
||||||
|
</material>
|
||||||
|
</visual>
|
||||||
|
<collision>
|
||||||
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||||
|
<geometry>
|
||||||
|
<mesh filename="teddy2_VHACD_CHs.obj" scale="3 3 3"/>
|
||||||
|
</geometry>
|
||||||
|
</collision>
|
||||||
|
</link>
|
||||||
|
</robot>
|
||||||
|
|
||||||
@@ -29,4 +29,3 @@
|
|||||||
</collision>
|
</collision>
|
||||||
</link>
|
</link>
|
||||||
</robot>
|
</robot>
|
||||||
|
|
||||||
|
|||||||
BIN
data/tiles.jpg
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
11
data/toys/cube.mtl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Blender MTL File: 'shape_sort.blend'
|
||||||
|
# Material Count: 1
|
||||||
|
|
||||||
|
newmtl Material.002
|
||||||
|
Ns 96.078431
|
||||||
|
Ka 0.000000 0.000000 0.000000
|
||||||
|
Kd 0.017444 0.640000 0.032216
|
||||||
|
Ks 0.034126 0.500000 0.031333
|
||||||
|
Ni 1.000000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
64
data/toys/cube.obj
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# Blender v2.71 (sub 0) OBJ File: 'shape_sort.blend'
|
||||||
|
# www.blender.org
|
||||||
|
mtllib cube.mtl
|
||||||
|
o Cube.001_Cube.002
|
||||||
|
v -0.231854 0.040516 -0.056463
|
||||||
|
v -0.231854 0.040516 -0.121937
|
||||||
|
v -0.144556 0.040516 -0.121937
|
||||||
|
v -0.144556 0.040516 -0.056463
|
||||||
|
v -0.231854 0.127815 -0.056463
|
||||||
|
v -0.231854 0.127815 -0.121937
|
||||||
|
v -0.144556 0.127815 -0.121937
|
||||||
|
v -0.144556 0.127815 -0.056463
|
||||||
|
v -0.231854 0.040516 -0.056463
|
||||||
|
v -0.231854 0.040516 -0.121937
|
||||||
|
v -0.144556 0.040516 -0.121937
|
||||||
|
v -0.144556 0.040516 -0.056463
|
||||||
|
v -0.231854 0.127815 -0.056463
|
||||||
|
v -0.231854 0.127815 -0.121937
|
||||||
|
v -0.144556 0.127815 -0.121937
|
||||||
|
v -0.144556 0.127815 -0.056463
|
||||||
|
vt 1.044600 0.042083
|
||||||
|
vt 1.044600 -0.957917
|
||||||
|
vt 0.044600 -0.957917
|
||||||
|
vt 1.905897 0.042083
|
||||||
|
vt 1.905897 -0.957917
|
||||||
|
vt 0.905898 -0.957917
|
||||||
|
vt -0.955400 0.042083
|
||||||
|
vt -0.955400 -0.957917
|
||||||
|
vt -0.094102 0.042083
|
||||||
|
vt -0.094102 -0.957917
|
||||||
|
vt 0.905898 1.044600
|
||||||
|
vt 1.905897 1.044600
|
||||||
|
vt 1.905897 0.044600
|
||||||
|
vt -0.094102 1.044600
|
||||||
|
vt -0.094102 0.044600
|
||||||
|
vt 0.044600 0.042083
|
||||||
|
vt 0.905898 0.042083
|
||||||
|
vt 0.905898 0.044600
|
||||||
|
usemtl Material.002
|
||||||
|
s off
|
||||||
|
f 6/1 2/2 1/3
|
||||||
|
f 7/4 3/5 2/6
|
||||||
|
f 8/7 4/8 3/3
|
||||||
|
f 5/9 1/10 4/6
|
||||||
|
f 2/11 3/12 4/13
|
||||||
|
f 7/11 6/14 5/15
|
||||||
|
f 14/1 10/2 9/3
|
||||||
|
f 15/4 11/5 10/6
|
||||||
|
f 16/7 12/8 11/3
|
||||||
|
f 13/9 9/10 12/6
|
||||||
|
f 10/11 11/12 12/13
|
||||||
|
f 15/11 14/14 13/15
|
||||||
|
f 5/16 6/1 1/3
|
||||||
|
f 6/17 7/4 2/6
|
||||||
|
f 7/16 8/7 3/3
|
||||||
|
f 8/17 5/9 4/6
|
||||||
|
f 1/18 2/11 4/13
|
||||||
|
f 8/18 7/11 5/15
|
||||||
|
f 13/16 14/1 9/3
|
||||||
|
f 14/17 15/4 10/6
|
||||||
|
f 15/16 16/7 11/3
|
||||||
|
f 16/17 13/9 12/6
|
||||||
|
f 9/18 10/11 12/13
|
||||||
|
f 16/18 15/11 13/15
|
||||||