[gazebo] 01/01: Migrate to KIDO
Jose Luis Rivero
jrivero-guest at moszumanska.debian.org
Thu Sep 15 00:08:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
jrivero-guest pushed a commit to branch kido
in repository gazebo.
commit 2e63475c0a9b0e4946c223daa5544c7658a79deb
Author: Jose Luis Rivero <jrivero at osrfoundation.org>
Date: Mon Aug 29 18:39:40 2016 +0200
Migrate to KIDO
---
cmake/SearchForStuff.cmake | 16 +-
deps/opende/CMakeLists.txt | 6 +-
deps/opende/include/ode/objects.h | 4 +-
deps/opende/src/quickstep_util.h | 2 +-
deps/opende/src/step.cpp | 10 +-
deps/opende/src/step_dart_pgs_wrapper.cpp | 2 +-
deps/opende/src/step_dart_pgs_wrapper.h | 4 +-
.../parallel_quickstep/CMakeModules/FindCUDA.cmake | 12 +-
.../include/parallel_quickstep/cuda_common.h | 4 +-
gazebo/Server.cc | 2 +-
gazebo/Server.hh | 4 +-
gazebo/gazebo.1.ronn | 2 +-
gazebo/gazebo_main.cc | 2 +-
gazebo/gzserver.1.ronn | 2 +-
gazebo/msgs/physics.proto | 2 +-
gazebo/physics/CMakeLists.txt | 16 +-
gazebo/physics/Joint.hh | 2 +-
gazebo/physics/PhysicsEngine.hh | 4 +-
gazebo/physics/PhysicsEngine_TEST.cc | 8 +-
gazebo/physics/PhysicsFactory.cc | 8 +-
gazebo/physics/World.hh | 4 +-
gazebo/physics/dart/CMakeLists.txt | 58 ----
gazebo/physics/dart/DARTSphereShapePrivate.hh | 40 ---
gazebo/physics/kido/CMakeLists.txt | 58 ++++
.../DARTBallJoint.cc => kido/KIDOBallJoint.cc} | 60 ++--
.../DARTBallJoint.hh => kido/KIDOBallJoint.hh} | 16 +-
.../{dart/DARTBoxShape.cc => kido/KIDOBoxShape.cc} | 46 +--
.../{dart/DARTBoxShape.hh => kido/KIDOBoxShape.hh} | 20 +-
.../KIDOBoxShapePrivate.hh} | 16 +-
.../DARTCollision.cc => kido/KIDOCollision.cc} | 68 ++--
.../DARTCollision.hh => kido/KIDOCollision.hh} | 44 +--
.../KIDOCollisionPrivate.hh} | 22 +-
.../KIDOCylinderShape.cc} | 42 +--
.../KIDOCylinderShape.hh} | 20 +-
.../KIDOCylinderShapePrivate.hh} | 16 +-
.../DARTFixedJoint.cc => kido/KIDOFixedJoint.cc} | 48 +--
.../DARTFixedJoint.hh => kido/KIDOFixedJoint.hh} | 14 +-
.../KIDOHeightmapShape.cc} | 14 +-
.../KIDOHeightmapShape.hh} | 20 +-
.../KIDOHeightmapShapePrivate.hh} | 16 +-
.../DARTHinge2Joint.cc => kido/KIDOHinge2Joint.cc} | 68 ++--
.../DARTHinge2Joint.hh => kido/KIDOHinge2Joint.hh} | 14 +-
.../DARTHingeJoint.cc => kido/KIDOHingeJoint.cc} | 54 ++--
.../DARTHingeJoint.hh => kido/KIDOHingeJoint.hh} | 14 +-
.../{dart/DARTJoint.cc => kido/KIDOJoint.cc} | 170 +++++-----
.../{dart/DARTJoint.hh => kido/KIDOJoint.hh} | 34 +-
.../KIDOJointPrivate.hh} | 32 +-
.../physics/{dart/DARTLink.cc => kido/KIDOLink.cc} | 346 ++++++++++-----------
.../physics/{dart/DARTLink.hh => kido/KIDOLink.hh} | 58 ++--
.../DARTLinkPrivate.hh => kido/KIDOLinkPrivate.hh} | 36 +--
.../physics/{dart/DARTMesh.cc => kido/KIDOMesh.cc} | 44 +--
.../physics/{dart/DARTMesh.hh => kido/KIDOMesh.hh} | 24 +-
.../DARTMeshPrivate.hh => kido/KIDOMeshPrivate.hh} | 16 +-
.../DARTMeshShape.cc => kido/KIDOMeshShape.cc} | 30 +-
.../DARTMeshShape.hh => kido/KIDOMeshShape.hh} | 16 +-
.../KIDOMeshShapePrivate.hh} | 28 +-
.../{dart/DARTModel.cc => kido/KIDOModel.cc} | 66 ++--
.../{dart/DARTModel.hh => kido/KIDOModel.hh} | 32 +-
.../KIDOModelPrivate.hh} | 18 +-
.../KIDOMultiRayShape.cc} | 28 +-
.../KIDOMultiRayShape.hh} | 20 +-
.../KIDOMultiRayShapePrivate.hh} | 16 +-
.../{dart/DARTPhysics.cc => kido/KIDOPhysics.cc} | 256 +++++++--------
.../{dart/DARTPhysics.hh => kido/KIDOPhysics.hh} | 46 +--
.../KIDOPhysicsPrivate.hh} | 22 +-
.../DARTPlaneShape.cc => kido/KIDOPlaneShape.cc} | 32 +-
.../DARTPlaneShape.hh => kido/KIDOPlaneShape.hh} | 20 +-
.../KIDOPlaneShapePrivate.hh} | 16 +-
.../KIDOPolylineShape.cc} | 26 +-
.../KIDOPolylineShape.hh} | 18 +-
.../KIDOPolylineShapePrivate.hh} | 28 +-
.../{dart/DARTRayShape.cc => kido/KIDORayShape.cc} | 32 +-
.../{dart/DARTRayShape.hh => kido/KIDORayShape.hh} | 20 +-
.../KIDORayShapePrivate.hh} | 16 +-
.../DARTScrewJoint.cc => kido/KIDOScrewJoint.cc} | 90 +++---
.../DARTScrewJoint.hh => kido/KIDOScrewJoint.hh} | 14 +-
.../DARTSliderJoint.cc => kido/KIDOSliderJoint.cc} | 54 ++--
.../DARTSliderJoint.hh => kido/KIDOSliderJoint.hh} | 14 +-
.../DARTSphereShape.cc => kido/KIDOSphereShape.cc} | 40 +--
.../DARTSphereShape.hh => kido/KIDOSphereShape.hh} | 22 +-
.../KIDOSphereShapePrivate.hh} | 16 +-
.../KIDOSurfaceParams.cc} | 20 +-
.../KIDOSurfaceParams.hh} | 18 +-
.../KIDOSurfaceParamsPrivate.hh} | 16 +-
.../{dart/DARTTypes.hh => kido/KIDOTypes.hh} | 54 ++--
.../KIDOUniversalJoint.cc} | 56 ++--
.../KIDOUniversalJoint.hh} | 16 +-
.../physics/{dart/dart_inc.h => kido/kido_inc.h} | 18 +-
gazebo/physics/ode/ODEPhysics.cc | 8 +-
gazebo/physics/ode/ODEPhysics_TEST.cc | 4 +-
gazebo/test/helper_physics_generator.hh | 18 +-
91 files changed, 1444 insertions(+), 1484 deletions(-)
diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index c89f6f7..c8bb25d 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -145,15 +145,15 @@ if (PKG_CONFIG_FOUND)
endif()
#################################################
- # Find DART
- find_package(DARTCore 4.3.3 QUIET)
- if (DARTCore_FOUND)
- message (STATUS "Looking for DARTCore - found")
- set (HAVE_DART TRUE)
+ # Find KIDO
+ find_package(KIDO QUIET)
+ if (KIDO_FOUND)
+ message (STATUS "Looking for kido - found")
+ set (HAVE_KIDO TRUE)
else()
- message (STATUS "Looking for DARTCore - not found")
- BUILD_WARNING ("DART not found, for dart physics engine option, please install libdart-core4-dev.")
- set (HAVE_DART FALSE)
+ message (STATUS "Looking for kido - not found")
+ BUILD_WARNING ("kido not found, for kido physics engine option, please install libkido-dev.")
+ set (HAVE_KIDO FALSE)
endif()
#################################################
diff --git a/deps/opende/CMakeLists.txt b/deps/opende/CMakeLists.txt
index 6cf149f..21b0460 100644
--- a/deps/opende/CMakeLists.txt
+++ b/deps/opende/CMakeLists.txt
@@ -19,9 +19,9 @@ link_directories(
${Boost_LIBRARY_DIR}
)
-if (HAVE_DART)
- include_directories(${DARTCore_INCLUDE_DIRS})
- link_directories(${DARTCore_LIBRARY_DIRS})
+if (HAVE_KIDO)
+ include_directories(${KIDO_INCLUDE_DIRS})
+ link_directories(${KIDO_LIBRARY_DIRS})
endif()
if (HAVE_BULLET)
diff --git a/deps/opende/include/ode/objects.h b/deps/opende/include/ode/objects.h
index bcdc4c5..737fa52 100644
--- a/deps/opende/include/ode/objects.h
+++ b/deps/opende/include/ode/objects.h
@@ -43,7 +43,7 @@ enum Friction_Model {
/// Enum of world stepper LCP solver choices
enum World_Solver_Type{
ODE_DEFAULT,
- DART_PGS,
+ KIDO_PGS,
BULLET_PGS,
BULLET_LEMKE
};
@@ -680,7 +680,7 @@ ODE_API void dWorldSetQuickStepExtraFrictionIterations (dWorldID, int iters);
ODE_API void dWorldSetQuickStepFrictionModel(dWorldID, Friction_Model fricmodel);
/**
- * @brief Set the LCP Solver from: ODE_DEFAULT, DART_PGS, BULLET_PGS
+ * @brief Set the LCP Solver from: ODE_DEFAULT, KIDO_PGS, BULLET_PGS
* @ingroup world
* @param enum for LCP Solver
*/
diff --git a/deps/opende/src/quickstep_util.h b/deps/opende/src/quickstep_util.h
index 1c7513b..df78f0b 100644
--- a/deps/opende/src/quickstep_util.h
+++ b/deps/opende/src/quickstep_util.h
@@ -218,7 +218,7 @@ inline void scaled_add (int n, dRealMutablePtr x, dRealPtr y, dRealPtr z, dReal
// dot product of two vector a and b with length 6
// define ODE_SSE to enable SSE, which is used to speed up
// vector math operations with gcc compiler
-// macro SSE is renamed to ODE_SSE due to conflict with Eigen3 in DART
+// macro SSE is renamed to ODE_SSE due to conflict with Eigen3 in KIDO
inline dReal dot6(dRealPtr a, dRealPtr b)
{
#ifdef ODE_SSE
diff --git a/deps/opende/src/step.cpp b/deps/opende/src/step.cpp
index e44773b..c888973 100644
--- a/deps/opende/src/step.cpp
+++ b/deps/opende/src/step.cpp
@@ -34,7 +34,7 @@
#include "joints/hinge.h"
#include "gazebo/gazebo_config.h"
-#ifdef HAVE_DART
+#ifdef HAVE_KIDO
#include "step_dart_pgs_wrapper.h"
#endif
@@ -742,13 +742,13 @@ void dInternalStepIsland_x2 (dxWorldProcessContext *context,
// this will destroy A but that's OK
dSolveLCP (context, m, A, lambda, rhs, NULL, nub, lo, hi, findex);
}
- else if (solver_type == DART_PGS)
+ else if (solver_type == KIDO_PGS)
{
-#ifdef HAVE_DART
+#ifdef HAVE_KIDO
const int mskip = dPAD(m);
dSolveLCP_dart_pgs(m, mskip, A, lambda, rhs, nub, lo, hi, findex);
#else
- dMessage(d_ERR_LCP, "HAVE_DART is NOT defined");
+ dMessage(d_ERR_LCP, "HAVE_KIDO is NOT defined");
#endif
}
else if (solver_type == BULLET_LEMKE)
@@ -766,7 +766,7 @@ void dInternalStepIsland_x2 (dxWorldProcessContext *context,
#ifdef HAVE_BULLET
dSolveLCP_bullet_pgs(m, A, lambda, rhs, lo, hi, findex);
#else
- dMessage(d_ERR_LCP, "HAVE_DART is NOT defined");
+ dMessage(d_ERR_LCP, "HAVE_KIDO is NOT defined");
#endif
}
else
diff --git a/deps/opende/src/step_dart_pgs_wrapper.cpp b/deps/opende/src/step_dart_pgs_wrapper.cpp
index 9d28a73..065bedc 100644
--- a/deps/opende/src/step_dart_pgs_wrapper.cpp
+++ b/deps/opende/src/step_dart_pgs_wrapper.cpp
@@ -28,7 +28,7 @@
#include "gazebo/gazebo_config.h"
-#ifdef HAVE_DART
+#ifdef HAVE_KIDO
#include "dart/constraint/PGSLCPSolver.h"
#include "step_dart_pgs_wrapper.h"
diff --git a/deps/opende/src/step_dart_pgs_wrapper.h b/deps/opende/src/step_dart_pgs_wrapper.h
index ea65cf8..d159243 100644
--- a/deps/opende/src/step_dart_pgs_wrapper.h
+++ b/deps/opende/src/step_dart_pgs_wrapper.h
@@ -14,8 +14,8 @@
* limitations under the License.
*
*/
-#ifndef _ODE_STEP_DART_PGS_WRAPPER_H_
-#define _ODE_STEP_DART_PGS_WRAPPER_H_
+#ifndef _ODE_STEP_KIDO_PGS_WRAPPER_H_
+#define _ODE_STEP_KIDO_PGS_WRAPPER_H_
#include <ode/common.h>
void dSolveLCP_dart_pgs(int m, int mskip, dReal *A, dReal *x, dReal *b,
diff --git a/deps/parallel_quickstep/CMakeModules/FindCUDA.cmake b/deps/parallel_quickstep/CMakeModules/FindCUDA.cmake
index 6539057..2907ce5 100644
--- a/deps/parallel_quickstep/CMakeModules/FindCUDA.cmake
+++ b/deps/parallel_quickstep/CMakeModules/FindCUDA.cmake
@@ -417,7 +417,7 @@ if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
unset(CUDA_NVCC_EXECUTABLE CACHE)
unset(CUDA_VERSION CACHE)
unset(CUDA_TOOLKIT_INCLUDE CACHE)
- unset(CUDA_CUDART_LIBRARY CACHE)
+ unset(CUDA_CUKIDO_LIBRARY CACHE)
unset(CUDA_CUDA_LIBRARY CACHE)
unset(CUDA_cublas_LIBRARY CACHE)
unset(CUDA_cublasemu_LIBRARY CACHE)
@@ -544,12 +544,12 @@ macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
endmacro()
# CUDA_LIBRARIES
-find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library")
-set(CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY})
+find_library_local_first(CUDA_CUKIDO_LIBRARY cudart "\"cudart\" library")
+set(CUDA_LIBRARIES ${CUDA_CUKIDO_LIBRARY})
if(APPLE)
# We need to add the path to cudart to the linker using rpath, since the
# library name for the cuda libraries is prepended with @rpath.
- get_filename_component(_cuda_path_to_cudart "${CUDA_CUDART_LIBRARY}" PATH)
+ get_filename_component(_cuda_path_to_cudart "${CUDA_CUKIDO_LIBRARY}" PATH)
if(_cuda_path_to_cudart)
list(APPEND CUDA_LIBRARIES -Wl,-rpath "-Wl,${_cuda_path_to_cudart}")
endif()
@@ -566,7 +566,7 @@ endif(CUDA_CUDA_LIBRARY)
mark_as_advanced(
CUDA_CUDA_LIBRARY
- CUDA_CUDART_LIBRARY
+ CUDA_CUKIDO_LIBRARY
)
#######################
@@ -666,7 +666,7 @@ find_package_handle_standard_args(CUDA DEFAULT_MSG
CUDA_TOOLKIT_ROOT_DIR
CUDA_NVCC_EXECUTABLE
CUDA_INCLUDE_DIRS
- CUDA_CUDART_LIBRARY
+ CUDA_CUKIDO_LIBRARY
_cuda_version_acceptable
)
diff --git a/deps/parallel_quickstep/include/parallel_quickstep/cuda_common.h b/deps/parallel_quickstep/include/parallel_quickstep/cuda_common.h
index 70340e5..c12009e 100644
--- a/deps/parallel_quickstep/include/parallel_quickstep/cuda_common.h
+++ b/deps/parallel_quickstep/include/parallel_quickstep/cuda_common.h
@@ -5,8 +5,8 @@
#define dxDeviceContext cudaStream_t
#define dxDeviceQueue cudaStream_t
-#define dxParallelInfF CUDART_INF_F
-#define dxParallelInfD CUDART_INF
+#define dxParallelInfF CUKIDO_INF_F
+#define dxParallelInfD CUKIDO_INF
#define dxOverload
#define dxDevice __device__
#define dxHost __host__
diff --git a/gazebo/Server.cc b/gazebo/Server.cc
index 4854f23..3cc5aba 100644
--- a/gazebo/Server.cc
+++ b/gazebo/Server.cc
@@ -148,7 +148,7 @@ bool Server::ParseArgs(int _argc, char **_argv)
("help,h", "Produce this help message.")
("pause,u", "Start the server in a paused state.")
("physics,e", po::value<std::string>(),
- "Specify a physics engine (ode|bullet|dart|simbody).")
+ "Specify a physics engine (ode|bullet|kido|simbody).")
("play,p", po::value<std::string>(), "Play a log file.")
("record,r", "Record state data.")
("record_encoding", po::value<std::string>()->default_value("zlib"),
diff --git a/gazebo/Server.hh b/gazebo/Server.hh
index fab75d0..dcc2788 100644
--- a/gazebo/Server.hh
+++ b/gazebo/Server.hh
@@ -61,7 +61,7 @@ namespace gazebo
/// \brief Load a world file and optionally override physics engine type.
/// \param[in] _filename Name of the world file to load.
- /// \param[in] _physics Physics engine type (ode|bullet|dart|simbody).
+ /// \param[in] _physics Physics engine type (ode|bullet|kido|simbody).
/// \return True on success.
public: bool LoadFile(const std::string &_filename="worlds/empty.world",
const std::string &_physics="");
@@ -90,7 +90,7 @@ namespace gazebo
/// \brief Load implementation.
/// \param[in] _elem Description of the world to load.
- /// \param[in] _physics Physics engine type (ode|bullet|dart|simbody).
+ /// \param[in] _physics Physics engine type (ode|bullet|kido|simbody).
private: bool LoadImpl(sdf::ElementPtr _elem,
const std::string &_physics="");
diff --git a/gazebo/gazebo.1.ronn b/gazebo/gazebo.1.ronn
index 3e6d93a..fb0ec6f 100644
--- a/gazebo/gazebo.1.ronn
+++ b/gazebo/gazebo.1.ronn
@@ -20,7 +20,7 @@ Gazebo server runs simulation and handles commandline options, starts a Master,
* -u, --pause :
Start the server in a paused state.
* -e, --physics arg :
- Specify a physics engine (ode|bullet|dart|simbody).
+ Specify a physics engine (ode|bullet|kido|simbody).
* -p, --play arg :
Play a log file.
* -r, --record :
diff --git a/gazebo/gazebo_main.cc b/gazebo/gazebo_main.cc
index 95146a3..47016e1 100644
--- a/gazebo/gazebo_main.cc
+++ b/gazebo/gazebo_main.cc
@@ -46,7 +46,7 @@ void help()
<< " -h [ --help ] Produce this help message.\n"
<< " -u [ --pause ] Start the server in a paused state.\n"
<< " -e [ --physics ] arg Specify a physics engine "
- << "(ode|bullet|dart|simbody).\n"
+ << "(ode|bullet|kido|simbody).\n"
<< " -p [ --play ] arg Play a log file.\n"
<< " -r [ --record ] Record state data.\n"
<< " --record_encoding arg (=zlib) Compression encoding format for log "
diff --git a/gazebo/gzserver.1.ronn b/gazebo/gzserver.1.ronn
index 77afe63..8e433e9 100644
--- a/gazebo/gzserver.1.ronn
+++ b/gazebo/gzserver.1.ronn
@@ -20,7 +20,7 @@ Gazebo server runs simulation and handles commandline options, starts a Master,
* -u, --pause :
Start the server in a paused state.
* -e, --physics arg :
- Specify a physics engine (ode|bullet|dart|simbody).
+ Specify a physics engine (ode|bullet|kido|simbody).
* -p, --play arg :
Play a log file.
* -r, --record :
diff --git a/gazebo/msgs/physics.proto b/gazebo/msgs/physics.proto
index 6dff0df..f4f03db 100644
--- a/gazebo/msgs/physics.proto
+++ b/gazebo/msgs/physics.proto
@@ -14,7 +14,7 @@ message Physics
ODE = 1;
BULLET = 2;
SIMBODY = 3;
- DART = 4;
+ KIDO = 4;
}
optional Type type = 1[default=ODE];
diff --git a/gazebo/physics/CMakeLists.txt b/gazebo/physics/CMakeLists.txt
index 0150efc..cd975b6 100644
--- a/gazebo/physics/CMakeLists.txt
+++ b/gazebo/physics/CMakeLists.txt
@@ -17,12 +17,12 @@ if (HAVE_BULLET)
add_subdirectory(bullet)
endif()
-# Add DART support if present
-if (HAVE_DART)
- add_subdirectory(dart)
+# Add KIDO support if present
+if (HAVE_KIDO)
+ add_subdirectory(kido)
- include_directories(${DARTCore_INCLUDE_DIRS})
- link_directories(${DARTCore_LIBRARY_DIRS})
+ include_directories(${KIDO_INCLUDE_DIRS})
+ link_directories(${KIDO_LIBRARY_DIRS})
endif()
# Add Simbody support if present
@@ -160,9 +160,9 @@ if (HAVE_BULLET)
target_link_libraries(gazebo_physics ${BULLET_LIBRARIES})
endif()
-# Link in DART support if present
-if (HAVE_DART)
- target_link_libraries(gazebo_physics ${DARTCore_LIBRARIES})
+# Link in KIDO support if present
+if (HAVE_KIDO)
+ target_link_libraries(gazebo_physics ${KIDO_LIBRARIES})
endif()
# Link in Simbody support if present
diff --git a/gazebo/physics/Joint.hh b/gazebo/physics/Joint.hh
index 7cf0ecf..9f16afb 100644
--- a/gazebo/physics/Joint.hh
+++ b/gazebo/physics/Joint.hh
@@ -291,7 +291,7 @@ namespace gazebo
/// \brief Set the velocity of an axis(index).
/// In ODE and Bullet, the SetVelocityMaximal function is used to
/// set the velocity of the child link relative to the parent.
- /// In Simbody and DART, this function updates the velocity state,
+ /// In Simbody and KIDO, this function updates the velocity state,
/// which has a recursive effect on the rest of the chain.
/// \param[in] _index Index of the axis.
/// \param[in] _vel Velocity.
diff --git a/gazebo/physics/PhysicsEngine.hh b/gazebo/physics/PhysicsEngine.hh
index 97aa7eb..09df91e 100644
--- a/gazebo/physics/PhysicsEngine.hh
+++ b/gazebo/physics/PhysicsEngine.hh
@@ -65,7 +65,7 @@ namespace gazebo
/// \brief Update the physics engine collision.
public: virtual void UpdateCollision() = 0;
- /// \brief Return the physics engine type (ode|bullet|dart|simbody).
+ /// \brief Return the physics engine type (ode|bullet|kido|simbody).
/// \return Type of the physics engine.
public: virtual std::string GetType() const = 0;
@@ -173,7 +173,7 @@ namespace gazebo
/// Below is a list of _key parameter definitions:
/// -# "solver_type" (string) - returns solver used by engine, e.g.
/// "sequential_impulse' for Bullet, "quick" for ODE
- /// "Featherstone and Lemkes" for DART and
+ /// "Featherstone and Lemkes" for KIDO and
/// "Spatial Algebra and Elastic Foundation" for Simbody.
/// -# "cfm" (double) - global CFM (ODE/Bullet)
/// -# "erp" (double) - global ERP (ODE/Bullet)
diff --git a/gazebo/physics/PhysicsEngine_TEST.cc b/gazebo/physics/PhysicsEngine_TEST.cc
index 0548584..ef3bc85 100644
--- a/gazebo/physics/PhysicsEngine_TEST.cc
+++ b/gazebo/physics/PhysicsEngine_TEST.cc
@@ -67,8 +67,8 @@ void PhysicsEngineTest::PhysicsEngineParam(const std::string &_physicsEngine)
type = msgs::Physics::ODE;
else if (_physicsEngine == "bullet")
type = msgs::Physics::BULLET;
- else if (_physicsEngine == "dart")
- type = msgs::Physics::DART;
+ else if (_physicsEngine == "kido")
+ type = msgs::Physics::KIDO;
else if (_physicsEngine == "simbody")
type = msgs::Physics::SIMBODY;
else
@@ -204,9 +204,9 @@ void PhysicsEngineTest::PhysicsEngineGetParamBool
EXPECT_TRUE(physics->GetParam("iters", value));
EXPECT_EQ(boost::any_cast<int>(value), 50);
}
- else if (_physicsEngine == "dart")
+ else if (_physicsEngine == "kido")
{
- gzwarn << "DARTPhysics::GetParam not yet implemented." << std::endl;
+ gzwarn << "KIDOPhysics::GetParam not yet implemented." << std::endl;
return;
}
else if (_physicsEngine == "simbody")
diff --git a/gazebo/physics/PhysicsFactory.cc b/gazebo/physics/PhysicsFactory.cc
index e121644..df232fe 100644
--- a/gazebo/physics/PhysicsFactory.cc
+++ b/gazebo/physics/PhysicsFactory.cc
@@ -40,9 +40,9 @@ void RegisterODEPhysics();
void RegisterBulletPhysics();
#endif
-#ifdef HAVE_DART
+#ifdef HAVE_KIDO
GZ_PHYSICS_VISIBLE
- void RegisterDARTPhysics();
+ void RegisterKIDOPhysics();
#endif
using namespace gazebo;
@@ -64,8 +64,8 @@ void PhysicsFactory::RegisterAll()
RegisterBulletPhysics();
#endif
-#ifdef HAVE_DART
- RegisterDARTPhysics();
+#ifdef HAVE_KIDO
+ RegisterKIDOPhysics();
#endif
}
diff --git a/gazebo/physics/World.hh b/gazebo/physics/World.hh
index 0cb32fb..24957f4 100644
--- a/gazebo/physics/World.hh
+++ b/gazebo/physics/World.hh
@@ -574,8 +574,8 @@ namespace gazebo
/// \brief Private data pointer.
private: WorldPrivate *dataPtr;
- /// Friend DARTLink so that it has access to dataPtr->dirtyPoses
- private: friend class DARTLink;
+ /// Friend KIDOLink so that it has access to dataPtr->dirtyPoses
+ private: friend class KIDOLink;
/// Friend SimbodyPhysics so that it has access to dataPtr->dirtyPoses
private: friend class SimbodyPhysics;
diff --git a/gazebo/physics/dart/CMakeLists.txt b/gazebo/physics/dart/CMakeLists.txt
deleted file mode 100644
index 714b264..0000000
--- a/gazebo/physics/dart/CMakeLists.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-include (${gazebo_cmake_dir}/GazeboUtils.cmake)
-
-set (sources ${sources}
- dart/DARTBallJoint.cc
- dart/DARTBoxShape.cc
- dart/DARTCollision.cc
- dart/DARTCylinderShape.cc
- dart/DARTFixedJoint.cc
- dart/DARTHeightmapShape.cc
- dart/DARTHingeJoint.cc
- dart/DARTHinge2Joint.cc
- dart/DARTJoint.cc
- dart/DARTLink.cc
- dart/DARTMesh.cc
- dart/DARTMeshShape.cc
- dart/DARTModel.cc
- dart/DARTMultiRayShape.cc
- dart/DARTPhysics.cc
- dart/DARTPlaneShape.cc
- dart/DARTPolylineShape.cc
- dart/DARTRayShape.cc
- dart/DARTScrewJoint.cc
- dart/DARTSliderJoint.cc
- dart/DARTSphereShape.cc
- dart/DARTSurfaceParams.cc
- dart/DARTUniversalJoint.cc
- PARENT_SCOPE
-)
-
-SET (headers
- DARTBallJoint.hh
- DARTBoxShape.hh
- DARTCollision.hh
- DARTCylinderShape.hh
- DARTFixedJoint.hh
- DARTHeightmapShape.hh
- DARTHingeJoint.hh
- DARTHinge2Joint.hh
- DARTJoint.hh
- DARTLink.hh
- DARTMesh.hh
- DARTMeshShape.hh
- DARTModel.hh
- DARTMultiRayShape.hh
- DARTPhysics.hh
- DARTPlaneShape.hh
- DARTPolylineShape.hh
- DARTRayShape.hh
- DARTScrewJoint.hh
- DARTSliderJoint.hh
- DARTSphereShape.hh
- DARTSurfaceParams.hh
- DARTTypes.hh
- DARTUniversalJoint.hh
- dart_inc.h
-)
-
-gz_install_includes("physics/dart" ${headers})
diff --git a/gazebo/physics/dart/DARTSphereShapePrivate.hh b/gazebo/physics/dart/DARTSphereShapePrivate.hh
deleted file mode 100644
index 738eee9..0000000
--- a/gazebo/physics/dart/DARTSphereShapePrivate.hh
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2015-2016 Open Source Robotics Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
-*/
-
-#ifndef _GAZEBO_DARTSPHERESHAPE_PRIVATE_HH_
-#define _GAZEBO_DARTSPHERESHAPE_PRIVATE_HH_
-
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
-
-namespace gazebo
-{
- namespace physics
- {
- /// \internal
- /// \brief Private data class for DARTSphereShape
- class DARTSphereShapePrivate
- {
- /// \brief Constructor
- public: DARTSphereShapePrivate() = default;
-
- /// \brief Default destructor
- public: ~DARTSphereShapePrivate() = default;
- };
- }
-}
-#endif
diff --git a/gazebo/physics/kido/CMakeLists.txt b/gazebo/physics/kido/CMakeLists.txt
new file mode 100644
index 0000000..4399c57
--- /dev/null
+++ b/gazebo/physics/kido/CMakeLists.txt
@@ -0,0 +1,58 @@
+include (${gazebo_cmake_dir}/GazeboUtils.cmake)
+
+set (sources ${sources}
+ kido/KIDOBallJoint.cc
+ kido/KIDOBoxShape.cc
+ kido/KIDOCollision.cc
+ kido/KIDOCylinderShape.cc
+ kido/KIDOFixedJoint.cc
+ kido/KIDOHeightmapShape.cc
+ kido/KIDOHingeJoint.cc
+ kido/KIDOHinge2Joint.cc
+ kido/KIDOJoint.cc
+ kido/KIDOLink.cc
+ kido/KIDOMesh.cc
+ kido/KIDOMeshShape.cc
+ kido/KIDOModel.cc
+ kido/KIDOMultiRayShape.cc
+ kido/KIDOPhysics.cc
+ kido/KIDOPlaneShape.cc
+ kido/KIDOPolylineShape.cc
+ kido/KIDORayShape.cc
+ kido/KIDOScrewJoint.cc
+ kido/KIDOSliderJoint.cc
+ kido/KIDOSphereShape.cc
+ kido/KIDOSurfaceParams.cc
+ kido/KIDOUniversalJoint.cc
+ PARENT_SCOPE
+)
+
+SET (headers
+ KIDOBallJoint.hh
+ KIDOBoxShape.hh
+ KIDOCollision.hh
+ KIDOCylinderShape.hh
+ KIDOFixedJoint.hh
+ KIDOHeightmapShape.hh
+ KIDOHingeJoint.hh
+ KIDOHinge2Joint.hh
+ KIDOJoint.hh
+ KIDOLink.hh
+ KIDOMesh.hh
+ KIDOMeshShape.hh
+ KIDOModel.hh
+ KIDOMultiRayShape.hh
+ KIDOPhysics.hh
+ KIDOPlaneShape.hh
+ KIDOPolylineShape.hh
+ KIDORayShape.hh
+ KIDOScrewJoint.hh
+ KIDOSliderJoint.hh
+ KIDOSphereShape.hh
+ KIDOSurfaceParams.hh
+ KIDOTypes.hh
+ KIDOUniversalJoint.hh
+ kido_inc.h
+)
+
+gz_install_includes("physics/kido" ${headers})
diff --git a/gazebo/physics/dart/DARTBallJoint.cc b/gazebo/physics/kido/KIDOBallJoint.cc
similarity index 58%
rename from gazebo/physics/dart/DARTBallJoint.cc
rename to gazebo/physics/kido/KIDOBallJoint.cc
index 1094696..7ce240c 100644
--- a/gazebo/physics/dart/DARTBallJoint.cc
+++ b/gazebo/physics/kido/KIDOBallJoint.cc
@@ -18,111 +18,111 @@
#include "gazebo/gazebo_config.h"
#include "gazebo/common/Console.hh"
#include "gazebo/physics/Link.hh"
-#include "gazebo/physics/dart/DARTJointPrivate.hh"
-#include "gazebo/physics/dart/DARTBallJoint.hh"
+#include "gazebo/physics/kido/KIDOJointPrivate.hh"
+#include "gazebo/physics/kido/KIDOBallJoint.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTBallJoint::DARTBallJoint(BasePtr _parent)
- : BallJoint<DARTJoint>(_parent)
+KIDOBallJoint::KIDOBallJoint(BasePtr _parent)
+ : BallJoint<KIDOJoint>(_parent)
{
- this->dataPtr->dtJoint = new dart::dynamics::BallJoint();
+ this->dataPtr->dtJoint = new kido::dynamics::BallJoint();
}
//////////////////////////////////////////////////
-DARTBallJoint::~DARTBallJoint()
+KIDOBallJoint::~KIDOBallJoint()
{
// We don't need to delete dtJoint because the world will delete it
}
//////////////////////////////////////////////////
-void DARTBallJoint::Load(sdf::ElementPtr _sdf)
+void KIDOBallJoint::Load(sdf::ElementPtr _sdf)
{
- BallJoint<DARTJoint>::Load(_sdf);
+ BallJoint<KIDOJoint>::Load(_sdf);
}
//////////////////////////////////////////////////
-void DARTBallJoint::Init()
+void KIDOBallJoint::Init()
{
- BallJoint<DARTJoint>::Init();
+ BallJoint<KIDOJoint>::Init();
}
//////////////////////////////////////////////////
-math::Vector3 DARTBallJoint::GetAnchor(unsigned int /*_index*/) const
+math::Vector3 KIDOBallJoint::GetAnchor(unsigned int /*_index*/) const
{
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
this->dataPtr->dtJoint->getTransformFromChildBodyNode();
Eigen::Vector3d worldOrigin = T.translation();
- return DARTTypes::ConvVec3(worldOrigin);
+ return KIDOTypes::ConvVec3(worldOrigin);
}
//////////////////////////////////////////////////
-math::Vector3 DARTBallJoint::GetGlobalAxis(unsigned int /*_index*/) const
+math::Vector3 KIDOBallJoint::GetGlobalAxis(unsigned int /*_index*/) const
{
return math::Vector3();
}
//////////////////////////////////////////////////
-void DARTBallJoint::SetVelocity(unsigned int /*_index*/, double /*_angle*/)
+void KIDOBallJoint::SetVelocity(unsigned int /*_index*/, double /*_angle*/)
{
}
//////////////////////////////////////////////////
-double DARTBallJoint::GetVelocity(unsigned int /*_index*/) const
+double KIDOBallJoint::GetVelocity(unsigned int /*_index*/) const
{
- gzerr << "DARTBallJoint::GetVelocity not implemented" << std::endl;
+ gzerr << "KIDOBallJoint::GetVelocity not implemented" << std::endl;
return 0;
}
//////////////////////////////////////////////////
-math::Angle DARTBallJoint::GetAngleImpl(unsigned int /*_index*/) const
+math::Angle KIDOBallJoint::GetAngleImpl(unsigned int /*_index*/) const
{
- gzerr << "DARTBallJoint::GetAngleImpl not implemented" << std::endl;
+ gzerr << "KIDOBallJoint::GetAngleImpl not implemented" << std::endl;
return math::Angle(0);
}
//////////////////////////////////////////////////
-void DARTBallJoint::SetForceImpl(unsigned int /*_index*/, double /*_torque*/)
+void KIDOBallJoint::SetForceImpl(unsigned int /*_index*/, double /*_torque*/)
{
- gzerr << "DARTBallJoint::SetForceImpl not implemented";
+ gzerr << "KIDOBallJoint::SetForceImpl not implemented";
}
//////////////////////////////////////////////////
-void DARTBallJoint::SetAxis(unsigned int /*_index*/,
+void KIDOBallJoint::SetAxis(unsigned int /*_index*/,
const math::Vector3 &/*_axis*/)
{
- gzerr << "DARTBallJoint::SetAxis not implemented" << std::endl;
+ gzerr << "KIDOBallJoint::SetAxis not implemented" << std::endl;
}
//////////////////////////////////////////////////
-math::Angle DARTBallJoint::GetHighStop(unsigned int /*_index*/)
+math::Angle KIDOBallJoint::GetHighStop(unsigned int /*_index*/)
{
- gzerr << "DARTBallJoint::GetHighStop not implemented" << std::endl;
+ gzerr << "KIDOBallJoint::GetHighStop not implemented" << std::endl;
return math::Angle();
}
//////////////////////////////////////////////////
-math::Angle DARTBallJoint::GetLowStop(unsigned int /*_index*/)
+math::Angle KIDOBallJoint::GetLowStop(unsigned int /*_index*/)
{
- gzerr << "DARTBallJoint::GetLowStop not implemented" << std::endl;
+ gzerr << "KIDOBallJoint::GetLowStop not implemented" << std::endl;
return math::Angle();
}
//////////////////////////////////////////////////
-bool DARTBallJoint::SetHighStop(unsigned int /*_index*/,
+bool KIDOBallJoint::SetHighStop(unsigned int /*_index*/,
const math::Angle &/*_angle*/)
{
- gzerr << "DARTBallJoint::SetHighStop not implemented" << std::endl;
+ gzerr << "KIDOBallJoint::SetHighStop not implemented" << std::endl;
return false;
}
//////////////////////////////////////////////////
-bool DARTBallJoint::SetLowStop(unsigned int /*_index*/,
+bool KIDOBallJoint::SetLowStop(unsigned int /*_index*/,
const math::Angle &/*_angle*/)
{
- gzerr << "DARTBallJoint::SetLowStop not implemented" << std::endl;
+ gzerr << "KIDOBallJoint::SetLowStop not implemented" << std::endl;
return false;
}
diff --git a/gazebo/physics/dart/DARTBallJoint.hh b/gazebo/physics/kido/KIDOBallJoint.hh
similarity index 87%
rename from gazebo/physics/dart/DARTBallJoint.hh
rename to gazebo/physics/kido/KIDOBallJoint.hh
index 089691a..e15d920 100644
--- a/gazebo/physics/dart/DARTBallJoint.hh
+++ b/gazebo/physics/kido/KIDOBallJoint.hh
@@ -15,29 +15,29 @@
*
*/
-#ifndef _GAZEBO_DARTBALLJOINT_HH_
-#define _GAZEBO_DARTBALLJOINT_HH_
+#ifndef _GAZEBO_KIDOBALLJOINT_HH_
+#define _GAZEBO_KIDOBALLJOINT_HH_
#include "gazebo/physics/BallJoint.hh"
-#include "gazebo/physics/dart/DARTJoint.hh"
+#include "gazebo/physics/kido/KIDOJoint.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \brief An DARTBallJoint
- class GZ_PHYSICS_VISIBLE DARTBallJoint : public BallJoint<DARTJoint>
+ /// \brief An KIDOBallJoint
+ class GZ_PHYSICS_VISIBLE KIDOBallJoint : public BallJoint<KIDOJoint>
{
/// \brief Constructor
/// \param[in] _parent Parent of the Joint
- public: DARTBallJoint(BasePtr _parent);
+ public: KIDOBallJoint(BasePtr _parent);
/// \brief Destructor.
- public: virtual ~DARTBallJoint();
+ public: virtual ~KIDOBallJoint();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
diff --git a/gazebo/physics/dart/DARTBoxShape.cc b/gazebo/physics/kido/KIDOBoxShape.cc
similarity index 64%
rename from gazebo/physics/dart/DARTBoxShape.cc
rename to gazebo/physics/kido/KIDOBoxShape.cc
index ef1e425..aa6c403 100644
--- a/gazebo/physics/dart/DARTBoxShape.cc
+++ b/gazebo/physics/kido/KIDOBoxShape.cc
@@ -16,31 +16,31 @@
*/
#include "gazebo/common/Console.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTBoxShape.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOBoxShape.hh"
#include "gazebo/util/system.hh"
-#include "gazebo/physics/dart/DARTBoxShapePrivate.hh"
+#include "gazebo/physics/kido/KIDOBoxShapePrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTBoxShape::DARTBoxShape(DARTCollisionPtr _parent)
+KIDOBoxShape::KIDOBoxShape(KIDOCollisionPtr _parent)
: BoxShape(_parent),
- dataPtr(new DARTBoxShapePrivate())
+ dataPtr(new KIDOBoxShapePrivate())
{
}
//////////////////////////////////////////////////
-DARTBoxShape::~DARTBoxShape()
+KIDOBoxShape::~KIDOBoxShape()
{
delete this->dataPtr;
}
//////////////////////////////////////////////////
-void DARTBoxShape::SetSize(const math::Vector3 &_size)
+void KIDOBoxShape::SetSize(const math::Vector3 &_size)
{
if (_size.x < 0 || _size.y < 0 || _size.z < 0)
{
@@ -53,44 +53,44 @@ void DARTBoxShape::SetSize(const math::Vector3 &_size)
// Warn user, but still create shape with very small value
// otherwise later resize operations using setLocalScaling
// will not be possible
- gzwarn << "Setting box shape's x to zero is not supported in DART, "
+ gzwarn << "Setting box shape's x to zero is not supported in KIDO, "
<< "using 1e-4.\n";
size.x = 1e-4;
}
if (math::equal(size.y, 0.0))
{
- gzwarn << "Setting box shape's y to zero is not supported in DART, "
+ gzwarn << "Setting box shape's y to zero is not supported in KIDO, "
<< "using 1e-4.\n";
size.y = 1e-4;
}
if (math::equal(size.z, 0.0))
{
- gzwarn << "Setting box shape's z to zero is not supported in DART "
+ gzwarn << "Setting box shape's z to zero is not supported in KIDO "
<< "using 1e-4.\n";
size.z = 1e-4;
}
BoxShape::SetSize(size);
- DARTCollisionPtr dartCollisionParent =
- boost::dynamic_pointer_cast<DARTCollision>(this->collisionParent);
+ KIDOCollisionPtr kidoCollisionParent =
+ boost::dynamic_pointer_cast<KIDOCollision>(this->collisionParent);
- if (dartCollisionParent->GetDARTCollisionShape() == NULL)
+ if (kidoCollisionParent->GetKIDOCollisionShape() == NULL)
{
- dart::dynamics::BodyNode *dtBodyNode =
- dartCollisionParent->GetDARTBodyNode();
- dart::dynamics::BoxShape *dtBoxShape =
- new dart::dynamics::BoxShape(DARTTypes::ConvVec3(size));
+ kido::dynamics::BodyNode *dtBodyNode =
+ kidoCollisionParent->GetKIDOBodyNode();
+ kido::dynamics::BoxShape *dtBoxShape =
+ new kido::dynamics::BoxShape(KIDOTypes::ConvVec3(size));
dtBodyNode->addCollisionShape(dtBoxShape);
- dartCollisionParent->SetDARTCollisionShape(dtBoxShape);
+ kidoCollisionParent->SetKIDOCollisionShape(dtBoxShape);
}
else
{
- dart::dynamics::BoxShape *dtBoxShape =
- dynamic_cast<dart::dynamics::BoxShape*>(
- dartCollisionParent->GetDARTCollisionShape());
- dtBoxShape->setSize(DARTTypes::ConvVec3(size));
+ kido::dynamics::BoxShape *dtBoxShape =
+ dynamic_cast<kido::dynamics::BoxShape*>(
+ kidoCollisionParent->GetKIDOCollisionShape());
+ dtBoxShape->setSize(KIDOTypes::ConvVec3(size));
}
}
diff --git a/gazebo/physics/dart/DARTBoxShape.hh b/gazebo/physics/kido/KIDOBoxShape.hh
similarity index 73%
rename from gazebo/physics/dart/DARTBoxShape.hh
rename to gazebo/physics/kido/KIDOBoxShape.hh
index e1fb792..e8eaf36 100644
--- a/gazebo/physics/dart/DARTBoxShape.hh
+++ b/gazebo/physics/kido/KIDOBoxShape.hh
@@ -14,12 +14,12 @@
* limitations under the License.
*
*/
-#ifndef _GAZEBO_DARTBOXSHAPE_HH_
-#define _GAZEBO_DARTBOXSHAPE_HH_
+#ifndef _GAZEBO_KIDOBOXSHAPE_HH_
+#define _GAZEBO_KIDOBOXSHAPE_HH_
#include "gazebo/math/Vector3.hh"
#include "gazebo/physics/BoxShape.hh"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/KIDOTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
@@ -27,27 +27,27 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTBoxShapePrivate;
+ class KIDOBoxShapePrivate;
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \brief DART Box shape
- class GZ_PHYSICS_VISIBLE DARTBoxShape : public BoxShape
+ /// \brief KIDO Box shape
+ class GZ_PHYSICS_VISIBLE KIDOBoxShape : public BoxShape
{
/// \brief Constructor.
/// \param[in] _parent Parent Collision.
- public: explicit DARTBoxShape(DARTCollisionPtr _parent);
+ public: explicit KIDOBoxShape(KIDOCollisionPtr _parent);
/// \brief Destructor.
- public: virtual ~DARTBoxShape();
+ public: virtual ~KIDOBoxShape();
// Documentation inherited.
public: virtual void SetSize(const math::Vector3 &_size);
/// \internal
/// \brief Pointer to private data
- private: DARTBoxShapePrivate *dataPtr;
+ private: KIDOBoxShapePrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTRayShapePrivate.hh b/gazebo/physics/kido/KIDOBoxShapePrivate.hh
similarity index 69%
rename from gazebo/physics/dart/DARTRayShapePrivate.hh
rename to gazebo/physics/kido/KIDOBoxShapePrivate.hh
index f499a6e..15be53c 100644
--- a/gazebo/physics/dart/DARTRayShapePrivate.hh
+++ b/gazebo/physics/kido/KIDOBoxShapePrivate.hh
@@ -15,25 +15,25 @@
*
*/
-#ifndef _GAZEBO_DARTRAYSHAPE_PRIVATE_HH_
-#define _GAZEBO_DARTRAYSHAPE_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOBOXSHAPE_PRIVATE_HH_
+#define _GAZEBO_KIDOBOXSHAPE_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTRayShape
- class DARTRayShapePrivate
+ /// \brief Private data class for KIDOBoxShape
+ class KIDOBoxShapePrivate
{
/// \brief Constructor
- public: DARTRayShapePrivate() = default;
+ public: KIDOBoxShapePrivate() = default;
/// \brief Default destructor
- public: ~DARTRayShapePrivate() = default;
+ public: ~KIDOBoxShapePrivate() = default;
};
}
}
diff --git a/gazebo/physics/dart/DARTCollision.cc b/gazebo/physics/kido/KIDOCollision.cc
similarity index 63%
rename from gazebo/physics/dart/DARTCollision.cc
rename to gazebo/physics/kido/KIDOCollision.cc
index a3c55cc..bdbe86a 100644
--- a/gazebo/physics/dart/DARTCollision.cc
+++ b/gazebo/physics/kido/KIDOCollision.cc
@@ -22,36 +22,36 @@
#include "gazebo/physics/SurfaceParams.hh"
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTLink.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTPlaneShape.hh"
-#include "gazebo/physics/dart/DARTSurfaceParams.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOLink.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOPlaneShape.hh"
+#include "gazebo/physics/kido/KIDOSurfaceParams.hh"
-#include "gazebo/physics/dart/DARTCollisionPrivate.hh"
+#include "gazebo/physics/kido/KIDOCollisionPrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTCollision::DARTCollision(LinkPtr _link)
+KIDOCollision::KIDOCollision(LinkPtr _link)
: Collision(_link),
- dataPtr(new DARTCollisionPrivate(
- boost::static_pointer_cast<DARTLink>(this->link)->GetDARTBodyNode()))
+ dataPtr(new KIDOCollisionPrivate(
+ boost::static_pointer_cast<KIDOLink>(this->link)->GetKIDOBodyNode()))
{
- this->SetName("DART_Collision");
- this->surface.reset(new DARTSurfaceParams());
+ this->SetName("KIDO_Collision");
+ this->surface.reset(new KIDOSurfaceParams());
}
//////////////////////////////////////////////////
-DARTCollision::~DARTCollision()
+KIDOCollision::~KIDOCollision()
{
delete this->dataPtr;
}
//////////////////////////////////////////////////
-void DARTCollision::Load(sdf::ElementPtr _sdf)
+void KIDOCollision::Load(sdf::ElementPtr _sdf)
{
Collision::Load(_sdf);
@@ -63,90 +63,90 @@ void DARTCollision::Load(sdf::ElementPtr _sdf)
}
//////////////////////////////////////////////////
-void DARTCollision::Init()
+void KIDOCollision::Init()
{
Collision::Init();
// Offset
if (this->dataPtr->dtCollisionShape)
{
- boost::shared_ptr<DARTPlaneShape> planeShape =
- boost::dynamic_pointer_cast<DARTPlaneShape>(this->shape);
+ boost::shared_ptr<KIDOPlaneShape> planeShape =
+ boost::dynamic_pointer_cast<KIDOPlaneShape>(this->shape);
if (!planeShape)
{
math::Pose relativePose = this->GetRelativePose();
this->dataPtr->dtCollisionShape->setLocalTransform(
- DARTTypes::ConvPose(relativePose));
+ KIDOTypes::ConvPose(relativePose));
}
else
{
// change ground plane to be near semi-infinite.
- dart::dynamics::BoxShape *dtBoxShape =
- dynamic_cast<dart::dynamics::BoxShape *>(
+ kido::dynamics::BoxShape *dtBoxShape =
+ dynamic_cast<kido::dynamics::BoxShape *>(
this->dataPtr->dtCollisionShape);
dtBoxShape->setSize(Eigen::Vector3d(2100, 2100, 2100.0));
dtBoxShape->setOffset(Eigen::Vector3d(0.0, 0.0, -2100.0/2.0));
}
// TODO: Remove this specialized code for plane shape once
- // https://github.com/dartsim/dart/issues/114 is resolved.
+ // https://github.com/kidosim/kido/issues/114 is resolved.
}
}
//////////////////////////////////////////////////
-void DARTCollision::Fini()
+void KIDOCollision::Fini()
{
Collision::Fini();
}
//////////////////////////////////////////////////
-void DARTCollision::OnPoseChange()
+void KIDOCollision::OnPoseChange()
{
- // Nothing to do in dart.
+ // Nothing to do in kido.
}
//////////////////////////////////////////////////
-void DARTCollision::SetCategoryBits(unsigned int _bits)
+void KIDOCollision::SetCategoryBits(unsigned int _bits)
{
this->dataPtr->categoryBits = _bits;
}
//////////////////////////////////////////////////
-void DARTCollision::SetCollideBits(unsigned int _bits)
+void KIDOCollision::SetCollideBits(unsigned int _bits)
{
this->dataPtr->collideBits = _bits;
}
//////////////////////////////////////////////////
-unsigned int DARTCollision::GetCategoryBits() const
+unsigned int KIDOCollision::GetCategoryBits() const
{
return this->dataPtr->categoryBits;
}
//////////////////////////////////////////////////
-unsigned int DARTCollision::GetCollideBits() const
+unsigned int KIDOCollision::GetCollideBits() const
{
return this->dataPtr->collideBits;
}
//////////////////////////////////////////////////
-gazebo::math::Box DARTCollision::GetBoundingBox() const
+gazebo::math::Box KIDOCollision::GetBoundingBox() const
{
math::Box result;
- gzerr << "DART does not provide bounding box info.\n";
+ gzerr << "KIDO does not provide bounding box info.\n";
return result;
}
//////////////////////////////////////////////////
-dart::dynamics::BodyNode *DARTCollision::GetDARTBodyNode() const
+kido::dynamics::BodyNode *KIDOCollision::GetKIDOBodyNode() const
{
return this->dataPtr->dtBodyNode;
}
//////////////////////////////////////////////////
-void DARTCollision::SetDARTCollisionShape(dart::dynamics::Shape *_shape,
+void KIDOCollision::SetKIDOCollisionShape(kido::dynamics::Shape *_shape,
bool _placeable)
{
Collision::SetCollision(_placeable);
@@ -154,13 +154,13 @@ void DARTCollision::SetDARTCollisionShape(dart::dynamics::Shape *_shape,
}
//////////////////////////////////////////////////
-dart::dynamics::Shape *DARTCollision::GetDARTCollisionShape() const
+kido::dynamics::Shape *KIDOCollision::GetKIDOCollisionShape() const
{
return this->dataPtr->dtCollisionShape;
}
/////////////////////////////////////////////////
-DARTSurfaceParamsPtr DARTCollision::GetDARTSurface() const
+KIDOSurfaceParamsPtr KIDOCollision::GetKIDOSurface() const
{
- return boost::dynamic_pointer_cast<DARTSurfaceParams>(this->surface);
+ return boost::dynamic_pointer_cast<KIDOSurfaceParams>(this->surface);
}
diff --git a/gazebo/physics/dart/DARTCollision.hh b/gazebo/physics/kido/KIDOCollision.hh
similarity index 67%
rename from gazebo/physics/dart/DARTCollision.hh
rename to gazebo/physics/kido/KIDOCollision.hh
index cc4a637..6adb8a7 100644
--- a/gazebo/physics/dart/DARTCollision.hh
+++ b/gazebo/physics/kido/KIDOCollision.hh
@@ -15,14 +15,14 @@
*
*/
-#ifndef _GAZEBO_DARTCOLLISION_HH_
-#define _GAZEBO_DARTCOLLISION_HH_
+#ifndef _GAZEBO_KIDOCOLLISION_HH_
+#define _GAZEBO_KIDOCOLLISION_HH_
#include "gazebo/common/CommonTypes.hh"
#include "gazebo/physics/PhysicsTypes.hh"
#include "gazebo/physics/Collision.hh"
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
@@ -30,20 +30,20 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTCollisionPrivate;
+ class KIDOCollisionPrivate;
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \brief Base class for all DART collisions.
- class GZ_PHYSICS_VISIBLE DARTCollision : public Collision
+ /// \brief Base class for all KIDO collisions.
+ class GZ_PHYSICS_VISIBLE KIDOCollision : public Collision
{
/// \brief Constructor.
/// \param[in] _link Parent Link
- public: explicit DARTCollision(LinkPtr _parent);
+ public: explicit KIDOCollision(LinkPtr _parent);
/// \brief Destructor.
- public: virtual ~DARTCollision();
+ public: virtual ~KIDOCollision();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
@@ -74,27 +74,27 @@ namespace gazebo
// Documentation inherited.
public: virtual math::Box GetBoundingBox() const;
- /// \brief Get DART body node.
- /// \return Pointer to the dart BodyNode.
- public: dart::dynamics::BodyNode *GetDARTBodyNode() const;
+ /// \brief Get KIDO body node.
+ /// \return Pointer to the kido BodyNode.
+ public: kido::dynamics::BodyNode *GetKIDOBodyNode() const;
- /// \brief Set DART collision shape.
- /// \param[in] _shape DART Collision shape
+ /// \brief Set KIDO collision shape.
+ /// \param[in] _shape KIDO Collision shape
/// \param[in] _placeable True to make the object movable.
- public: void SetDARTCollisionShape(dart::dynamics::Shape *_shape,
+ public: void SetKIDOCollisionShape(kido::dynamics::Shape *_shape,
bool _placeable = true);
- /// \brief Get DART collision shape.
- public: dart::dynamics::Shape *GetDARTCollisionShape() const;
+ /// \brief Get KIDO collision shape.
+ public: kido::dynamics::Shape *GetKIDOCollisionShape() const;
/// \brief Similar to Collision::GetSurface, but provides dynamically
- /// casted pointer to DARTSurfaceParams.
- /// \return Dynamically casted pointer to DARTSurfaceParams.
- public: DARTSurfaceParamsPtr GetDARTSurface() const;
+ /// casted pointer to KIDOSurfaceParams.
+ /// \return Dynamically casted pointer to KIDOSurfaceParams.
+ public: KIDOSurfaceParamsPtr GetKIDOSurface() const;
/// \internal
/// \brief Pointer to private data
- private: DARTCollisionPrivate *dataPtr;
+ private: KIDOCollisionPrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTCollisionPrivate.hh b/gazebo/physics/kido/KIDOCollisionPrivate.hh
similarity index 66%
rename from gazebo/physics/dart/DARTCollisionPrivate.hh
rename to gazebo/physics/kido/KIDOCollisionPrivate.hh
index 9a3fee6..be5ade7 100644
--- a/gazebo/physics/dart/DARTCollisionPrivate.hh
+++ b/gazebo/physics/kido/KIDOCollisionPrivate.hh
@@ -15,21 +15,21 @@
*
*/
-#ifndef _GAZEBO_DARTCOLLISION_PRIVATE_HH_
-#define _GAZEBO_DARTCOLLISION_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOCOLLISION_PRIVATE_HH_
+#define _GAZEBO_KIDOCOLLISION_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
+#include "gazebo/physics/kido/kido_inc.h"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTCollision
- class DARTCollisionPrivate
+ /// \brief Private data class for KIDOCollision
+ class KIDOCollisionPrivate
{
/// \brief Constructor
- public: DARTCollisionPrivate(dart::dynamics::BodyNode *_dtBodyNode)
+ public: KIDOCollisionPrivate(kido::dynamics::BodyNode *_dtBodyNode)
: dtBodyNode(_dtBodyNode),
dtCollisionShape(NULL),
categoryBits(0),
@@ -38,13 +38,13 @@ namespace gazebo
}
/// \brief Default destructor
- public: ~DARTCollisionPrivate() = default;
+ public: ~KIDOCollisionPrivate() = default;
- /// \brief DART body node associated with this collision.
- public: dart::dynamics::BodyNode *dtBodyNode;
+ /// \brief KIDO body node associated with this collision.
+ public: kido::dynamics::BodyNode *dtBodyNode;
- /// \brief DART collision shape associated with this collision.
- public: dart::dynamics::Shape *dtCollisionShape;
+ /// \brief KIDO collision shape associated with this collision.
+ public: kido::dynamics::Shape *dtCollisionShape;
/// \brief Category bits for collision detection
public: unsigned int categoryBits;
diff --git a/gazebo/physics/dart/DARTCylinderShape.cc b/gazebo/physics/kido/KIDOCylinderShape.cc
similarity index 62%
rename from gazebo/physics/dart/DARTCylinderShape.cc
rename to gazebo/physics/kido/KIDOCylinderShape.cc
index 9d93e7e..1838cc4 100644
--- a/gazebo/physics/dart/DARTCylinderShape.cc
+++ b/gazebo/physics/kido/KIDOCylinderShape.cc
@@ -16,31 +16,31 @@
*/
#include "gazebo/common/Console.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTCylinderShape.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOCylinderShape.hh"
#include "gazebo/util/system.hh"
-#include "gazebo/physics/dart/DARTCylinderShapePrivate.hh"
+#include "gazebo/physics/kido/KIDOCylinderShapePrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTCylinderShape::DARTCylinderShape(CollisionPtr _parent)
+KIDOCylinderShape::KIDOCylinderShape(CollisionPtr _parent)
: CylinderShape(_parent),
- dataPtr(new DARTCylinderShapePrivate())
+ dataPtr(new KIDOCylinderShapePrivate())
{
}
//////////////////////////////////////////////////
-DARTCylinderShape::~DARTCylinderShape()
+KIDOCylinderShape::~KIDOCylinderShape()
{
delete this->dataPtr;
}
//////////////////////////////////////////////////
-void DARTCylinderShape::SetSize(double _radius, double _length)
+void KIDOCylinderShape::SetSize(double _radius, double _length)
{
if (_radius < 0)
{
@@ -60,36 +60,36 @@ void DARTCylinderShape::SetSize(double _radius, double _length)
// otherwise later resize operations using setLocalScaling
// will not be possible
gzwarn << "Setting cylinder shape's radius to zero not supported "
- << "in DART, using 1e-4.\n";
+ << "in KIDO, using 1e-4.\n";
_radius = 1e-4;
}
if (math::equal(_length, 0.0))
{
gzwarn << "Setting cylinder shape's length to zero not supported "
- << "in DART, using 1e-4.\n";
+ << "in KIDO, using 1e-4.\n";
_length = 1e-4;
}
CylinderShape::SetSize(_radius, _length);
- DARTCollisionPtr dartCollisionParent =
- boost::dynamic_pointer_cast<DARTCollision>(this->collisionParent);
+ KIDOCollisionPtr kidoCollisionParent =
+ boost::dynamic_pointer_cast<KIDOCollision>(this->collisionParent);
- if (dartCollisionParent->GetDARTCollisionShape() == NULL)
+ if (kidoCollisionParent->GetKIDOCollisionShape() == NULL)
{
- dart::dynamics::BodyNode *dtBodyNode =
- dartCollisionParent->GetDARTBodyNode();
- dart::dynamics::CylinderShape *dtCylinderShape =
- new dart::dynamics::CylinderShape(_radius, _length);
+ kido::dynamics::BodyNode *dtBodyNode =
+ kidoCollisionParent->GetKIDOBodyNode();
+ kido::dynamics::CylinderShape *dtCylinderShape =
+ new kido::dynamics::CylinderShape(_radius, _length);
dtBodyNode->addCollisionShape(dtCylinderShape);
- dartCollisionParent->SetDARTCollisionShape(dtCylinderShape);
+ kidoCollisionParent->SetKIDOCollisionShape(dtCylinderShape);
}
else
{
- dart::dynamics::CylinderShape *dtCylinderShape =
- dynamic_cast<dart::dynamics::CylinderShape*>(
- dartCollisionParent->GetDARTCollisionShape());
+ kido::dynamics::CylinderShape *dtCylinderShape =
+ dynamic_cast<kido::dynamics::CylinderShape*>(
+ kidoCollisionParent->GetKIDOCollisionShape());
dtCylinderShape->setRadius(_radius);
dtCylinderShape->setHeight(_length);
}
diff --git a/gazebo/physics/dart/DARTCylinderShape.hh b/gazebo/physics/kido/KIDOCylinderShape.hh
similarity index 70%
rename from gazebo/physics/dart/DARTCylinderShape.hh
rename to gazebo/physics/kido/KIDOCylinderShape.hh
index b0dc8da..842e017 100644
--- a/gazebo/physics/dart/DARTCylinderShape.hh
+++ b/gazebo/physics/kido/KIDOCylinderShape.hh
@@ -15,11 +15,11 @@
*
*/
-#ifndef _GAZEBO_DARTCYLINDERSHAPE_HH_
-#define _GAZEBO_DARTCYLINDERSHAPE_HH_
+#ifndef _GAZEBO_KIDOCYLINDERSHAPE_HH_
+#define _GAZEBO_KIDOCYLINDERSHAPE_HH_
#include "gazebo/physics/CylinderShape.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
#include "gazebo/util/system.hh"
namespace gazebo
@@ -27,27 +27,27 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTCylinderShapePrivate;
+ class KIDOCylinderShapePrivate;
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \brief DART cylinder shape
- class GZ_PHYSICS_VISIBLE DARTCylinderShape : public CylinderShape
+ /// \brief KIDO cylinder shape
+ class GZ_PHYSICS_VISIBLE KIDOCylinderShape : public CylinderShape
{
/// \brief Constructor
/// \param[in] _parent Collision parent.
- public: explicit DARTCylinderShape(CollisionPtr _parent);
+ public: explicit KIDOCylinderShape(CollisionPtr _parent);
/// \brief Destructor.
- public: virtual ~DARTCylinderShape();
+ public: virtual ~KIDOCylinderShape();
// Documentation inerited.
public: void SetSize(double _radius, double _length);
/// \internal
/// \brief Pointer to private data
- private: DARTCylinderShapePrivate *dataPtr;
+ private: KIDOCylinderShapePrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTMultiRayShapePrivate.hh b/gazebo/physics/kido/KIDOCylinderShapePrivate.hh
similarity index 67%
rename from gazebo/physics/dart/DARTMultiRayShapePrivate.hh
rename to gazebo/physics/kido/KIDOCylinderShapePrivate.hh
index 3f2a3ea..aeb6bc2 100644
--- a/gazebo/physics/dart/DARTMultiRayShapePrivate.hh
+++ b/gazebo/physics/kido/KIDOCylinderShapePrivate.hh
@@ -15,25 +15,25 @@
*
*/
-#ifndef _GAZEBO_DARTMULTIRAYSHAPE_PRIVATE_HH_
-#define _GAZEBO_DARTMULTIRAYSHAPE_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOCYLINDERSHAPE_PRIVATE_HH_
+#define _GAZEBO_KIDOCYLINDERSHAPE_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTMultiRayShape
- class DARTMultiRayShapePrivate
+ /// \brief Private data class for KIDOCylinderShape
+ class KIDOCylinderShapePrivate
{
/// \brief Constructor
- public: DARTMultiRayShapePrivate() = default;
+ public: KIDOCylinderShapePrivate() = default;
/// \brief Default destructor
- public: ~DARTMultiRayShapePrivate() = default;
+ public: ~KIDOCylinderShapePrivate() = default;
};
}
}
diff --git a/gazebo/physics/dart/DARTFixedJoint.cc b/gazebo/physics/kido/KIDOFixedJoint.cc
similarity index 66%
rename from gazebo/physics/dart/DARTFixedJoint.cc
rename to gazebo/physics/kido/KIDOFixedJoint.cc
index e9e2150..79cdce1 100644
--- a/gazebo/physics/dart/DARTFixedJoint.cc
+++ b/gazebo/physics/kido/KIDOFixedJoint.cc
@@ -20,92 +20,92 @@
#include "gazebo/gazebo_config.h"
#include "gazebo/common/Console.hh"
#include "gazebo/physics/Link.hh"
-#include "gazebo/physics/dart/DARTJointPrivate.hh"
-#include "gazebo/physics/dart/DARTFixedJoint.hh"
+#include "gazebo/physics/kido/KIDOJointPrivate.hh"
+#include "gazebo/physics/kido/KIDOFixedJoint.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTFixedJoint::DARTFixedJoint(BasePtr _parent)
- : FixedJoint<DARTJoint>(_parent)
+KIDOFixedJoint::KIDOFixedJoint(BasePtr _parent)
+ : FixedJoint<KIDOJoint>(_parent)
{
- this->dataPtr->dtJoint = new dart::dynamics::WeldJoint();
+ this->dataPtr->dtJoint = new kido::dynamics::WeldJoint();
}
//////////////////////////////////////////////////
-DARTFixedJoint::~DARTFixedJoint()
+KIDOFixedJoint::~KIDOFixedJoint()
{
// We don't need to delete dtJoint because the world will delete it
}
//////////////////////////////////////////////////
-void DARTFixedJoint::Load(sdf::ElementPtr _sdf)
+void KIDOFixedJoint::Load(sdf::ElementPtr _sdf)
{
- FixedJoint<DARTJoint>::Load(_sdf);
+ FixedJoint<KIDOJoint>::Load(_sdf);
}
//////////////////////////////////////////////////
-void DARTFixedJoint::Init()
+void KIDOFixedJoint::Init()
{
- FixedJoint<DARTJoint>::Init();
+ FixedJoint<KIDOJoint>::Init();
}
//////////////////////////////////////////////////
-math::Vector3 DARTFixedJoint::GetAnchor(unsigned int /*index*/) const
+math::Vector3 KIDOFixedJoint::GetAnchor(unsigned int /*index*/) const
{
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
this->dataPtr->dtJoint->getTransformFromChildBodyNode();
Eigen::Vector3d worldOrigin = T.translation();
- return DARTTypes::ConvVec3(worldOrigin);
+ return KIDOTypes::ConvVec3(worldOrigin);
}
//////////////////////////////////////////////////
-math::Vector3 DARTFixedJoint::GetGlobalAxis(unsigned int /*_index*/) const
+math::Vector3 KIDOFixedJoint::GetGlobalAxis(unsigned int /*_index*/) const
{
- gzwarn << "DARTFixedJoint: called method "
+ gzwarn << "KIDOFixedJoint: called method "
<< "GetGlobalAxis that is not valid for joints of type fixed.\n";
return math::Vector3();
}
//////////////////////////////////////////////////
-void DARTFixedJoint::SetAxis(unsigned int /*_index*/,
+void KIDOFixedJoint::SetAxis(unsigned int /*_index*/,
const math::Vector3& /*_axis*/)
{
- gzwarn << "DARTFixedJoint: called method "
+ gzwarn << "KIDOFixedJoint: called method "
<< "SetAxis that is not valid for joints of type fixed.\n";
return;
}
//////////////////////////////////////////////////
-math::Angle DARTFixedJoint::GetAngleImpl(unsigned int /*_index*/) const
+math::Angle KIDOFixedJoint::GetAngleImpl(unsigned int /*_index*/) const
{
- gzwarn << "DARTFixedJoint: called method "
+ gzwarn << "KIDOFixedJoint: called method "
<< "GetAngleImpl that is not valid for joints of type fixed.\n";
return math::Angle();
}
//////////////////////////////////////////////////
-void DARTFixedJoint::SetVelocity(unsigned int /*_index*/, double /*_vel*/)
+void KIDOFixedJoint::SetVelocity(unsigned int /*_index*/, double /*_vel*/)
{
- gzwarn << "DARTFixedJoint: called method "
+ gzwarn << "KIDOFixedJoint: called method "
<< "SetVelocity that is not valid for joints of type fixed.\n";
return;
}
//////////////////////////////////////////////////
-double DARTFixedJoint::GetVelocity(unsigned int /*_index*/) const
+double KIDOFixedJoint::GetVelocity(unsigned int /*_index*/) const
{
- gzwarn << "DARTFixedJoint: called method "
+ gzwarn << "KIDOFixedJoint: called method "
<< "GetVelocity that is not valid for joints of type fixed.\n";
return 0.0;
}
//////////////////////////////////////////////////
-void DARTFixedJoint::SetForceImpl(unsigned int /*_index*/, double /*_effort*/)
+void KIDOFixedJoint::SetForceImpl(unsigned int /*_index*/, double /*_effort*/)
{
- gzwarn << "DARTFixedJoint: called method "
+ gzwarn << "KIDOFixedJoint: called method "
<< "SetForceImpl that is not valid for joints of type fixed.\n";
}
diff --git a/gazebo/physics/dart/DARTFixedJoint.hh b/gazebo/physics/kido/KIDOFixedJoint.hh
similarity index 86%
rename from gazebo/physics/dart/DARTFixedJoint.hh
rename to gazebo/physics/kido/KIDOFixedJoint.hh
index 483a8b1..b170971 100644
--- a/gazebo/physics/dart/DARTFixedJoint.hh
+++ b/gazebo/physics/kido/KIDOFixedJoint.hh
@@ -15,32 +15,32 @@
*
*/
-#ifndef _GAZEBO_DARTFIXEDJOINT_HH_
-#define _GAZEBO_DARTFIXEDJOINT_HH_
+#ifndef _GAZEBO_KIDOFIXEDJOINT_HH_
+#define _GAZEBO_KIDOFIXEDJOINT_HH_
#include "gazebo/math/Angle.hh"
#include "gazebo/math/Vector3.hh"
#include "gazebo/physics/FixedJoint.hh"
-#include "gazebo/physics/dart/DARTJoint.hh"
+#include "gazebo/physics/kido/KIDOJoint.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
/// \brief A single axis hinge joint.
- class GZ_PHYSICS_VISIBLE DARTFixedJoint : public FixedJoint<DARTJoint>
+ class GZ_PHYSICS_VISIBLE KIDOFixedJoint : public FixedJoint<KIDOJoint>
{
/// \brief Constructor
/// \param[in] _parent Parent of the Joint
- public: DARTFixedJoint(BasePtr _parent);
+ public: KIDOFixedJoint(BasePtr _parent);
/// \brief Destructor
- public: virtual ~DARTFixedJoint();
+ public: virtual ~KIDOFixedJoint();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
diff --git a/gazebo/physics/dart/DARTHeightmapShape.cc b/gazebo/physics/kido/KIDOHeightmapShape.cc
similarity index 74%
rename from gazebo/physics/dart/DARTHeightmapShape.cc
rename to gazebo/physics/kido/KIDOHeightmapShape.cc
index 15146f4..2165299 100644
--- a/gazebo/physics/dart/DARTHeightmapShape.cc
+++ b/gazebo/physics/kido/KIDOHeightmapShape.cc
@@ -17,29 +17,29 @@
#include "gazebo/common/Console.hh"
#include "gazebo/common/Exception.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTHeightmapShape.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOHeightmapShape.hh"
-#include "gazebo/physics/dart/DARTHeightmapShapePrivate.hh"
+#include "gazebo/physics/kido/KIDOHeightmapShapePrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTHeightmapShape::DARTHeightmapShape(CollisionPtr _parent)
+KIDOHeightmapShape::KIDOHeightmapShape(CollisionPtr _parent)
: HeightmapShape(_parent),
- dataPtr(new DARTHeightmapShapePrivate())
+ dataPtr(new KIDOHeightmapShapePrivate())
{
}
//////////////////////////////////////////////////
-DARTHeightmapShape::~DARTHeightmapShape()
+KIDOHeightmapShape::~KIDOHeightmapShape()
{
delete dataPtr;
}
//////////////////////////////////////////////////
-void DARTHeightmapShape::Init()
+void KIDOHeightmapShape::Init()
{
gzwarn << "Not implemented!\n";
}
diff --git a/gazebo/physics/dart/DARTHeightmapShape.hh b/gazebo/physics/kido/KIDOHeightmapShape.hh
similarity index 71%
rename from gazebo/physics/dart/DARTHeightmapShape.hh
rename to gazebo/physics/kido/KIDOHeightmapShape.hh
index 6496c3d..341fafa 100644
--- a/gazebo/physics/dart/DARTHeightmapShape.hh
+++ b/gazebo/physics/kido/KIDOHeightmapShape.hh
@@ -15,13 +15,13 @@
*
*/
-#ifndef _GAZEBO_DARTHEIGHTMAPSHAPE_HH_
-#define _GAZEBO_DARTHEIGHTMAPSHAPE_HH_
+#ifndef _GAZEBO_KIDOHEIGHTMAPSHAPE_HH_
+#define _GAZEBO_KIDOHEIGHTMAPSHAPE_HH_
#include <vector>
#include "gazebo/physics/HeightmapShape.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
#include "gazebo/physics/Collision.hh"
#include "gazebo/util/system.hh"
@@ -30,27 +30,27 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTHeightmapShapePrivate;
+ class KIDOHeightmapShapePrivate;
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \brief DART Height map collision.
- class GZ_PHYSICS_VISIBLE DARTHeightmapShape : public HeightmapShape
+ /// \brief KIDO Height map collision.
+ class GZ_PHYSICS_VISIBLE KIDOHeightmapShape : public HeightmapShape
{
/// \brief Constructor.
/// \param[in] _parent Collision parent.
- public: DARTHeightmapShape(CollisionPtr _parent);
+ public: KIDOHeightmapShape(CollisionPtr _parent);
/// \brief Destructor
- public: virtual ~DARTHeightmapShape();
+ public: virtual ~KIDOHeightmapShape();
// Documentation inerited.
public: virtual void Init();
/// \internal
/// \brief Pointer to private data
- private: DARTHeightmapShapePrivate *dataPtr;
+ private: KIDOHeightmapShapePrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTHeightmapShapePrivate.hh b/gazebo/physics/kido/KIDOHeightmapShapePrivate.hh
similarity index 67%
rename from gazebo/physics/dart/DARTHeightmapShapePrivate.hh
rename to gazebo/physics/kido/KIDOHeightmapShapePrivate.hh
index bca6fe3..255cf8c 100644
--- a/gazebo/physics/dart/DARTHeightmapShapePrivate.hh
+++ b/gazebo/physics/kido/KIDOHeightmapShapePrivate.hh
@@ -15,25 +15,25 @@
*
*/
-#ifndef _GAZEBO_DARTHEIGHTMAPSHAPE_PRIVATE_HH_
-#define _GAZEBO_DARTHEIGHTMAPSHAPE_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOHEIGHTMAPSHAPE_PRIVATE_HH_
+#define _GAZEBO_KIDOHEIGHTMAPSHAPE_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTHeightmapShape
- class DARTHeightmapShapePrivate
+ /// \brief Private data class for KIDOHeightmapShape
+ class KIDOHeightmapShapePrivate
{
/// \brief Constructor
- public: DARTHeightmapShapePrivate() = default;
+ public: KIDOHeightmapShapePrivate() = default;
/// \brief Default destructor
- public: ~DARTHeightmapShapePrivate() = default;
+ public: ~KIDOHeightmapShapePrivate() = default;
};
}
}
diff --git a/gazebo/physics/dart/DARTHinge2Joint.cc b/gazebo/physics/kido/KIDOHinge2Joint.cc
similarity index 70%
rename from gazebo/physics/dart/DARTHinge2Joint.cc
rename to gazebo/physics/kido/KIDOHinge2Joint.cc
index 04ce65b..941cb2a 100644
--- a/gazebo/physics/dart/DARTHinge2Joint.cc
+++ b/gazebo/physics/kido/KIDOHinge2Joint.cc
@@ -19,79 +19,79 @@
#include "gazebo/common/Console.hh"
#include "gazebo/physics/Link.hh"
-#include "gazebo/physics/dart/DARTJointPrivate.hh"
-#include "gazebo/physics/dart/DARTHinge2Joint.hh"
+#include "gazebo/physics/kido/KIDOJointPrivate.hh"
+#include "gazebo/physics/kido/KIDOHinge2Joint.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTHinge2Joint::DARTHinge2Joint(BasePtr _parent)
- : Hinge2Joint<DARTJoint>(_parent)
+KIDOHinge2Joint::KIDOHinge2Joint(BasePtr _parent)
+ : Hinge2Joint<KIDOJoint>(_parent)
{
- this->dataPtr->dtJoint = new dart::dynamics::UniversalJoint();
+ this->dataPtr->dtJoint = new kido::dynamics::UniversalJoint();
}
//////////////////////////////////////////////////
-DARTHinge2Joint::~DARTHinge2Joint()
+KIDOHinge2Joint::~KIDOHinge2Joint()
{
// We don't need to delete dtJoint because the world will delete it
}
//////////////////////////////////////////////////
-void DARTHinge2Joint::Load(sdf::ElementPtr _sdf)
+void KIDOHinge2Joint::Load(sdf::ElementPtr _sdf)
{
- Hinge2Joint<DARTJoint>::Load(_sdf);
+ Hinge2Joint<KIDOJoint>::Load(_sdf);
}
//////////////////////////////////////////////////
-void DARTHinge2Joint::Init()
+void KIDOHinge2Joint::Init()
{
- Hinge2Joint<DARTJoint>::Init();
+ Hinge2Joint<KIDOJoint>::Init();
}
//////////////////////////////////////////////////
-math::Vector3 DARTHinge2Joint::GetAnchor(unsigned int /*_index*/) const
+math::Vector3 KIDOHinge2Joint::GetAnchor(unsigned int /*_index*/) const
{
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
this->dataPtr->dtJoint->getTransformFromChildBodyNode();
Eigen::Vector3d worldOrigin = T.translation();
- return DARTTypes::ConvVec3(worldOrigin);
+ return KIDOTypes::ConvVec3(worldOrigin);
}
//////////////////////////////////////////////////
-void DARTHinge2Joint::SetAxis(unsigned int _index, const math::Vector3 &_axis)
+void KIDOHinge2Joint::SetAxis(unsigned int _index, const math::Vector3 &_axis)
{
- Eigen::Vector3d dartAxis = DARTTypes::ConvVec3(_axis);
+ Eigen::Vector3d kidoAxis = KIDOTypes::ConvVec3(_axis);
if (_index == 0)
{
- dart::dynamics::UniversalJoint *dtUniveralJoint =
- reinterpret_cast<dart::dynamics::UniversalJoint *>(
+ kido::dynamics::UniversalJoint *dtUniveralJoint =
+ reinterpret_cast<kido::dynamics::UniversalJoint *>(
this->dataPtr->dtJoint);
// TODO: Issue #494
// See: https://bitbucket.org/osrf/gazebo/issue/494/joint-axis-reference
- Eigen::Isometry3d dartTransfJointLeftToParentLink
+ Eigen::Isometry3d kidoTransfJointLeftToParentLink
= this->dataPtr->dtJoint->getTransformFromParentBodyNode().inverse();
- dartAxis = dartTransfJointLeftToParentLink.linear() * dartAxis;
+ kidoAxis = kidoTransfJointLeftToParentLink.linear() * kidoAxis;
- dtUniveralJoint->setAxis1(dartAxis);
+ dtUniveralJoint->setAxis1(kidoAxis);
}
else if (_index == 1)
{
- dart::dynamics::UniversalJoint *dtUniveralJoint =
- reinterpret_cast<dart::dynamics::UniversalJoint *>(
+ kido::dynamics::UniversalJoint *dtUniveralJoint =
+ reinterpret_cast<kido::dynamics::UniversalJoint *>(
this->dataPtr->dtJoint);
// TODO: Issue #494
// See: https://bitbucket.org/osrf/gazebo/issue/494/joint-axis-reference
- Eigen::Isometry3d dartTransfJointLeftToParentLink
+ Eigen::Isometry3d kidoTransfJointLeftToParentLink
= this->dataPtr->dtJoint->getTransformFromParentBodyNode().inverse();
- dartAxis = dartTransfJointLeftToParentLink.linear() * dartAxis;
+ kidoAxis = kidoTransfJointLeftToParentLink.linear() * kidoAxis;
- dtUniveralJoint->setAxis2(dartAxis);
+ dtUniveralJoint->setAxis2(kidoAxis);
}
else
{
@@ -100,14 +100,14 @@ void DARTHinge2Joint::SetAxis(unsigned int _index, const math::Vector3 &_axis)
}
//////////////////////////////////////////////////
-math::Vector3 DARTHinge2Joint::GetGlobalAxis(unsigned int _index) const
+math::Vector3 KIDOHinge2Joint::GetGlobalAxis(unsigned int _index) const
{
Eigen::Vector3d globalAxis = Eigen::Vector3d::UnitX();
if (_index == 0)
{
- dart::dynamics::UniversalJoint *dtUniveralJoint =
- reinterpret_cast<dart::dynamics::UniversalJoint *>(
+ kido::dynamics::UniversalJoint *dtUniveralJoint =
+ reinterpret_cast<kido::dynamics::UniversalJoint *>(
this->dataPtr->dtJoint);
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
@@ -119,8 +119,8 @@ math::Vector3 DARTHinge2Joint::GetGlobalAxis(unsigned int _index) const
}
else if (_index == 1)
{
- dart::dynamics::UniversalJoint *dtUniveralJoint =
- reinterpret_cast<dart::dynamics::UniversalJoint *>(
+ kido::dynamics::UniversalJoint *dtUniveralJoint =
+ reinterpret_cast<kido::dynamics::UniversalJoint *>(
this->dataPtr->dtJoint);
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
@@ -137,11 +137,11 @@ math::Vector3 DARTHinge2Joint::GetGlobalAxis(unsigned int _index) const
// TODO: Issue #494
// See: https://bitbucket.org/osrf/gazebo/issue/494/
// joint-axis-reference-frame-doesnt-match
- return DARTTypes::ConvVec3(globalAxis);
+ return KIDOTypes::ConvVec3(globalAxis);
}
//////////////////////////////////////////////////
-math::Angle DARTHinge2Joint::GetAngleImpl(unsigned int _index) const
+math::Angle KIDOHinge2Joint::GetAngleImpl(unsigned int _index) const
{
math::Angle result;
@@ -164,7 +164,7 @@ math::Angle DARTHinge2Joint::GetAngleImpl(unsigned int _index) const
}
//////////////////////////////////////////////////
-double DARTHinge2Joint::GetVelocity(unsigned int _index) const
+double KIDOHinge2Joint::GetVelocity(unsigned int _index) const
{
double result = 0.0;
@@ -179,7 +179,7 @@ double DARTHinge2Joint::GetVelocity(unsigned int _index) const
}
//////////////////////////////////////////////////
-void DARTHinge2Joint::SetVelocity(unsigned int _index, double _vel)
+void KIDOHinge2Joint::SetVelocity(unsigned int _index, double _vel)
{
if (_index == 0)
this->dataPtr->dtJoint->setVelocity(0, _vel);
@@ -190,7 +190,7 @@ void DARTHinge2Joint::SetVelocity(unsigned int _index, double _vel)
}
//////////////////////////////////////////////////
-void DARTHinge2Joint::SetForceImpl(unsigned int _index, double _effort)
+void KIDOHinge2Joint::SetForceImpl(unsigned int _index, double _effort)
{
if (_index == 0)
this->dataPtr->dtJoint->setForce(0, _effort);
diff --git a/gazebo/physics/dart/DARTHinge2Joint.hh b/gazebo/physics/kido/KIDOHinge2Joint.hh
similarity index 85%
rename from gazebo/physics/dart/DARTHinge2Joint.hh
rename to gazebo/physics/kido/KIDOHinge2Joint.hh
index 27bc6ae..8893111 100644
--- a/gazebo/physics/dart/DARTHinge2Joint.hh
+++ b/gazebo/physics/kido/KIDOHinge2Joint.hh
@@ -15,32 +15,32 @@
*
*/
-#ifndef _GAZEBO_DARTHINGE2JOINT_HH_
-#define _GAZEBO_DARTHINGE2JOINT_HH_
+#ifndef _GAZEBO_KIDOHINGE2JOINT_HH_
+#define _GAZEBO_KIDOHINGE2JOINT_HH_
#include "gazebo/math/Angle.hh"
#include "gazebo/math/Vector3.hh"
#include "gazebo/physics/Hinge2Joint.hh"
-#include "gazebo/physics/dart/DARTJoint.hh"
+#include "gazebo/physics/kido/KIDOJoint.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
/// \brief A two axis hinge joint
- class GZ_PHYSICS_VISIBLE DARTHinge2Joint : public Hinge2Joint<DARTJoint>
+ class GZ_PHYSICS_VISIBLE KIDOHinge2Joint : public Hinge2Joint<KIDOJoint>
{
/// \brief Constructor
/// \param[in] _parent Parent of the Joint
- public: DARTHinge2Joint(BasePtr _parent);
+ public: KIDOHinge2Joint(BasePtr _parent);
/// \brief Destructor.
- public: virtual ~DARTHinge2Joint();
+ public: virtual ~KIDOHinge2Joint();
// Documentation inherited
public: virtual void Load(sdf::ElementPtr _sdf);
diff --git a/gazebo/physics/dart/DARTHingeJoint.cc b/gazebo/physics/kido/KIDOHingeJoint.cc
similarity index 70%
rename from gazebo/physics/dart/DARTHingeJoint.cc
rename to gazebo/physics/kido/KIDOHingeJoint.cc
index 3d35edf..945ea9a 100644
--- a/gazebo/physics/dart/DARTHingeJoint.cc
+++ b/gazebo/physics/kido/KIDOHingeJoint.cc
@@ -20,56 +20,56 @@
#include "gazebo/gazebo_config.h"
#include "gazebo/common/Console.hh"
#include "gazebo/physics/Link.hh"
-#include "gazebo/physics/dart/DARTJointPrivate.hh"
-#include "gazebo/physics/dart/DARTHingeJoint.hh"
+#include "gazebo/physics/kido/KIDOJointPrivate.hh"
+#include "gazebo/physics/kido/KIDOHingeJoint.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTHingeJoint::DARTHingeJoint(BasePtr _parent)
- : HingeJoint<DARTJoint>(_parent)
+KIDOHingeJoint::KIDOHingeJoint(BasePtr _parent)
+ : HingeJoint<KIDOJoint>(_parent)
{
- this->dataPtr->dtJoint = new dart::dynamics::RevoluteJoint();
+ this->dataPtr->dtJoint = new kido::dynamics::RevoluteJoint();
}
//////////////////////////////////////////////////
-DARTHingeJoint::~DARTHingeJoint()
+KIDOHingeJoint::~KIDOHingeJoint()
{
// We don't need to delete dtJoint because the world will delete it
}
//////////////////////////////////////////////////
-void DARTHingeJoint::Load(sdf::ElementPtr _sdf)
+void KIDOHingeJoint::Load(sdf::ElementPtr _sdf)
{
- HingeJoint<DARTJoint>::Load(_sdf);
+ HingeJoint<KIDOJoint>::Load(_sdf);
}
//////////////////////////////////////////////////
-void DARTHingeJoint::Init()
+void KIDOHingeJoint::Init()
{
- HingeJoint<DARTJoint>::Init();
+ HingeJoint<KIDOJoint>::Init();
}
//////////////////////////////////////////////////
-math::Vector3 DARTHingeJoint::GetAnchor(unsigned int /*index*/) const
+math::Vector3 KIDOHingeJoint::GetAnchor(unsigned int /*index*/) const
{
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
this->dataPtr->dtJoint->getTransformFromChildBodyNode();
Eigen::Vector3d worldOrigin = T.translation();
- return DARTTypes::ConvVec3(worldOrigin);
+ return KIDOTypes::ConvVec3(worldOrigin);
}
//////////////////////////////////////////////////
-math::Vector3 DARTHingeJoint::GetGlobalAxis(unsigned int _index) const
+math::Vector3 KIDOHingeJoint::GetGlobalAxis(unsigned int _index) const
{
Eigen::Vector3d globalAxis = Eigen::Vector3d::UnitX();
if (_index == 0)
{
- dart::dynamics::RevoluteJoint *dtRevoluteJoint =
- reinterpret_cast<dart::dynamics::RevoluteJoint *>(
+ kido::dynamics::RevoluteJoint *dtRevoluteJoint =
+ reinterpret_cast<kido::dynamics::RevoluteJoint *>(
this->dataPtr->dtJoint);
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
@@ -82,26 +82,26 @@ math::Vector3 DARTHingeJoint::GetGlobalAxis(unsigned int _index) const
gzerr << "Invalid index[" << _index << "]\n";
}
- return DARTTypes::ConvVec3(globalAxis);
+ return KIDOTypes::ConvVec3(globalAxis);
}
//////////////////////////////////////////////////
-void DARTHingeJoint::SetAxis(unsigned int _index, const math::Vector3& _axis)
+void KIDOHingeJoint::SetAxis(unsigned int _index, const math::Vector3& _axis)
{
if (_index == 0)
{
- dart::dynamics::RevoluteJoint *dtRevoluteJoint =
- reinterpret_cast<dart::dynamics::RevoluteJoint *>(
+ kido::dynamics::RevoluteJoint *dtRevoluteJoint =
+ reinterpret_cast<kido::dynamics::RevoluteJoint *>(
this->dataPtr->dtJoint);
- Eigen::Vector3d dartAxis = DARTTypes::ConvVec3(
+ Eigen::Vector3d kidoAxis = KIDOTypes::ConvVec3(
this->GetAxisFrameOffset(0).RotateVector(_axis));
- Eigen::Isometry3d dartTransfJointLeftToParentLink
+ Eigen::Isometry3d kidoTransfJointLeftToParentLink
= this->dataPtr->dtJoint->getTransformFromParentBodyNode().inverse();
- dartAxis = dartTransfJointLeftToParentLink.linear() * dartAxis;
+ kidoAxis = kidoTransfJointLeftToParentLink.linear() * kidoAxis;
//--------------------------------------------------------------------------
- dtRevoluteJoint->setAxis(dartAxis);
+ dtRevoluteJoint->setAxis(kidoAxis);
}
else
{
@@ -110,7 +110,7 @@ void DARTHingeJoint::SetAxis(unsigned int _index, const math::Vector3& _axis)
}
//////////////////////////////////////////////////
-math::Angle DARTHingeJoint::GetAngleImpl(unsigned int _index) const
+math::Angle KIDOHingeJoint::GetAngleImpl(unsigned int _index) const
{
math::Angle result;
@@ -128,7 +128,7 @@ math::Angle DARTHingeJoint::GetAngleImpl(unsigned int _index) const
}
//////////////////////////////////////////////////
-void DARTHingeJoint::SetVelocity(unsigned int _index, double _vel)
+void KIDOHingeJoint::SetVelocity(unsigned int _index, double _vel)
{
if (_index == 0)
{
@@ -141,7 +141,7 @@ void DARTHingeJoint::SetVelocity(unsigned int _index, double _vel)
}
//////////////////////////////////////////////////
-double DARTHingeJoint::GetVelocity(unsigned int _index) const
+double KIDOHingeJoint::GetVelocity(unsigned int _index) const
{
double result = 0.0;
@@ -154,7 +154,7 @@ double DARTHingeJoint::GetVelocity(unsigned int _index) const
}
//////////////////////////////////////////////////
-void DARTHingeJoint::SetForceImpl(unsigned int _index, double _effort)
+void KIDOHingeJoint::SetForceImpl(unsigned int _index, double _effort)
{
if (_index == 0)
this->dataPtr->dtJoint->setForce(0, _effort);
diff --git a/gazebo/physics/dart/DARTHingeJoint.hh b/gazebo/physics/kido/KIDOHingeJoint.hh
similarity index 86%
rename from gazebo/physics/dart/DARTHingeJoint.hh
rename to gazebo/physics/kido/KIDOHingeJoint.hh
index 538aff0..5031aaf 100644
--- a/gazebo/physics/dart/DARTHingeJoint.hh
+++ b/gazebo/physics/kido/KIDOHingeJoint.hh
@@ -15,32 +15,32 @@
*
*/
-#ifndef _GAZEBO_DARTHINGEJOINT_HH_
-#define _GAZEBO_DARTHINGEJOINT_HH_
+#ifndef _GAZEBO_KIDOHINGEJOINT_HH_
+#define _GAZEBO_KIDOHINGEJOINT_HH_
#include "gazebo/math/Angle.hh"
#include "gazebo/math/Vector3.hh"
#include "gazebo/physics/HingeJoint.hh"
-#include "gazebo/physics/dart/DARTJoint.hh"
+#include "gazebo/physics/kido/KIDOJoint.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
/// \brief A single axis hinge joint.
- class GZ_PHYSICS_VISIBLE DARTHingeJoint : public HingeJoint<DARTJoint>
+ class GZ_PHYSICS_VISIBLE KIDOHingeJoint : public HingeJoint<KIDOJoint>
{
/// \brief Constructor
/// \param[in] _parent Parent of the Joint
- public: DARTHingeJoint(BasePtr _parent);
+ public: KIDOHingeJoint(BasePtr _parent);
/// \brief Destructor
- public: virtual ~DARTHingeJoint();
+ public: virtual ~KIDOHingeJoint();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
diff --git a/gazebo/physics/dart/DARTJoint.cc b/gazebo/physics/kido/KIDOJoint.cc
similarity index 76%
rename from gazebo/physics/dart/DARTJoint.cc
rename to gazebo/physics/kido/KIDOJoint.cc
index 3d4184c..38312cf 100644
--- a/gazebo/physics/dart/DARTJoint.cc
+++ b/gazebo/physics/kido/KIDOJoint.cc
@@ -24,25 +24,25 @@
#include "gazebo/physics/World.hh"
#include "gazebo/physics/Link.hh"
#include "gazebo/physics/PhysicsEngine.hh"
-#include "gazebo/physics/dart/DARTLink.hh"
-#include "gazebo/physics/dart/DARTModel.hh"
-#include "gazebo/physics/dart/DARTJoint.hh"
+#include "gazebo/physics/kido/KIDOLink.hh"
+#include "gazebo/physics/kido/KIDOModel.hh"
+#include "gazebo/physics/kido/KIDOJoint.hh"
-#include "gazebo/physics/dart/DARTJointPrivate.hh"
+#include "gazebo/physics/kido/KIDOJointPrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTJoint::DARTJoint(BasePtr _parent)
+KIDOJoint::KIDOJoint(BasePtr _parent)
: Joint(_parent),
- dataPtr(new DARTJointPrivate(boost::dynamic_pointer_cast<DARTPhysics>(
+ dataPtr(new KIDOJointPrivate(boost::dynamic_pointer_cast<KIDOPhysics>(
this->GetWorld()->GetPhysicsEngine())))
{
}
//////////////////////////////////////////////////
-DARTJoint::~DARTJoint()
+KIDOJoint::~KIDOJoint()
{
this->Detach();
@@ -51,7 +51,7 @@ DARTJoint::~DARTJoint()
}
//////////////////////////////////////////////////
-void DARTJoint::Load(sdf::ElementPtr _sdf)
+void KIDOJoint::Load(sdf::ElementPtr _sdf)
{
if (!this->dataPtr->dtJoint)
{
@@ -65,7 +65,7 @@ void DARTJoint::Load(sdf::ElementPtr _sdf)
}
//////////////////////////////////////////////////
-void DARTJoint::Init()
+void KIDOJoint::Init()
{
Joint::Init();
@@ -74,10 +74,10 @@ void DARTJoint::Init()
this->dataPtr->dtJoint->setName(jointName.c_str());
// Parent and child link information
- DARTLinkPtr dartParentLink =
- boost::static_pointer_cast<DARTLink>(this->parentLink);
- DARTLinkPtr dartChildLink =
- boost::static_pointer_cast<DARTLink>(this->childLink);
+ KIDOLinkPtr kidoParentLink =
+ boost::static_pointer_cast<KIDOLink>(this->parentLink);
+ KIDOLinkPtr kidoChildLink =
+ boost::static_pointer_cast<KIDOLink>(this->childLink);
Eigen::Isometry3d dtTransformParentLinkToJoint =
Eigen::Isometry3d::Identity();
@@ -86,21 +86,21 @@ void DARTJoint::Init()
Eigen::Isometry3d dtTransformChildBodyNode = Eigen::Isometry3d::Identity();
// if (theChildLink != NULL)
- GZ_ASSERT(dartChildLink.get() != NULL, "dartChildLink pointer is NULL");
+ GZ_ASSERT(kidoChildLink.get() != NULL, "kidoChildLink pointer is NULL");
{
dtTransformChildBodyNode =
- DARTTypes::ConvPose(dartChildLink->GetWorldPose());
- this->dataPtr->dtChildBodyNode = dartChildLink->GetDARTBodyNode();
+ KIDOTypes::ConvPose(kidoChildLink->GetWorldPose());
+ this->dataPtr->dtChildBodyNode = kidoChildLink->GetKIDOBodyNode();
this->dataPtr->dtChildBodyNode->setParentJoint(this->dataPtr->dtJoint);
}
- dtTransformChildLinkToJoint = DARTTypes::ConvPose(this->anchorPose);
+ dtTransformChildLinkToJoint = KIDOTypes::ConvPose(this->anchorPose);
- if (dartParentLink.get() != NULL)
+ if (kidoParentLink.get() != NULL)
{
dtTransformParentBodyNode =
- DARTTypes::ConvPose(dartParentLink->GetWorldPose());
- dart::dynamics::BodyNode *dtParentBodyNode =
- dartParentLink->GetDARTBodyNode();
+ KIDOTypes::ConvPose(kidoParentLink->GetWorldPose());
+ kido::dynamics::BodyNode *dtParentBodyNode =
+ kidoParentLink->GetKIDOBodyNode();
dtParentBodyNode->addChildBodyNode(this->dataPtr->dtChildBodyNode);
}
@@ -116,31 +116,31 @@ void DARTJoint::Init()
}
//////////////////////////////////////////////////
-void DARTJoint::Reset()
+void KIDOJoint::Reset()
{
Joint::Reset();
}
//////////////////////////////////////////////////
-LinkPtr DARTJoint::GetJointLink(unsigned int _index) const
+LinkPtr KIDOJoint::GetJointLink(unsigned int _index) const
{
LinkPtr result;
if (_index == 0)
{
- DARTLinkPtr dartLink1
- = boost::static_pointer_cast<DARTLink>(this->parentLink);
+ KIDOLinkPtr kidoLink1
+ = boost::static_pointer_cast<KIDOLink>(this->parentLink);
- if (dartLink1 != NULL)
+ if (kidoLink1 != NULL)
return this->parentLink;
}
if (_index == 1)
{
- DARTLinkPtr dartLink2
- = boost::static_pointer_cast<DARTLink>(this->childLink);
+ KIDOLinkPtr kidoLink2
+ = boost::static_pointer_cast<KIDOLink>(this->childLink);
- if (dartLink2 != NULL)
+ if (kidoLink2 != NULL)
return this->childLink;
}
@@ -148,7 +148,7 @@ LinkPtr DARTJoint::GetJointLink(unsigned int _index) const
}
//////////////////////////////////////////////////
-bool DARTJoint::AreConnected(LinkPtr _one, LinkPtr _two) const
+bool KIDOJoint::AreConnected(LinkPtr _one, LinkPtr _two) const
{
if (_one.get() == NULL && _two.get() == NULL)
return false;
@@ -163,18 +163,18 @@ bool DARTJoint::AreConnected(LinkPtr _one, LinkPtr _two) const
}
//////////////////////////////////////////////////
-void DARTJoint::Attach(LinkPtr _parent, LinkPtr _child)
+void KIDOJoint::Attach(LinkPtr _parent, LinkPtr _child)
{
Joint::Attach(_parent, _child);
if (this->AreConnected(_parent, _child))
return;
- gzerr << "DART does not support joint attaching.\n";
+ gzerr << "KIDO does not support joint attaching.\n";
}
//////////////////////////////////////////////////
-void DARTJoint::Detach()
+void KIDOJoint::Detach()
{
if (!this->AreConnected(this->parentLink, this->childLink))
return;
@@ -182,20 +182,20 @@ void DARTJoint::Detach()
this->childLink.reset();
this->parentLink.reset();
- gzerr << "DART does not support joint dettaching.\n";
+ gzerr << "KIDO does not support joint dettaching.\n";
Joint::Detach();
}
//////////////////////////////////////////////////
-void DARTJoint::SetAnchor(unsigned int /*_index*/,
+void KIDOJoint::SetAnchor(unsigned int /*_index*/,
const gazebo::math::Vector3 &/*_anchor*/)
{
- // nothing to do here for DART.
+ // nothing to do here for KIDO.
}
//////////////////////////////////////////////////
-void DARTJoint::SetDamping(unsigned int _index, double _damping)
+void KIDOJoint::SetDamping(unsigned int _index, double _damping)
{
if (_index < this->GetAngleCount())
{
@@ -211,7 +211,7 @@ void DARTJoint::SetDamping(unsigned int _index, double _damping)
}
//////////////////////////////////////////////////
-void DARTJoint::SetStiffness(unsigned int _index, const double _stiffness)
+void KIDOJoint::SetStiffness(unsigned int _index, const double _stiffness)
{
if (_index < this->GetAngleCount())
{
@@ -220,7 +220,7 @@ void DARTJoint::SetStiffness(unsigned int _index, const double _stiffness)
}
else
{
- gzerr << "DARTJoint::SetStiffness: index[" << _index
+ gzerr << "KIDOJoint::SetStiffness: index[" << _index
<< "] is out of bounds (GetAngleCount() = "
<< this->GetAngleCount() << ").\n";
return;
@@ -228,7 +228,7 @@ void DARTJoint::SetStiffness(unsigned int _index, const double _stiffness)
}
//////////////////////////////////////////////////
-void DARTJoint::SetStiffnessDamping(unsigned int _index,
+void KIDOJoint::SetStiffnessDamping(unsigned int _index,
double _stiffness, double _damping, double _reference)
{
if (_index < this->GetAngleCount())
@@ -255,7 +255,7 @@ void DARTJoint::SetStiffnessDamping(unsigned int _index,
this->dataPtr->dtJoint->setDampingCoefficient(
static_cast<int>(_index), _damping);
this->applyDamping = physics::Joint::ConnectJointUpdate(
- boost::bind(&DARTJoint::ApplyDamping, this));
+ boost::bind(&KIDOJoint::ApplyDamping, this));
}
else
{
@@ -272,7 +272,7 @@ void DARTJoint::SetStiffnessDamping(unsigned int _index,
}
//////////////////////////////////////////////////
-bool DARTJoint::SetHighStop(unsigned int _index, const math::Angle &_angle)
+bool KIDOJoint::SetHighStop(unsigned int _index, const math::Angle &_angle)
{
switch (_index)
{
@@ -288,7 +288,7 @@ bool DARTJoint::SetHighStop(unsigned int _index, const math::Angle &_angle)
}
//////////////////////////////////////////////////
-bool DARTJoint::SetLowStop(unsigned int _index, const math::Angle &_angle)
+bool KIDOJoint::SetLowStop(unsigned int _index, const math::Angle &_angle)
{
switch (_index)
{
@@ -304,7 +304,7 @@ bool DARTJoint::SetLowStop(unsigned int _index, const math::Angle &_angle)
}
//////////////////////////////////////////////////
-math::Angle DARTJoint::GetHighStop(unsigned int _index)
+math::Angle KIDOJoint::GetHighStop(unsigned int _index)
{
switch (_index)
{
@@ -320,7 +320,7 @@ math::Angle DARTJoint::GetHighStop(unsigned int _index)
}
//////////////////////////////////////////////////
-math::Angle DARTJoint::GetLowStop(unsigned int _index)
+math::Angle KIDOJoint::GetLowStop(unsigned int _index)
{
switch (_index)
{
@@ -336,21 +336,21 @@ math::Angle DARTJoint::GetLowStop(unsigned int _index)
}
//////////////////////////////////////////////////
-math::Vector3 DARTJoint::GetLinkForce(unsigned int _index) const
+math::Vector3 KIDOJoint::GetLinkForce(unsigned int _index) const
{
math::Vector3 result;
if (!this->dataPtr->dtJoint)
{
- gzerr << "DART joint is invalid\n";
+ gzerr << "KIDO joint is invalid\n";
return result;
}
//---------------------------------------------
// Parent and child link information
//---------------------------------------------
- DARTLinkPtr theChildLink =
- boost::static_pointer_cast<DARTLink>(this->childLink);
+ KIDOLinkPtr theChildLink =
+ boost::static_pointer_cast<KIDOLink>(this->childLink);
Eigen::Vector6d F1 = Eigen::Vector6d::Zero();
Eigen::Vector6d F2 = Eigen::Vector6d::Zero();
@@ -361,17 +361,17 @@ math::Vector3 DARTJoint::GetLinkForce(unsigned int _index) const
// the parent Link frame.
if (theChildLink != NULL)
{
- dart::dynamics::BodyNode *dartChildBody = theChildLink->GetDARTBodyNode();
- GZ_ASSERT(dartChildBody, "dartChildBody pointer is NULL");
- F2 = -dart::math::dAdT(
+ kido::dynamics::BodyNode *kidoChildBody = theChildLink->GetKIDOBodyNode();
+ GZ_ASSERT(kidoChildBody, "kidoChildBody pointer is NULL");
+ F2 = -kido::math::dAdT(
this->dataPtr->dtJoint->getTransformFromChildBodyNode(),
- dartChildBody->getBodyForce());
+ kidoChildBody->getBodyForce());
}
// JointWrench.body2Force contains
// the force applied by the child Link on the Joint specified
// in the child Link frame.
- F1 = -dart::math::dAdInvR(T12, F2);
+ F1 = -kido::math::dAdInvR(T12, F2);
if (_index == 0)
result.Set(F1(3), F1(4), F1(5));
@@ -382,19 +382,19 @@ math::Vector3 DARTJoint::GetLinkForce(unsigned int _index) const
}
//////////////////////////////////////////////////
-math::Vector3 DARTJoint::GetLinkTorque(unsigned int _index) const
+math::Vector3 KIDOJoint::GetLinkTorque(unsigned int _index) const
{
math::Vector3 result;
if (!this->dataPtr->dtJoint)
{
- gzerr << "DART joint is invalid\n";
+ gzerr << "KIDO joint is invalid\n";
return result;
}
// Parent and child link information
- DARTLinkPtr theChildLink =
- boost::static_pointer_cast<DARTLink>(this->childLink);
+ KIDOLinkPtr theChildLink =
+ boost::static_pointer_cast<KIDOLink>(this->childLink);
Eigen::Vector6d F1 = Eigen::Vector6d::Zero();
Eigen::Vector6d F2 = Eigen::Vector6d::Zero();
@@ -405,17 +405,17 @@ math::Vector3 DARTJoint::GetLinkTorque(unsigned int _index) const
// the parent Link frame.
if (theChildLink != NULL)
{
- dart::dynamics::BodyNode *dartChildBody = theChildLink->GetDARTBodyNode();
- GZ_ASSERT(dartChildBody, "dartChildBody pointer is NULL");
- F2 = -dart::math::dAdT(
+ kido::dynamics::BodyNode *kidoChildBody = theChildLink->GetKIDOBodyNode();
+ GZ_ASSERT(kidoChildBody, "kidoChildBody pointer is NULL");
+ F2 = -kido::math::dAdT(
this->dataPtr->dtJoint->getTransformFromChildBodyNode(),
- dartChildBody->getBodyForce());
+ kidoChildBody->getBodyForce());
}
// JointWrench.body2Force contains
// the force applied by the child Link on the Joint specified
// in the child Link frame.
- F1 = -dart::math::dAdInvR(T12, F2);
+ F1 = -kido::math::dAdInvR(T12, F2);
if (_index == 0)
result.Set(F1(0), F1(1), F1(2));
@@ -426,7 +426,7 @@ math::Vector3 DARTJoint::GetLinkTorque(unsigned int _index) const
}
//////////////////////////////////////////////////
-bool DARTJoint::SetParam(const std::string &_key, unsigned int _index,
+bool KIDOJoint::SetParam(const std::string &_key, unsigned int _index,
const boost::any &_value)
{
// try because boost::any_cast can throw
@@ -463,7 +463,7 @@ bool DARTJoint::SetParam(const std::string &_key, unsigned int _index,
}
//////////////////////////////////////////////////
-double DARTJoint::GetParam(const std::string &_key, unsigned int _index)
+double KIDOJoint::GetParam(const std::string &_key, unsigned int _index)
{
try
{
@@ -483,21 +483,21 @@ double DARTJoint::GetParam(const std::string &_key, unsigned int _index)
}
//////////////////////////////////////////////////
-void DARTJoint::CacheForceTorque()
+void KIDOJoint::CacheForceTorque()
{
// Does nothing for now, will add when recovering pull request #1721
}
//////////////////////////////////////////////////
-JointWrench DARTJoint::GetForceTorque(unsigned int /*_index*/)
+JointWrench KIDOJoint::GetForceTorque(unsigned int /*_index*/)
{
JointWrench jointWrench;
//---------------------------------------------
// Parent and child link information
//---------------------------------------------
- DARTLinkPtr theChildLink =
- boost::static_pointer_cast<DARTLink>(this->childLink);
+ KIDOLinkPtr theChildLink =
+ boost::static_pointer_cast<KIDOLink>(this->childLink);
Eigen::Vector6d F1 = Eigen::Vector6d::Zero();
Eigen::Vector6d F2 = Eigen::Vector6d::Zero();
@@ -508,19 +508,19 @@ JointWrench DARTJoint::GetForceTorque(unsigned int /*_index*/)
// in the child Link orientation frame and with respect to the joint origin
if (theChildLink != NULL)
{
- dart::dynamics::BodyNode *dartChildBody = theChildLink->GetDARTBodyNode();
- GZ_ASSERT(dartChildBody, "dartChildBody pointer is NULL");
+ kido::dynamics::BodyNode *kidoChildBody = theChildLink->GetKIDOBodyNode();
+ GZ_ASSERT(kidoChildBody, "kidoChildBody pointer is NULL");
Eigen::Isometry3d TJ2 = Eigen::Isometry3d::Identity();
TJ2.translation() =
this->dataPtr->dtJoint->getTransformFromChildBodyNode().translation();
- F2 = -dart::math::dAdT(TJ2,
- dartChildBody->getBodyForce());
+ F2 = -kido::math::dAdT(TJ2,
+ kidoChildBody->getBodyForce());
}
// JointWrench.body1Force (F1) contains the
// force applied by the parent Link on the child Link specified in
// the parent Link orientation frame and with respect to the joint origin
- F1 = -dart::math::dAdInvR(T12, F2);
+ F1 = -kido::math::dAdInvR(T12, F2);
// kind of backwards here, body1 (parent) corresponds go f2, t2
// and body2 (child) corresponds go f1, t1
@@ -533,7 +533,7 @@ JointWrench DARTJoint::GetForceTorque(unsigned int /*_index*/)
}
/////////////////////////////////////////////////
-void DARTJoint::SetForce(unsigned int _index, double _force)
+void KIDOJoint::SetForce(unsigned int _index, double _force)
{
double force = Joint::CheckAndTruncateForce(_index, _force);
this->SaveForce(_index, force);
@@ -547,7 +547,7 @@ void DARTJoint::SetForce(unsigned int _index, double _force)
}
/////////////////////////////////////////////////
-double DARTJoint::GetForce(unsigned int _index)
+double KIDOJoint::GetForce(unsigned int _index)
{
if (_index < this->GetAngleCount())
{
@@ -562,7 +562,7 @@ double DARTJoint::GetForce(unsigned int _index)
}
/////////////////////////////////////////////////
-unsigned int DARTJoint::GetAngleCount() const
+unsigned int KIDOJoint::GetAngleCount() const
{
unsigned int angleCount = 0;
@@ -572,32 +572,32 @@ unsigned int DARTJoint::GetAngleCount() const
}
/////////////////////////////////////////////////
-void DARTJoint::ApplyDamping()
+void KIDOJoint::ApplyDamping()
{
// rename ApplyDamping to ApplyStiffnessDamping (below) in gazebo 4.0.
// public: virtual void ApplyStiffnessDamping();
- // DART applies stiffness and damping force implicitly itself by setting
+ // KIDO applies stiffness and damping force implicitly itself by setting
// the stiffness coefficient and the damping coefficient using
- // dart::dynamics::Joint::setSpringStiffness(index, stiffnessCoeff) and
- // dart::dynamics::Joint::setDampingCoefficient(index, dampingCoeff).
+ // kido::dynamics::Joint::setSpringStiffness(index, stiffnessCoeff) and
+ // kido::dynamics::Joint::setDampingCoefficient(index, dampingCoeff).
// Therefore, we do nothing here.
}
/////////////////////////////////////////////////
-DARTModelPtr DARTJoint::GetDARTModel() const
+KIDOModelPtr KIDOJoint::GetKIDOModel() const
{
- return boost::dynamic_pointer_cast<DARTModel>(this->model);
+ return boost::dynamic_pointer_cast<KIDOModel>(this->model);
}
/////////////////////////////////////////////////
-dart::dynamics::Joint *DARTJoint::GetDARTJoint()
+kido::dynamics::Joint *KIDOJoint::GetKIDOJoint()
{
return this->dataPtr->dtJoint;
}
/////////////////////////////////////////////////
-void DARTJoint::SaveForce(unsigned int _index, double _force)
+void KIDOJoint::SaveForce(unsigned int _index, double _force)
{
// this bit of code actually doesn't do anything physical,
// it simply records the forces commanded inside forceApplied.
diff --git a/gazebo/physics/dart/DARTJoint.hh b/gazebo/physics/kido/KIDOJoint.hh
similarity index 86%
rename from gazebo/physics/dart/DARTJoint.hh
rename to gazebo/physics/kido/KIDOJoint.hh
index 027b161..b339a33 100644
--- a/gazebo/physics/dart/DARTJoint.hh
+++ b/gazebo/physics/kido/KIDOJoint.hh
@@ -15,16 +15,16 @@
*
*/
-#ifndef _GAZEBO_DARTJOINT_HH_
-#define _GAZEBO_DARTJOINT_HH_
+#ifndef _GAZEBO_KIDOJOINT_HH_
+#define _GAZEBO_KIDOJOINT_HH_
#include <boost/any.hpp>
#include <string>
#include "gazebo/common/Exception.hh"
#include "gazebo/physics/Joint.hh"
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTPhysics.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
#include "gazebo/util/system.hh"
namespace gazebo
@@ -32,20 +32,20 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTJointPrivate;
+ class KIDOJointPrivate;
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \brief DART joint interface
- class GZ_PHYSICS_VISIBLE DARTJoint : public Joint
+ /// \brief KIDO joint interface
+ class GZ_PHYSICS_VISIBLE KIDOJoint : public Joint
{
/// \brief Constructor.
/// \param[in] _parent Parent of the Joint.
- public: DARTJoint(BasePtr _parent);
+ public: KIDOJoint(BasePtr _parent);
/// \brief Destructor.
- public: virtual ~DARTJoint();
+ public: virtual ~KIDOJoint();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
@@ -146,17 +146,17 @@ namespace gazebo
/// \param[in] _force Force value.
private: void SaveForce(unsigned int _index, double _force);
- /// \brief Get DART model pointer.
- /// \return A pointer to the DART model.
- public: DARTModelPtr GetDARTModel() const;
+ /// \brief Get KIDO model pointer.
+ /// \return A pointer to the KIDO model.
+ public: KIDOModelPtr GetKIDOModel() const;
- /// \brief Get DART joint pointer.
- /// \return A pointer to the DART joint.
- public: dart::dynamics::Joint *GetDARTJoint();
+ /// \brief Get KIDO joint pointer.
+ /// \return A pointer to the KIDO joint.
+ public: kido::dynamics::Joint *GetKIDOJoint();
/// \internal
/// \brief Pointer to private data
- protected: DARTJointPrivate *dataPtr;
+ protected: KIDOJointPrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTJointPrivate.hh b/gazebo/physics/kido/KIDOJointPrivate.hh
similarity index 66%
rename from gazebo/physics/dart/DARTJointPrivate.hh
rename to gazebo/physics/kido/KIDOJointPrivate.hh
index 886a827..0f2c884 100644
--- a/gazebo/physics/dart/DARTJointPrivate.hh
+++ b/gazebo/physics/kido/KIDOJointPrivate.hh
@@ -15,54 +15,54 @@
*
*/
-#ifndef _GAZEBO_DARTJOINT_PRIVATE_HH_
-#define _GAZEBO_DARTJOINT_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOJOINT_PRIVATE_HH_
+#define _GAZEBO_KIDOJOINT_PRIVATE_HH_
#include "gazebo/common/Time.hh"
#include "gazebo/physics/Joint.hh"
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTJoint
- class DARTJointPrivate
+ /// \brief Private data class for KIDOJoint
+ class KIDOJointPrivate
{
/// \brief Constructor
- public: DARTJointPrivate(const DARTPhysicsPtr &_dartPhysicsEngine)
+ public: KIDOJointPrivate(const KIDOPhysicsPtr &_kidoPhysicsEngine)
: forceApplied {0.0, 0.0},
forceAppliedTime(),
- dartPhysicsEngine(_dartPhysicsEngine),
+ kidoPhysicsEngine(_kidoPhysicsEngine),
dtJoint(NULL),
dtChildBodyNode(NULL)
{
}
/// \brief Default destructor
- public: ~DARTJointPrivate() = default;
+ public: ~KIDOJointPrivate() = default;
/// \brief Save force applied by user
/// This plus the joint feedback (joint contstraint forces) is the
/// equivalent of simulated force torque sensor reading
/// Allocate a 2 vector in case hinge2 joint is used.
- /// This is used by DART to store external force applied by the user.
+ /// This is used by KIDO to store external force applied by the user.
public: double forceApplied[MAX_JOINT_AXIS];
/// \brief Save time at which force is applied by user
/// This will let us know if it's time to clean up forceApplied.
public: common::Time forceAppliedTime;
- /// \brief DARTPhysics engine pointer
- public: DARTPhysicsPtr dartPhysicsEngine;
+ /// \brief KIDOPhysics engine pointer
+ public: KIDOPhysicsPtr kidoPhysicsEngine;
- /// \brief DART joint pointer
- public: dart::dynamics::Joint *dtJoint;
+ /// \brief KIDO joint pointer
+ public: kido::dynamics::Joint *dtJoint;
- /// \brief DART child body node pointer
- public: dart::dynamics::BodyNode *dtChildBodyNode;
+ /// \brief KIDO child body node pointer
+ public: kido::dynamics::BodyNode *dtChildBodyNode;
};
}
}
diff --git a/gazebo/physics/dart/DARTLink.cc b/gazebo/physics/kido/KIDOLink.cc
similarity index 66%
rename from gazebo/physics/dart/DARTLink.cc
rename to gazebo/physics/kido/KIDOLink.cc
index 2817740..a9a665c 100644
--- a/gazebo/physics/dart/DARTLink.cc
+++ b/gazebo/physics/kido/KIDOLink.cc
@@ -22,44 +22,44 @@
#include "gazebo/physics/World.hh"
#include "gazebo/physics/WorldPrivate.hh"
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTModel.hh"
-#include "gazebo/physics/dart/DARTLink.hh"
-#include "gazebo/physics/dart/DARTJoint.hh"
-#include "gazebo/physics/dart/DARTSurfaceParams.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDOModel.hh"
+#include "gazebo/physics/kido/KIDOLink.hh"
+#include "gazebo/physics/kido/KIDOJoint.hh"
+#include "gazebo/physics/kido/KIDOSurfaceParams.hh"
-#include "gazebo/physics/dart/DARTLinkPrivate.hh"
+#include "gazebo/physics/kido/KIDOLinkPrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTLink::DARTLink(EntityPtr _parent)
- : Link(_parent), dataPtr(new DARTLinkPrivate())
+KIDOLink::KIDOLink(EntityPtr _parent)
+ : Link(_parent), dataPtr(new KIDOLinkPrivate())
{
}
//////////////////////////////////////////////////
-DARTLink::~DARTLink()
+KIDOLink::~KIDOLink()
{
delete this->dataPtr;
this->dataPtr = nullptr;
}
//////////////////////////////////////////////////
-void DARTLink::Load(sdf::ElementPtr _sdf)
+void KIDOLink::Load(sdf::ElementPtr _sdf)
{
- this->dataPtr->dartPhysics = boost::dynamic_pointer_cast<DARTPhysics>(
+ this->dataPtr->kidoPhysics = boost::dynamic_pointer_cast<KIDOPhysics>(
this->GetWorld()->GetPhysicsEngine());
- if (this->dataPtr->dartPhysics == NULL)
- gzthrow("Not using the dart physics engine");
+ if (this->dataPtr->kidoPhysics == NULL)
+ gzthrow("Not using the kido physics engine");
// Check if soft_contact element is contained in this link. If so,
// SoftBodyNode will be created. Otherwise, BodyNode will be created.
- sdf::ElementPtr dartElem;
+ sdf::ElementPtr kidoElem;
sdf::ElementPtr softCollElem;
sdf::ElementPtr softGeomElem;
@@ -82,15 +82,15 @@ void DARTLink::Load(sdf::ElementPtr _sdf)
sdf::ElementPtr softContactElem
= surfaceElem->GetElement("soft_contact");
- if (softContactElem->HasElement("dart"))
+ if (softContactElem->HasElement("kido"))
{
- if (dartElem != NULL)
+ if (kidoElem != NULL)
{
- gzerr << "DART supports only one deformable body in a link.\n";
+ gzerr << "KIDO supports only one deformable body in a link.\n";
break;
}
- dartElem = softContactElem->GetElement("dart");
+ kidoElem = softContactElem->GetElement("kido");
softCollElem = collElem;
softGeomElem = geomElem;
}
@@ -101,33 +101,33 @@ void DARTLink::Load(sdf::ElementPtr _sdf)
}
}
- if (dartElem != NULL)
+ if (kidoElem != NULL)
{
- // Create DART SoftBodyNode
- dart::dynamics::SoftBodyNode *dtSoftBodyNode
- = new dart::dynamics::SoftBodyNode();
+ // Create KIDO SoftBodyNode
+ kido::dynamics::SoftBodyNode *dtSoftBodyNode
+ = new kido::dynamics::SoftBodyNode();
// Mass
- double fleshMassFraction = dartElem->Get<double>("flesh_mass_fraction");
+ double fleshMassFraction = kidoElem->Get<double>("flesh_mass_fraction");
// bone_attachment (Kv)
- if (dartElem->HasElement("bone_attachment"))
+ if (kidoElem->HasElement("bone_attachment"))
{
- double kv = dartElem->Get<double>("bone_attachment");
+ double kv = kidoElem->Get<double>("bone_attachment");
dtSoftBodyNode->setVertexSpringStiffness(kv);
}
// stiffness (Ke)
- if (dartElem->HasElement("stiffness"))
+ if (kidoElem->HasElement("stiffness"))
{
- double ke = dartElem->Get<double>("stiffness");
+ double ke = kidoElem->Get<double>("stiffness");
dtSoftBodyNode->setEdgeSpringStiffness(ke);
}
// damping
- if (dartElem->HasElement("damping"))
+ if (kidoElem->HasElement("damping"))
{
- double damping = dartElem->Get<double>("damping");
+ double damping = kidoElem->Get<double>("damping");
dtSoftBodyNode->setDampingCoefficient(damping);
}
@@ -136,7 +136,7 @@ void DARTLink::Load(sdf::ElementPtr _sdf)
gzdbg << "pose" << T.matrix() << std::endl;
if (softCollElem->HasElement("pose"))
{
- T = DARTTypes::ConvPose(softCollElem->Get<math::Pose>("pose"));
+ T = KIDOTypes::ConvPose(softCollElem->Get<math::Pose>("pose"));
}
// geometry
@@ -144,23 +144,23 @@ void DARTLink::Load(sdf::ElementPtr _sdf)
{
sdf::ElementPtr boxEle = softGeomElem->GetElement("box");
Eigen::Vector3d size
- = DARTTypes::ConvVec3(boxEle->Get<math::Vector3>("size"));
- dart::dynamics::SoftBodyNodeHelper::setBox(
+ = KIDOTypes::ConvVec3(boxEle->Get<math::Vector3>("size"));
+ kido::dynamics::SoftBodyNodeHelper::setBox(
dtSoftBodyNode, size, T, fleshMassFraction);
dtSoftBodyNode->addCollisionShape(
- new dart::dynamics::SoftMeshShape(dtSoftBodyNode));
+ new kido::dynamics::SoftMeshShape(dtSoftBodyNode));
}
// else if (geomElem->HasElement("ellipsoid"))
// {
// sdf::ElementPtr ellipsoidEle = geomElem->GetElement("ellipsoid");
// Eigen::Vector3d size
-// = DARTTypes::ConvVec3(ellipsoidEle->Get<math::Vector3>("size"));
+// = KIDOTypes::ConvVec3(ellipsoidEle->Get<math::Vector3>("size"));
// double nSlices = ellipsoidEle->Get<double>("num_slices");
// double nStacks = ellipsoidEle->Get<double>("num_stacks");
-// dart::dynamics::SoftBodyNodeHelper::setEllipsoid(
+// kido::dynamics::SoftBodyNodeHelper::setEllipsoid(
// dtSoftBodyNode, size, nSlices, nStacks, fleshMassFraction);
// dtSoftBodyNode->addCollisionShape(
-// new dart::dynamics::SoftMeshShape(dtSoftBodyNode));
+// new kido::dynamics::SoftMeshShape(dtSoftBodyNode));
// }
else
{
@@ -171,15 +171,15 @@ void DARTLink::Load(sdf::ElementPtr _sdf)
}
else
{
- // Create DART BodyNode
- this->dataPtr->dtBodyNode = new dart::dynamics::BodyNode();
+ // Create KIDO BodyNode
+ this->dataPtr->dtBodyNode = new kido::dynamics::BodyNode();
}
Link::Load(_sdf);
}
//////////////////////////////////////////////////
-void DARTLink::Init()
+void KIDOLink::Init()
{
Link::Init();
@@ -205,7 +205,7 @@ void DARTLink::Init()
// COG offset
math::Vector3 cog = this->inertial->GetCoG();
- this->dataPtr->dtBodyNode->setLocalCOM(DARTTypes::ConvVec3(cog));
+ this->dataPtr->dtBodyNode->setLocalCOM(KIDOTypes::ConvVec3(cog));
// Gravity mode
this->SetGravityMode(this->sdf->Get<bool>("gravity"));
@@ -214,14 +214,14 @@ void DARTLink::Init()
/// \todo FIXME: Friction Parameters
/// Gazebo allows different friction parameters per collision objects,
- /// while DART stores the friction parameter per link (BodyNode in DART). For
+ /// while KIDO stores the friction parameter per link (BodyNode in KIDO). For
/// now, the average friction parameter of all the child collision objects is
/// stored in this->dataPtr->dtBodyNode.
- /// Final friction coefficient is applied in DART's constraint solver by
+ /// Final friction coefficient is applied in KIDO's constraint solver by
/// taking the lower of the 2 colliding rigidLink's.
/// See also:
- /// - https://github.com/dartsim/dart/issues/141
- /// - https://github.com/dartsim/dart/issues/266
+ /// - https://github.com/kidosim/kido/issues/141
+ /// - https://github.com/kidosim/kido/issues/266
double hackAvgMu1 = 0;
double hackAvgMu2 = 0;
@@ -250,19 +250,19 @@ void DARTLink::Init()
this->dataPtr->dtBodyNode->setFrictionCoeff(0.5 * (hackAvgMu1 + hackAvgMu2));
- // We don't add dart body node to the skeleton here because dart body node
+ // We don't add kido body node to the skeleton here because kido body node
// should be set its parent joint before being added. This body node will be
- // added to the skeleton in DARTModel::Init().
+ // added to the skeleton in KIDOModel::Init().
}
//////////////////////////////////////////////////
-void DARTLink::Fini()
+void KIDOLink::Fini()
{
Link::Fini();
}
/////////////////////////////////////////////////////////////////////
-void DARTLink::UpdateMass()
+void KIDOLink::UpdateMass()
{
if (this->dataPtr->dtBodyNode && this->inertial)
{
@@ -272,30 +272,30 @@ void DARTLink::UpdateMass()
this->dataPtr->dtBodyNode->setMomentOfInertia(
Ixxyyzz[0], Ixxyyzz[1], Ixxyyzz[2],
Ixyxzyz[0], Ixyxzyz[1], Ixyxzyz[2]);
- auto cog = DARTTypes::ConvVec3(this->inertial->GetCoG());
+ auto cog = KIDOTypes::ConvVec3(this->inertial->GetCoG());
this->dataPtr->dtBodyNode->setLocalCOM(cog);
}
}
//////////////////////////////////////////////////
-void DARTLink::OnPoseChange()
+void KIDOLink::OnPoseChange()
{
Link::OnPoseChange();
- // DART body node always have its parent joint.
- dart::dynamics::Joint *joint = this->dataPtr->dtBodyNode->getParentJoint();
+ // KIDO body node always have its parent joint.
+ kido::dynamics::Joint *joint = this->dataPtr->dtBodyNode->getParentJoint();
- // This is for the case this function called before DARTModel::Init() is
+ // This is for the case this function called before KIDOModel::Init() is
// called.
if (joint == NULL)
return;
- dart::dynamics::FreeJoint *freeJoint =
- dynamic_cast<dart::dynamics::FreeJoint*>(joint);
+ kido::dynamics::FreeJoint *freeJoint =
+ dynamic_cast<kido::dynamics::FreeJoint*>(joint);
if (freeJoint)
{
// If the parent joint is free joint, set the 6 dof to fit the target pose.
- const Eigen::Isometry3d &W = DARTTypes::ConvPose(this->GetWorldPose());
+ const Eigen::Isometry3d &W = KIDOTypes::ConvPose(this->GetWorldPose());
const Eigen::Isometry3d &T1 = joint->getTransformFromParentBodyNode();
const Eigen::Isometry3d &InvT2 = joint->getTransformFromChildBodyNode();
Eigen::Isometry3d P = Eigen::Isometry3d::Identity();
@@ -307,24 +307,24 @@ void DARTLink::OnPoseChange()
// Convert homogeneous transformation matrix to 6-dimensional generalized
// coordinates. There are several ways of conversions. Here is the way of
- // DART. The orientation part is converted by using logarithm map, which
+ // KIDO. The orientation part is converted by using logarithm map, which
// maps SO(3) to so(3), and it takes the first three components of the
// generalized coordinates. On the other hand, the position part just takes
// the last three components of the generalized coordinates without any
// conversion.
Eigen::Vector6d q;
- q.head<3>() = dart::math::logMap(Q.linear());
+ q.head<3>() = kido::math::logMap(Q.linear());
q.tail<3>() = Q.translation();
freeJoint->setPositions(q);
// TODO: The above 4 lines will be reduced to single line as:
// freeJoint->setPositions(FreeJoint::convertToPositions(Q));
// after the following PR is merged:
- // https://github.com/dartsim/dart/pull/322
+ // https://github.com/kidosim/kido/pull/322
// Update all the transformations of the links in the parent model.
freeJoint->getSkeleton()->computeForwardKinematics(true, false, false);
// TODO: This kinematic updating will be done automatically after pull
- // request (https://github.com/dartsim/dart/pull/319) is merged so that
+ // request (https://github.com/kidosim/kido/pull/319) is merged so that
// we don't need this line anymore.
}
else
@@ -335,44 +335,44 @@ void DARTLink::OnPoseChange()
}
//////////////////////////////////////////////////
-void DARTLink::SetEnabled(bool /*_enable*/) const
+void KIDOLink::SetEnabled(bool /*_enable*/) const
{
- // TODO: DART does not support this functionality.
+ // TODO: KIDO does not support this functionality.
}
//////////////////////////////////////////////////
-bool DARTLink::GetEnabled() const
+bool KIDOLink::GetEnabled() const
{
- // TODO: DART does not support this functionality.
+ // TODO: KIDO does not support this functionality.
return true;
}
//////////////////////////////////////////////////
-void DARTLink::SetLinearVel(const math::Vector3 &_vel)
+void KIDOLink::SetLinearVel(const math::Vector3 &_vel)
{
- // DART body node always have its parent joint.
- dart::dynamics::Joint *joint = this->dataPtr->dtBodyNode->getParentJoint();
+ // KIDO body node always have its parent joint.
+ kido::dynamics::Joint *joint = this->dataPtr->dtBodyNode->getParentJoint();
- // This is for the case this function called before DARTModel::Init() is
+ // This is for the case this function called before KIDOModel::Init() is
// called.
if (joint == NULL)
{
- gzerr << "DARTModel::Init() should be called first.\n";
+ gzerr << "KIDOModel::Init() should be called first.\n";
return;
}
// Check if the parent joint is free joint
- dart::dynamics::FreeJoint *freeJoint =
- dynamic_cast<dart::dynamics::FreeJoint*>(joint);
+ kido::dynamics::FreeJoint *freeJoint =
+ dynamic_cast<kido::dynamics::FreeJoint*>(joint);
// If the parent joint is free joint, set the proper generalized velocity to
// fit the linear velocity of the link
if (freeJoint)
{
// Generalized velocities
- Eigen::Vector3d genVel = DARTTypes::ConvVec3(_vel);
+ Eigen::Vector3d genVel = KIDOTypes::ConvVec3(_vel);
- dart::dynamics::BodyNode *dtBodyNode = this->dataPtr->dtBodyNode;
+ kido::dynamics::BodyNode *dtBodyNode = this->dataPtr->dtBodyNode;
// If this link has parent link then subtract the effect of parent link's
// linear and angular velocities
@@ -412,37 +412,37 @@ void DARTLink::SetLinearVel(const math::Vector3 &_vel)
}
else
{
- gzdbg << "DARTLink::SetLinearVel() doesn't make sense if the parent joint "
+ gzdbg << "KIDOLink::SetLinearVel() doesn't make sense if the parent joint "
<< "is not free joint (6-dof).\n";
}
}
//////////////////////////////////////////////////
-void DARTLink::SetAngularVel(const math::Vector3 &_vel)
+void KIDOLink::SetAngularVel(const math::Vector3 &_vel)
{
- // DART body node always have its parent joint.
- dart::dynamics::Joint *joint = this->dataPtr->dtBodyNode->getParentJoint();
+ // KIDO body node always have its parent joint.
+ kido::dynamics::Joint *joint = this->dataPtr->dtBodyNode->getParentJoint();
- // This is for the case this function called before DARTModel::Init() is
+ // This is for the case this function called before KIDOModel::Init() is
// called.
if (joint == NULL)
{
- gzerr << "DARTModel::Init() should be called first.\n";
+ gzerr << "KIDOModel::Init() should be called first.\n";
return;
}
// Check if the parent joint is free joint
- dart::dynamics::FreeJoint *freeJoint =
- dynamic_cast<dart::dynamics::FreeJoint*>(joint);
+ kido::dynamics::FreeJoint *freeJoint =
+ dynamic_cast<kido::dynamics::FreeJoint*>(joint);
// If the parent joint is free joint, set the proper generalized velocity to
// fit the linear velocity of the link
if (freeJoint)
{
// Generalized velocities
- Eigen::Vector3d genVel = DARTTypes::ConvVec3(_vel);
+ Eigen::Vector3d genVel = KIDOTypes::ConvVec3(_vel);
- dart::dynamics::BodyNode *dtBodyNode = this->dataPtr->dtBodyNode;
+ kido::dynamics::BodyNode *dtBodyNode = this->dataPtr->dtBodyNode;
// If this link has parent link then subtract the effect of parent link's
// linear and angular velocities
@@ -478,129 +478,129 @@ void DARTLink::SetAngularVel(const math::Vector3 &_vel)
}
else
{
- gzdbg << "DARTLink::SetLinearVel() doesn't make sense if the parent joint "
+ gzdbg << "KIDOLink::SetLinearVel() doesn't make sense if the parent joint "
<< "is not free joint (6-dof).\n";
}
}
//////////////////////////////////////////////////
-void DARTLink::SetForce(const math::Vector3 &_force)
+void KIDOLink::SetForce(const math::Vector3 &_force)
{
- // DART assume that _force is external force.
- this->dataPtr->dtBodyNode->setExtForce(DARTTypes::ConvVec3(_force));
+ // KIDO assume that _force is external force.
+ this->dataPtr->dtBodyNode->setExtForce(KIDOTypes::ConvVec3(_force));
}
//////////////////////////////////////////////////
-void DARTLink::SetTorque(const math::Vector3 &_torque)
+void KIDOLink::SetTorque(const math::Vector3 &_torque)
{
- // DART assume that _torque is external torque.
- this->dataPtr->dtBodyNode->setExtTorque(DARTTypes::ConvVec3(_torque));
+ // KIDO assume that _torque is external torque.
+ this->dataPtr->dtBodyNode->setExtTorque(KIDOTypes::ConvVec3(_torque));
}
//////////////////////////////////////////////////
-void DARTLink::AddForce(const math::Vector3 &_force)
+void KIDOLink::AddForce(const math::Vector3 &_force)
{
- this->dataPtr->dtBodyNode->addExtForce(DARTTypes::ConvVec3(_force));
+ this->dataPtr->dtBodyNode->addExtForce(KIDOTypes::ConvVec3(_force));
}
/////////////////////////////////////////////////
-void DARTLink::AddRelativeForce(const math::Vector3 &_force)
+void KIDOLink::AddRelativeForce(const math::Vector3 &_force)
{
- this->dataPtr->dtBodyNode->addExtForce(DARTTypes::ConvVec3(_force),
+ this->dataPtr->dtBodyNode->addExtForce(KIDOTypes::ConvVec3(_force),
Eigen::Vector3d::Zero(),
true, true);
}
/////////////////////////////////////////////////
-void DARTLink::AddForceAtWorldPosition(const math::Vector3 &_force,
+void KIDOLink::AddForceAtWorldPosition(const math::Vector3 &_force,
const math::Vector3 &_pos)
{
- this->dataPtr->dtBodyNode->addExtForce(DARTTypes::ConvVec3(_pos),
- DARTTypes::ConvVec3(_force),
+ this->dataPtr->dtBodyNode->addExtForce(KIDOTypes::ConvVec3(_pos),
+ KIDOTypes::ConvVec3(_force),
false, false);
}
/////////////////////////////////////////////////
-void DARTLink::AddForceAtRelativePosition(const math::Vector3 &_force,
+void KIDOLink::AddForceAtRelativePosition(const math::Vector3 &_force,
const math::Vector3 &_relpos)
{
- this->dataPtr->dtBodyNode->addExtForce(DARTTypes::ConvVec3(_force),
- DARTTypes::ConvVec3(_relpos),
+ this->dataPtr->dtBodyNode->addExtForce(KIDOTypes::ConvVec3(_force),
+ KIDOTypes::ConvVec3(_relpos),
true, true);
}
//////////////////////////////////////////////////
-void DARTLink::AddLinkForce(const math::Vector3 &/*_force*/,
+void KIDOLink::AddLinkForce(const math::Vector3 &/*_force*/,
const math::Vector3 &/*_offset*/)
{
- gzlog << "DARTLink::AddLinkForce not yet implemented (issue #1477)."
+ gzlog << "KIDOLink::AddLinkForce not yet implemented (issue #1477)."
<< std::endl;
}
/////////////////////////////////////////////////
-void DARTLink::AddTorque(const math::Vector3 &_torque)
+void KIDOLink::AddTorque(const math::Vector3 &_torque)
{
- this->dataPtr->dtBodyNode->addExtTorque(DARTTypes::ConvVec3(_torque));
+ this->dataPtr->dtBodyNode->addExtTorque(KIDOTypes::ConvVec3(_torque));
}
/////////////////////////////////////////////////
-void DARTLink::AddRelativeTorque(const math::Vector3 &_torque)
+void KIDOLink::AddRelativeTorque(const math::Vector3 &_torque)
{
- this->dataPtr->dtBodyNode->addExtTorque(DARTTypes::ConvVec3(_torque), true);
+ this->dataPtr->dtBodyNode->addExtTorque(KIDOTypes::ConvVec3(_torque), true);
}
//////////////////////////////////////////////////
-gazebo::math::Vector3 DARTLink::GetWorldLinearVel(
+gazebo::math::Vector3 KIDOLink::GetWorldLinearVel(
const math::Vector3 &_offset) const
{
Eigen::Vector3d linVel =
this->dataPtr->dtBodyNode->getWorldLinearVelocity(
- DARTTypes::ConvVec3(_offset));
+ KIDOTypes::ConvVec3(_offset));
- return DARTTypes::ConvVec3(linVel);
+ return KIDOTypes::ConvVec3(linVel);
}
//////////////////////////////////////////////////
-math::Vector3 DARTLink::GetWorldLinearVel(
+math::Vector3 KIDOLink::GetWorldLinearVel(
const gazebo::math::Vector3 &_offset,
const gazebo::math::Quaternion &_q) const
{
- Eigen::Matrix3d R1 = Eigen::Matrix3d(DARTTypes::ConvQuat(_q));
- Eigen::Vector3d worldOffset = R1 * DARTTypes::ConvVec3(_offset);
+ Eigen::Matrix3d R1 = Eigen::Matrix3d(KIDOTypes::ConvQuat(_q));
+ Eigen::Vector3d worldOffset = R1 * KIDOTypes::ConvVec3(_offset);
Eigen::Vector3d bodyOffset =
this->dataPtr->dtBodyNode->getTransform().linear().transpose() *
worldOffset;
Eigen::Vector3d linVel =
this->dataPtr->dtBodyNode->getWorldLinearVelocity(bodyOffset);
- return DARTTypes::ConvVec3(linVel);
+ return KIDOTypes::ConvVec3(linVel);
}
//////////////////////////////////////////////////
-math::Vector3 DARTLink::GetWorldCoGLinearVel() const
+math::Vector3 KIDOLink::GetWorldCoGLinearVel() const
{
Eigen::Vector3d linVel = this->dataPtr->dtBodyNode->getWorldCOMVelocity();
- return DARTTypes::ConvVec3(linVel);
+ return KIDOTypes::ConvVec3(linVel);
}
//////////////////////////////////////////////////
-math::Vector3 DARTLink::GetWorldAngularVel() const
+math::Vector3 KIDOLink::GetWorldAngularVel() const
{
Eigen::Vector3d angVel = this->dataPtr->dtBodyNode->getWorldAngularVelocity();
- return DARTTypes::ConvVec3(angVel);
+ return KIDOTypes::ConvVec3(angVel);
}
/////////////////////////////////////////////////
-math::Vector3 DARTLink::GetWorldForce() const
+math::Vector3 KIDOLink::GetWorldForce() const
{
Eigen::Vector6d F = this->dataPtr->dtBodyNode->getExternalForceGlobal();
- return DARTTypes::ConvVec3(F.tail<3>());
+ return KIDOTypes::ConvVec3(F.tail<3>());
}
//////////////////////////////////////////////////
-math::Vector3 DARTLink::GetWorldTorque() const
+math::Vector3 KIDOLink::GetWorldTorque() const
{
// TODO: Need verification
math::Vector3 torque;
@@ -609,42 +609,42 @@ math::Vector3 DARTLink::GetWorldTorque() const
Eigen::Matrix6d G = this->dataPtr->dtBodyNode->getSpatialInertia();
Eigen::VectorXd V = this->dataPtr->dtBodyNode->getBodyVelocity();
Eigen::VectorXd dV = this->dataPtr->dtBodyNode->getBodyAcceleration();
- Eigen::Vector6d F = G * dV - dart::math::dad(V, G * V);
+ Eigen::Vector6d F = G * dV - kido::math::dad(V, G * V);
- torque = DARTTypes::ConvVec3(W.linear() * F.head<3>());
+ torque = KIDOTypes::ConvVec3(W.linear() * F.head<3>());
return torque;
}
//////////////////////////////////////////////////
-void DARTLink::SetGravityMode(bool _mode)
+void KIDOLink::SetGravityMode(bool _mode)
{
this->sdf->GetElement("gravity")->Set(_mode);
this->dataPtr->dtBodyNode->setGravityMode(_mode);
}
//////////////////////////////////////////////////
-bool DARTLink::GetGravityMode() const
+bool KIDOLink::GetGravityMode() const
{
return this->dataPtr->dtBodyNode->getGravityMode();
}
//////////////////////////////////////////////////
-void DARTLink::SetSelfCollide(bool _collide)
+void KIDOLink::SetSelfCollide(bool _collide)
{
this->sdf->GetElement("self_collide")->Set(_collide);
- dart::dynamics::BodyNode *dtBodyNode = this->dataPtr->dtBodyNode;
+ kido::dynamics::BodyNode *dtBodyNode = this->dataPtr->dtBodyNode;
// If this function is called before the body node is not added to a skeleton,
// the body node does not have parent skeleton. So we just return here. Self
- // collision setting will be done later in DARTModel::Init().
+ // collision setting will be done later in KIDOModel::Init().
if (dtBodyNode->getSkeleton() == NULL)
return;
- dart::simulation::World *dtWorld = this->dataPtr->dartPhysics->GetDARTWorld();
- dart::dynamics::Skeleton *dtSkeleton = dtBodyNode->getSkeleton();
- dart::collision::CollisionDetector *dtCollDet =
+ kido::simulation::World *dtWorld = this->dataPtr->kidoPhysics->GetKIDOWorld();
+ kido::dynamics::Skeleton *dtSkeleton = dtBodyNode->getSkeleton();
+ kido::collision::CollisionDetector *dtCollDet =
dtWorld->getConstraintSolver()->getCollisionDetector();
Link_V links = this->GetModel()->GetLinks();
@@ -663,8 +663,8 @@ void DARTLink::SetSelfCollide(bool _collide)
{
if (links[i].get() != this && links[i]->GetSelfCollide())
{
- dart::dynamics::BodyNode *itdtBodyNode =
- boost::dynamic_pointer_cast<DARTLink>(links[i])->GetDARTBodyNode();
+ kido::dynamics::BodyNode *itdtBodyNode =
+ boost::dynamic_pointer_cast<KIDOLink>(links[i])->GetKIDOBodyNode();
// If this->dataPtr->dtBodyNode and itdtBodyNode are connected then
// don't enable the pair.
@@ -678,7 +678,7 @@ void DARTLink::SetSelfCollide(bool _collide)
}
}
// If the skeleton is not self collidable, we first set the skeleton as
- // self collidable. If the skeleton is self collidable, then DART regards
+ // self collidable. If the skeleton is self collidable, then KIDO regards
// that all the links in the skeleton is self collidable. So, we disable all
// the pairs of which both of the links in the pair is not self collidable.
else
@@ -689,10 +689,10 @@ void DARTLink::SetSelfCollide(bool _collide)
{
for (size_t j = i + 1; j < links.size(); ++j)
{
- dart::dynamics::BodyNode *itdtBodyNode1 =
- boost::dynamic_pointer_cast<DARTLink>(links[i])->GetDARTBodyNode();
- dart::dynamics::BodyNode *itdtBodyNode2 =
- boost::dynamic_pointer_cast<DARTLink>(links[j])->GetDARTBodyNode();
+ kido::dynamics::BodyNode *itdtBodyNode1 =
+ boost::dynamic_pointer_cast<KIDOLink>(links[i])->GetKIDOBodyNode();
+ kido::dynamics::BodyNode *itdtBodyNode2 =
+ boost::dynamic_pointer_cast<KIDOLink>(links[j])->GetKIDOBodyNode();
// If this->dataPtr->dtBodyNode and itdtBodyNode are connected then
// don't enable the pair.
@@ -717,8 +717,8 @@ void DARTLink::SetSelfCollide(bool _collide)
{
if (links[i].get() != this)
{
- dart::dynamics::BodyNode *itdtBodyNode =
- boost::dynamic_pointer_cast<DARTLink>(links[i])->GetDARTBodyNode();
+ kido::dynamics::BodyNode *itdtBodyNode =
+ boost::dynamic_pointer_cast<KIDOLink>(links[i])->GetKIDOBodyNode();
dtCollDet->disablePair(dtBodyNode, itdtBodyNode);
}
}
@@ -741,58 +741,58 @@ void DARTLink::SetSelfCollide(bool _collide)
}
//////////////////////////////////////////////////
-void DARTLink::SetLinearDamping(double /*_damping*/)
+void KIDOLink::SetLinearDamping(double /*_damping*/)
{
- // see: https://github.com/dartsim/dart/issues/85
- gzwarn << "DART does not support DARTLink::SetLinearDamping() yet.\n";
+ // see: https://github.com/kidosim/kido/issues/85
+ gzwarn << "KIDO does not support KIDOLink::SetLinearDamping() yet.\n";
}
//////////////////////////////////////////////////
-void DARTLink::SetAngularDamping(double /*_damping*/)
+void KIDOLink::SetAngularDamping(double /*_damping*/)
{
- // see: https://github.com/dartsim/dart/issues/85
- gzwarn << "DART does not support DARTLink::SetAngularDamping() yet.\n";
+ // see: https://github.com/kidosim/kido/issues/85
+ gzwarn << "KIDO does not support KIDOLink::SetAngularDamping() yet.\n";
}
//////////////////////////////////////////////////
-void DARTLink::SetKinematic(const bool& _state)
+void KIDOLink::SetKinematic(const bool& _state)
{
this->sdf->GetElement("kinematic")->Set(_state);
- gzwarn << "DART does not support DARTLink::SetKinematic() yet.\n";
+ gzwarn << "KIDO does not support KIDOLink::SetKinematic() yet.\n";
}
//////////////////////////////////////////////////
-bool DARTLink::GetKinematic() const
+bool KIDOLink::GetKinematic() const
{
- // DART does not support kinematic mode for link.";
+ // KIDO does not support kinematic mode for link.";
return false;
}
//////////////////////////////////////////////////
-void DARTLink::SetAutoDisable(bool /*_disable*/)
+void KIDOLink::SetAutoDisable(bool /*_disable*/)
{
- gzwarn << "DART does not support DARTLink::SetAutoDisable() yet.\n";
+ gzwarn << "KIDO does not support KIDOLink::SetAutoDisable() yet.\n";
}
//////////////////////////////////////////////////
-void DARTLink::SetLinkStatic(bool _static)
+void KIDOLink::SetLinkStatic(bool _static)
{
if (_static == this->dataPtr->staticLink)
return;
if (_static == true)
{
- // Add weld joint constraint to DART
+ // Add weld joint constraint to KIDO
this->dataPtr->dtWeldJointConst =
- new dart::constraint::WeldJointConstraint(this->dataPtr->dtBodyNode);
- GetDARTWorld()->getConstraintSolver()->addConstraint(
+ new kido::constraint::WeldJointConstraint(this->dataPtr->dtBodyNode);
+ GetKIDOWorld()->getConstraintSolver()->addConstraint(
this->dataPtr->dtWeldJointConst);
}
else
{
- // Remove ball and revolute joint constraints from DART
- GetDARTWorld()->getConstraintSolver()->removeConstraint(
+ // Remove ball and revolute joint constraints from KIDO
+ GetKIDOWorld()->getConstraintSolver()->removeConstraint(
this->dataPtr->dtWeldJointConst);
delete this->dataPtr->dtWeldJointConst;
this->dataPtr->dtWeldJointConst = NULL;
@@ -802,11 +802,11 @@ void DARTLink::SetLinkStatic(bool _static)
}
//////////////////////////////////////////////////
-void DARTLink::updateDirtyPoseFromDARTTransformation()
+void KIDOLink::updateDirtyPoseFromKIDOTransformation()
{
- // Step 1: get dart body's transformation
+ // Step 1: get kido body's transformation
// Step 2: set gazebo link's pose using the transformation
- math::Pose newPose = DARTTypes::ConvPose(
+ math::Pose newPose = KIDOTypes::ConvPose(
this->dataPtr->dtBodyNode->getTransform());
// Set the new pose to this link
@@ -818,38 +818,38 @@ void DARTLink::updateDirtyPoseFromDARTTransformation()
}
//////////////////////////////////////////////////
-DARTPhysicsPtr DARTLink::GetDARTPhysics(void) const
+KIDOPhysicsPtr KIDOLink::GetKIDOPhysics(void) const
{
- return boost::dynamic_pointer_cast<DARTPhysics>(
+ return boost::dynamic_pointer_cast<KIDOPhysics>(
this->GetWorld()->GetPhysicsEngine());
}
//////////////////////////////////////////////////
-dart::simulation::World *DARTLink::GetDARTWorld(void) const
+kido::simulation::World *KIDOLink::GetKIDOWorld(void) const
{
- return GetDARTPhysics()->GetDARTWorld();
+ return GetKIDOPhysics()->GetKIDOWorld();
}
//////////////////////////////////////////////////
-DARTModelPtr DARTLink::GetDARTModel() const
+KIDOModelPtr KIDOLink::GetKIDOModel() const
{
- return boost::dynamic_pointer_cast<DARTModel>(this->GetModel());
+ return boost::dynamic_pointer_cast<KIDOModel>(this->GetModel());
}
//////////////////////////////////////////////////
-dart::dynamics::BodyNode *DARTLink::GetDARTBodyNode() const
+kido::dynamics::BodyNode *KIDOLink::GetKIDOBodyNode() const
{
return this->dataPtr->dtBodyNode;
}
//////////////////////////////////////////////////
-void DARTLink::SetDARTParentJoint(DARTJointPtr _dartParentJoint)
+void KIDOLink::SetKIDOParentJoint(KIDOJointPtr _kidoParentJoint)
{
- this->dataPtr->dartParentJoint = _dartParentJoint;
+ this->dataPtr->kidoParentJoint = _kidoParentJoint;
}
//////////////////////////////////////////////////
-void DARTLink::AddDARTChildJoint(DARTJointPtr _dartChildJoint)
+void KIDOLink::AddKIDOChildJoint(KIDOJointPtr _kidoChildJoint)
{
- this->dataPtr->dartChildJoints.push_back(_dartChildJoint);
+ this->dataPtr->kidoChildJoints.push_back(_kidoChildJoint);
}
diff --git a/gazebo/physics/dart/DARTLink.hh b/gazebo/physics/kido/KIDOLink.hh
similarity index 76%
rename from gazebo/physics/dart/DARTLink.hh
rename to gazebo/physics/kido/KIDOLink.hh
index 28e80ad..0a31f7b 100644
--- a/gazebo/physics/dart/DARTLink.hh
+++ b/gazebo/physics/kido/KIDOLink.hh
@@ -15,15 +15,15 @@
*
*/
-#ifndef _GAZEBO_DARTLINK_HH_
-#define _GAZEBO_DARTLINK_HH_
+#ifndef _GAZEBO_KIDOLINK_HH_
+#define _GAZEBO_KIDOLINK_HH_
#include <vector>
#include "gazebo/physics/Link.hh"
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
@@ -31,19 +31,19 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTLinkPrivate;
+ class KIDOLinkPrivate;
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \brief DART Link class
- class GZ_PHYSICS_VISIBLE DARTLink : public Link
+ /// \brief KIDO Link class
+ class GZ_PHYSICS_VISIBLE KIDOLink : public Link
{
/// \brief Constructor
- public: explicit DARTLink(EntityPtr _parent);
+ public: explicit KIDOLink(EntityPtr _parent);
/// \brief Destructor
- public: virtual ~DARTLink();
+ public: virtual ~KIDOLink();
// Documentation inherited
public: virtual void Load(sdf::ElementPtr _ptr);
@@ -148,41 +148,41 @@ namespace gazebo
// Documentation inherited
public: virtual void SetLinkStatic(bool _static);
- /// \brief Store DART Transformation to Entity::dirtyPose and add this
+ /// \brief Store KIDO Transformation to Entity::dirtyPose and add this
/// link to World::dirtyPoses so that World::Update() trigger
/// Entity::SetWorldPose() for this link.
- public: void updateDirtyPoseFromDARTTransformation();
+ public: void updateDirtyPoseFromKIDOTransformation();
- /// \brief Get pointer to DART Physics engine associated with this link.
- /// \return Pointer to the DART Physics engine.
- public: DARTPhysicsPtr GetDARTPhysics(void) const;
+ /// \brief Get pointer to KIDO Physics engine associated with this link.
+ /// \return Pointer to the KIDO Physics engine.
+ public: KIDOPhysicsPtr GetKIDOPhysics(void) const;
- /// \brief Get pointer to DART World associated with this link.
- /// \return Pointer to the DART World.
- public: dart::simulation::World *GetDARTWorld(void) const;
+ /// \brief Get pointer to KIDO World associated with this link.
+ /// \return Pointer to the KIDO World.
+ public: kido::simulation::World *GetKIDOWorld(void) const;
- /// \brief Get pointer to DART Model associated with this link.
- /// \return Pointer to the DART Model.
- public: DARTModelPtr GetDARTModel() const;
+ /// \brief Get pointer to KIDO Model associated with this link.
+ /// \return Pointer to the KIDO Model.
+ public: KIDOModelPtr GetKIDOModel() const;
- /// \brief Get pointer to DART BodyNode associated with this link.
- /// \return Pointer to DART BodyNode.
- public: dart::dynamics::BodyNode *GetDARTBodyNode() const;
+ /// \brief Get pointer to KIDO BodyNode associated with this link.
+ /// \return Pointer to KIDO BodyNode.
+ public: kido::dynamics::BodyNode *GetKIDOBodyNode() const;
/// \brief Set parent joint of this link.
- /// \param[in] _dartParentJoint Pointer to the parent joint.
- public: void SetDARTParentJoint(DARTJointPtr _dartParentJoint);
+ /// \param[in] _kidoParentJoint Pointer to the parent joint.
+ public: void SetKIDOParentJoint(KIDOJointPtr _kidoParentJoint);
/// \brief Set child joint of this link.
- /// \param[in] _dartChildJoint Pointer to the child joint.
- public: void AddDARTChildJoint(DARTJointPtr _dartChildJoint);
+ /// \param[in] _kidoChildJoint Pointer to the child joint.
+ public: void AddKIDOChildJoint(KIDOJointPtr _kidoChildJoint);
// Documentation inherited.
public: virtual void UpdateMass();
/// \internal
/// \brief Pointer to private data
- private: DARTLinkPrivate *dataPtr;
+ private: KIDOLinkPrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTLinkPrivate.hh b/gazebo/physics/kido/KIDOLinkPrivate.hh
similarity index 64%
rename from gazebo/physics/dart/DARTLinkPrivate.hh
rename to gazebo/physics/kido/KIDOLinkPrivate.hh
index 7ab242e..3697f77 100644
--- a/gazebo/physics/dart/DARTLinkPrivate.hh
+++ b/gazebo/physics/kido/KIDOLinkPrivate.hh
@@ -15,35 +15,35 @@
*
*/
-#ifndef _GAZEBO_DARTLINK_PRIVATE_HH_
-#define _GAZEBO_DARTLINK_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOLINK_PRIVATE_HH_
+#define _GAZEBO_KIDOLINK_PRIVATE_HH_
#include <vector>
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTLink
- class DARTLinkPrivate
+ /// \brief Private data class for KIDOLink
+ class KIDOLinkPrivate
{
/// \brief Constructor
- public: DARTLinkPrivate()
- : dartPhysics(NULL),
+ public: KIDOLinkPrivate()
+ : kidoPhysics(NULL),
dtBodyNode(NULL),
- dartParentJoint(NULL),
- dartChildJoints {},
+ kidoParentJoint(NULL),
+ kidoChildJoints {},
staticLink(false),
dtWeldJointConst(NULL)
{
}
/// \brief Default destructor
- public: ~DARTLinkPrivate()
+ public: ~KIDOLinkPrivate()
{
// We don't need to delete dtBodyNode because skeleton will delete
// dtBodyNode if it is registered to the skeleton.
@@ -51,23 +51,23 @@ namespace gazebo
delete dtWeldJointConst;
}
- /// \brief Pointer to the DART physics engine.
- public: DARTPhysicsPtr dartPhysics;
+ /// \brief Pointer to the KIDO physics engine.
+ public: KIDOPhysicsPtr kidoPhysics;
- /// \brief Pointer to the DART BodyNode.
- public: dart::dynamics::BodyNode *dtBodyNode;
+ /// \brief Pointer to the KIDO BodyNode.
+ public: kido::dynamics::BodyNode *dtBodyNode;
/// \brief Pointer to the parent joint.
- public: DARTJointPtr dartParentJoint;
+ public: KIDOJointPtr kidoParentJoint;
/// \brief List of pointers to the child joints.
- public: std::vector<DARTJointPtr> dartChildJoints;
+ public: std::vector<KIDOJointPtr> kidoChildJoints;
/// \brief If true, freeze link to world (inertial) frame.
public: bool staticLink;
/// \brief Weld joint constraint for SetLinkStatic()
- public: dart::constraint::WeldJointConstraint *dtWeldJointConst;
+ public: kido::constraint::WeldJointConstraint *dtWeldJointConst;
};
}
}
diff --git a/gazebo/physics/dart/DARTMesh.cc b/gazebo/physics/kido/KIDOMesh.cc
similarity index 76%
rename from gazebo/physics/dart/DARTMesh.cc
rename to gazebo/physics/kido/KIDOMesh.cc
index 532571c..4053d9a 100644
--- a/gazebo/physics/dart/DARTMesh.cc
+++ b/gazebo/physics/kido/KIDOMesh.cc
@@ -18,11 +18,11 @@
#include "gazebo/common/Assert.hh"
#include "gazebo/common/Mesh.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTMesh.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDOMesh.hh"
-#include "gazebo/physics/dart/DARTMeshPrivate.hh"
+#include "gazebo/physics/kido/KIDOMeshPrivate.hh"
using namespace gazebo;
using namespace physics;
@@ -30,9 +30,9 @@ using namespace physics;
//////////////////////////////////////////////////
// Constructor of aiScene is missing so we define it here. This is temporary
// workaround. For further discussion, please see:
-// https://github.com/dartsim/dart/issues/451
-// https://github.com/dartsim/dart/issues/452
-// https://github.com/dartsim/dart/issues/453
+// https://github.com/kidosim/kido/issues/451
+// https://github.com/kidosim/kido/issues/452
+// https://github.com/kidosim/kido/issues/453
aiScene::aiScene()
{
mFlags = 0;
@@ -52,19 +52,19 @@ aiScene::aiScene()
}
//////////////////////////////////////////////////
-DARTMesh::DARTMesh() : dataPtr(new DARTMeshPrivate())
+KIDOMesh::KIDOMesh() : dataPtr(new KIDOMeshPrivate())
{
}
//////////////////////////////////////////////////
-DARTMesh::~DARTMesh()
+KIDOMesh::~KIDOMesh()
{
delete this->dataPtr;
}
//////////////////////////////////////////////////
-void DARTMesh::Init(const common::SubMesh *_subMesh,
- DARTCollisionPtr _collision,
+void KIDOMesh::Init(const common::SubMesh *_subMesh,
+ KIDOCollisionPtr _collision,
const math::Vector3 &_scale)
{
float *vertices = NULL;
@@ -84,8 +84,8 @@ void DARTMesh::Init(const common::SubMesh *_subMesh,
}
//////////////////////////////////////////////////
-void DARTMesh::Init(const common::Mesh *_mesh,
- DARTCollisionPtr _collision,
+void KIDOMesh::Init(const common::Mesh *_mesh,
+ KIDOCollisionPtr _collision,
const math::Vector3 &_scale)
{
float *vertices = NULL;
@@ -104,11 +104,11 @@ void DARTMesh::Init(const common::Mesh *_mesh,
}
/////////////////////////////////////////////////
-void DARTMesh::CreateMesh(float *_vertices, int *_indices,
+void KIDOMesh::CreateMesh(float *_vertices, int *_indices,
unsigned int _numVertices, unsigned int _numIndices,
- DARTCollisionPtr _collision, const math::Vector3 &_scale)
+ KIDOCollisionPtr _collision, const math::Vector3 &_scale)
{
- GZ_ASSERT(_collision, "DART collision is null");
+ GZ_ASSERT(_collision, "KIDO collision is null");
// Create new aiScene (aiMesh)
aiScene *assimpScene = new aiScene;
@@ -144,10 +144,10 @@ void DARTMesh::CreateMesh(float *_vertices, int *_indices,
itAIFace->mIndices[2] = _indices[i*3 + 2];
}
- dart::dynamics::MeshShape *dtMeshShape = new dart::dynamics::MeshShape(
- DARTTypes::ConvVec3(_scale), assimpScene);
- GZ_ASSERT(_collision->GetDARTBodyNode(),
- "DART _collision->GetDARTBodyNode() is null");
- _collision->GetDARTBodyNode()->addCollisionShape(dtMeshShape);
- _collision->SetDARTCollisionShape(dtMeshShape);
+ kido::dynamics::MeshShape *dtMeshShape = new kido::dynamics::MeshShape(
+ KIDOTypes::ConvVec3(_scale), assimpScene);
+ GZ_ASSERT(_collision->GetKIDOBodyNode(),
+ "KIDO _collision->GetKIDOBodyNode() is null");
+ _collision->GetKIDOBodyNode()->addCollisionShape(dtMeshShape);
+ _collision->SetKIDOCollisionShape(dtMeshShape);
}
diff --git a/gazebo/physics/dart/DARTMesh.hh b/gazebo/physics/kido/KIDOMesh.hh
similarity index 82%
rename from gazebo/physics/dart/DARTMesh.hh
rename to gazebo/physics/kido/KIDOMesh.hh
index feb3fdf..68fd8db 100644
--- a/gazebo/physics/dart/DARTMesh.hh
+++ b/gazebo/physics/kido/KIDOMesh.hh
@@ -15,10 +15,10 @@
*
*/
-#ifndef _GAZEBO_DARTMESH_HH_
-#define _GAZEBO_DARTMESH_HH_
+#ifndef _GAZEBO_KIDOMESH_HH_
+#define _GAZEBO_KIDOMESH_HH_
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/KIDOTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
@@ -26,27 +26,27 @@ namespace gazebo
namespace physics
{
/// \ingroup gazebo_physics
- /// \addtogroup gazebo_physics_dart Dart Physics
+ /// \addtogroup gazebo_physics_kido Dart Physics
/// \{
/// Forward declare private data class
- class DARTMeshPrivate;
+ class KIDOMeshPrivate;
/// \brief Triangle mesh collision helper class
- class GZ_PHYSICS_VISIBLE DARTMesh
+ class GZ_PHYSICS_VISIBLE KIDOMesh
{
/// \brief Constructor
- public: DARTMesh();
+ public: KIDOMesh();
/// \brief Destructor
- public: virtual ~DARTMesh();
+ public: virtual ~KIDOMesh();
/// \brief Create a mesh collision shape using a submesh.
/// \param[in] _subMesh Pointer to the submesh.
/// \param[in] _collision Pointer to the collsion object.
/// \param[in] _scale Scaling factor.
public: void Init(const common::SubMesh *_subMesh,
- DARTCollisionPtr _collision,
+ KIDOCollisionPtr _collision,
const math::Vector3 &_scale);
/// \brief Create a mesh collision shape using a mesh.
@@ -54,7 +54,7 @@ namespace gazebo
/// \param[in] _collision Pointer to the collsion object.
/// \param[in] _scale Scaling factor.
public: void Init(const common::Mesh *_mesh,
- DARTCollisionPtr _collision,
+ KIDOCollisionPtr _collision,
const math::Vector3 &_scale);
/// \brief Helper function to create the collision shape.
@@ -65,12 +65,12 @@ namespace gazebo
/// \param[in] _collision Pointer to the collsion object.
private: void CreateMesh(float *_vertices, int *_indices,
unsigned int _numVertices, unsigned int _numIndices,
- DARTCollisionPtr _collision,
+ KIDOCollisionPtr _collision,
const math::Vector3 &_scale);
/// \internal
/// \brief Pointer to private data
- private: DARTMeshPrivate *dataPtr;
+ private: KIDOMeshPrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTMeshPrivate.hh b/gazebo/physics/kido/KIDOMeshPrivate.hh
similarity index 70%
rename from gazebo/physics/dart/DARTMeshPrivate.hh
rename to gazebo/physics/kido/KIDOMeshPrivate.hh
index 023de36..aacb72d 100644
--- a/gazebo/physics/dart/DARTMeshPrivate.hh
+++ b/gazebo/physics/kido/KIDOMeshPrivate.hh
@@ -15,25 +15,25 @@
*
*/
-#ifndef _GAZEBO_DARTMESH_PRIVATE_HH_
-#define _GAZEBO_DARTMESH_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOMESH_PRIVATE_HH_
+#define _GAZEBO_KIDOMESH_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTMesh
- class DARTMeshPrivate
+ /// \brief Private data class for KIDOMesh
+ class KIDOMeshPrivate
{
/// \brief Constructor
- public: DARTMeshPrivate() = default;
+ public: KIDOMeshPrivate() = default;
/// \brief Default destructor
- public: ~DARTMeshPrivate() = default;
+ public: ~KIDOMeshPrivate() = default;
};
}
}
diff --git a/gazebo/physics/dart/DARTMeshShape.cc b/gazebo/physics/kido/KIDOMeshShape.cc
similarity index 66%
rename from gazebo/physics/dart/DARTMeshShape.cc
rename to gazebo/physics/kido/KIDOMeshShape.cc
index b59dbeb..0c363b6 100644
--- a/gazebo/physics/dart/DARTMeshShape.cc
+++ b/gazebo/physics/kido/KIDOMeshShape.cc
@@ -20,56 +20,56 @@
#include "gazebo/common/Exception.hh"
#include "gazebo/common/Mesh.hh"
-#include "gazebo/physics/dart/DARTMesh.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTMeshShape.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
+#include "gazebo/physics/kido/KIDOMesh.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOMeshShape.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
-#include "gazebo/physics/dart/DARTMeshShapePrivate.hh"
+#include "gazebo/physics/kido/KIDOMeshShapePrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTMeshShape::DARTMeshShape(CollisionPtr _parent)
+KIDOMeshShape::KIDOMeshShape(CollisionPtr _parent)
: MeshShape(_parent),
- dataPtr(new DARTMeshShapePrivate())
+ dataPtr(new KIDOMeshShapePrivate())
{
}
//////////////////////////////////////////////////
-DARTMeshShape::~DARTMeshShape()
+KIDOMeshShape::~KIDOMeshShape()
{
delete this->dataPtr;
}
//////////////////////////////////////////////////
-void DARTMeshShape::Update()
+void KIDOMeshShape::Update()
{
MeshShape::Update();
}
//////////////////////////////////////////////////
-void DARTMeshShape::Load(sdf::ElementPtr _sdf)
+void KIDOMeshShape::Load(sdf::ElementPtr _sdf)
{
MeshShape::Load(_sdf);
}
//////////////////////////////////////////////////
-void DARTMeshShape::Init()
+void KIDOMeshShape::Init()
{
MeshShape::Init();
if (this->submesh)
{
- this->dataPtr->dartMesh->Init(this->submesh,
- boost::dynamic_pointer_cast<DARTCollision>(this->collisionParent),
+ this->dataPtr->kidoMesh->Init(this->submesh,
+ boost::dynamic_pointer_cast<KIDOCollision>(this->collisionParent),
this->sdf->Get<math::Vector3>("scale"));
}
else
{
- this->dataPtr->dartMesh->Init(this->mesh,
- boost::dynamic_pointer_cast<DARTCollision>(this->collisionParent),
+ this->dataPtr->kidoMesh->Init(this->mesh,
+ boost::dynamic_pointer_cast<KIDOCollision>(this->collisionParent),
this->sdf->Get<math::Vector3>("scale"));
}
}
diff --git a/gazebo/physics/dart/DARTMeshShape.hh b/gazebo/physics/kido/KIDOMeshShape.hh
similarity index 78%
rename from gazebo/physics/dart/DARTMeshShape.hh
rename to gazebo/physics/kido/KIDOMeshShape.hh
index bcb9720..adab773 100644
--- a/gazebo/physics/dart/DARTMeshShape.hh
+++ b/gazebo/physics/kido/KIDOMeshShape.hh
@@ -15,8 +15,8 @@
*
*/
-#ifndef _GAZEBO_DARTMESHSHAPE_HH_
-#define _GAZEBO_DARTMESHSHAPE_HH_
+#ifndef _GAZEBO_KIDOMESHSHAPE_HH_
+#define _GAZEBO_KIDOMESHSHAPE_HH_
#include "gazebo/physics/MeshShape.hh"
#include "gazebo/util/system.hh"
@@ -26,20 +26,20 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTMeshShapePrivate;
+ class KIDOMeshShapePrivate;
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
/// \brief Triangle mesh collision.
- class GZ_PHYSICS_VISIBLE DARTMeshShape : public MeshShape
+ class GZ_PHYSICS_VISIBLE KIDOMeshShape : public MeshShape
{
/// \brief Constructor.
/// \param[in] _parent Parent collision object.
- public: explicit DARTMeshShape(CollisionPtr _parent);
+ public: explicit KIDOMeshShape(CollisionPtr _parent);
/// \brief Destructor.
- public: virtual ~DARTMeshShape();
+ public: virtual ~KIDOMeshShape();
// Documentation inherited
public: virtual void Load(sdf::ElementPtr _sdf);
@@ -52,7 +52,7 @@ namespace gazebo
/// \internal
/// \brief Pointer to private data
- private: DARTMeshShapePrivate *dataPtr;
+ private: KIDOMeshShapePrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTMeshShapePrivate.hh b/gazebo/physics/kido/KIDOMeshShapePrivate.hh
similarity index 59%
rename from gazebo/physics/dart/DARTMeshShapePrivate.hh
rename to gazebo/physics/kido/KIDOMeshShapePrivate.hh
index e4463a1..6e8974d 100644
--- a/gazebo/physics/dart/DARTMeshShapePrivate.hh
+++ b/gazebo/physics/kido/KIDOMeshShapePrivate.hh
@@ -15,38 +15,38 @@
*
*/
-#ifndef _GAZEBO_DARTMESHSHAPE_PRIVATE_HH_
-#define _GAZEBO_DARTMESHSHAPE_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOMESHSHAPE_PRIVATE_HH_
+#define _GAZEBO_KIDOMESHSHAPE_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTMesh.hh"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOMesh.hh"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTMeshShape
- class DARTMeshShapePrivate
+ /// \brief Private data class for KIDOMeshShape
+ class KIDOMeshShapePrivate
{
/// \brief Constructor
- public: DARTMeshShapePrivate()
- : dartMesh(new DARTMesh())
+ public: KIDOMeshShapePrivate()
+ : kidoMesh(new KIDOMesh())
{
}
/// \brief Default destructor
- public: ~DARTMeshShapePrivate()
+ public: ~KIDOMeshShapePrivate()
{
- delete this->dartMesh;
+ delete this->kidoMesh;
}
/// \brief Disabled copy constructor
- public: DARTMeshShapePrivate(const DARTMeshShapePrivate&) = delete;
+ public: KIDOMeshShapePrivate(const KIDOMeshShapePrivate&) = delete;
- /// \brief DART collision mesh helper class
- public: DARTMesh *dartMesh;
+ /// \brief KIDO collision mesh helper class
+ public: KIDOMesh *kidoMesh;
};
}
}
diff --git a/gazebo/physics/dart/DARTModel.cc b/gazebo/physics/kido/KIDOModel.cc
similarity index 76%
rename from gazebo/physics/dart/DARTModel.cc
rename to gazebo/physics/kido/KIDOModel.cc
index df146ce..57a008b 100644
--- a/gazebo/physics/dart/DARTModel.cc
+++ b/gazebo/physics/kido/KIDOModel.cc
@@ -19,48 +19,48 @@
#include "gazebo/physics/World.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTLink.hh"
-#include "gazebo/physics/dart/DARTModel.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDOLink.hh"
+#include "gazebo/physics/kido/KIDOModel.hh"
-#include "gazebo/physics/dart/DARTModelPrivate.hh"
+#include "gazebo/physics/kido/KIDOModelPrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTModel::DARTModel(BasePtr _parent)
- : Model(_parent), dataPtr(new DARTModelPrivate())
+KIDOModel::KIDOModel(BasePtr _parent)
+ : Model(_parent), dataPtr(new KIDOModelPrivate())
{
}
//////////////////////////////////////////////////
-DARTModel::~DARTModel()
+KIDOModel::~KIDOModel()
{
delete this->dataPtr;
this->dataPtr = nullptr;
}
//////////////////////////////////////////////////
-void DARTModel::Load(sdf::ElementPtr _sdf)
+void KIDOModel::Load(sdf::ElementPtr _sdf)
{
if (_sdf->HasElement("model"))
{
- gzerr << "Nested models are not currently supported in DART. ["
+ gzerr << "Nested models are not currently supported in KIDO. ["
<< _sdf->Get<std::string>("name") << "] will not be loaded. "
<< std::endl;
this->sdf = _sdf;
return;
}
- // create skeleton of DART
- this->dataPtr->dtSkeleton = new dart::dynamics::Skeleton();
+ // create skeleton of KIDO
+ this->dataPtr->dtSkeleton = new kido::dynamics::Skeleton();
Model::Load(_sdf);
}
//////////////////////////////////////////////////
-void DARTModel::Init()
+void KIDOModel::Init()
{
// nested models are not supported for now, issue #1833
if (this->sdf->HasElement("model"))
@@ -84,15 +84,15 @@ void DARTModel::Init()
Link_V linkList = this->GetLinks();
for (unsigned int i = 0; i < linkList.size(); ++i)
{
- dart::dynamics::BodyNode *dtBodyNode
- = boost::static_pointer_cast<DARTLink>(linkList[i])->GetDARTBodyNode();
+ kido::dynamics::BodyNode *dtBodyNode
+ = boost::static_pointer_cast<KIDOLink>(linkList[i])->GetKIDOBodyNode();
if (dtBodyNode->getParentJoint() == NULL)
{
- dart::dynamics::FreeJoint *newFreeJoint = new dart::dynamics::FreeJoint;
+ kido::dynamics::FreeJoint *newFreeJoint = new kido::dynamics::FreeJoint;
newFreeJoint->setTransformFromParentBodyNode(
- DARTTypes::ConvPose(linkList[i]->GetWorldPose()));
+ KIDOTypes::ConvPose(linkList[i]->GetWorldPose()));
newFreeJoint->setTransformFromChildBodyNode(
Eigen::Isometry3d::Identity());
@@ -103,7 +103,7 @@ void DARTModel::Init()
}
// Add the skeleton to the world
- this->GetDARTWorld()->addSkeleton(this->dataPtr->dtSkeleton);
+ this->GetKIDOWorld()->addSkeleton(this->dataPtr->dtSkeleton);
// Self collision
// Note: This process should be done after this skeleton is added to the
@@ -127,25 +127,25 @@ void DARTModel::Init()
// If the skeleton has at least two self collidable links, then we set the
// skeleton as self collidable. If the skeleton is self collidable, then
- // DART regards that all the links in the skeleton is self collidable. So, we
+ // KIDO regards that all the links in the skeleton is self collidable. So, we
// disable all the pairs of which both of the links in the pair is not self
// collidable.
if (hasPairOfSelfCollidableLinks)
{
this->dataPtr->dtSkeleton->enableSelfCollision();
- dart::simulation::World *dtWorld = this->GetDARTPhysics()->GetDARTWorld();
- dart::collision::CollisionDetector *dtCollDet =
+ kido::simulation::World *dtWorld = this->GetKIDOPhysics()->GetKIDOWorld();
+ kido::collision::CollisionDetector *dtCollDet =
dtWorld->getConstraintSolver()->getCollisionDetector();
for (size_t i = 0; i < linkList.size() - 1; ++i)
{
for (size_t j = i + 1; j < linkList.size(); ++j)
{
- dart::dynamics::BodyNode *itdtBodyNode1 =
- boost::dynamic_pointer_cast<DARTLink>(linkList[i])->GetDARTBodyNode();
- dart::dynamics::BodyNode *itdtBodyNode2 =
- boost::dynamic_pointer_cast<DARTLink>(linkList[j])->GetDARTBodyNode();
+ kido::dynamics::BodyNode *itdtBodyNode1 =
+ boost::dynamic_pointer_cast<KIDOLink>(linkList[i])->GetKIDOBodyNode();
+ kido::dynamics::BodyNode *itdtBodyNode2 =
+ boost::dynamic_pointer_cast<KIDOLink>(linkList[j])->GetKIDOBodyNode();
// If this->dtBodyNode and itdtBodyNode are connected then don't enable
// the pair.
@@ -171,26 +171,26 @@ void DARTModel::Init()
//////////////////////////////////////////////////
-void DARTModel::Update()
+void KIDOModel::Update()
{
Model::Update();
}
//////////////////////////////////////////////////
-void DARTModel::Fini()
+void KIDOModel::Fini()
{
Model::Fini();
}
//////////////////////////////////////////////////
-void DARTModel::BackupState()
+void KIDOModel::BackupState()
{
this->dataPtr->dtConfig = this->dataPtr->dtSkeleton->getPositions();
this->dataPtr->dtVelocity = this->dataPtr->dtSkeleton->getVelocities();
}
//////////////////////////////////////////////////
-void DARTModel::RestoreState()
+void KIDOModel::RestoreState()
{
if (!this->dataPtr->dtSkeleton)
return;
@@ -208,20 +208,20 @@ void DARTModel::RestoreState()
}
//////////////////////////////////////////////////
-dart::dynamics::Skeleton *DARTModel::GetDARTSkeleton()
+kido::dynamics::Skeleton *KIDOModel::GetKIDOSkeleton()
{
return this->dataPtr->dtSkeleton;
}
//////////////////////////////////////////////////
-DARTPhysicsPtr DARTModel::GetDARTPhysics(void) const
+KIDOPhysicsPtr KIDOModel::GetKIDOPhysics(void) const
{
- return boost::dynamic_pointer_cast<DARTPhysics>(
+ return boost::dynamic_pointer_cast<KIDOPhysics>(
this->GetWorld()->GetPhysicsEngine());
}
//////////////////////////////////////////////////
-dart::simulation::World *DARTModel::GetDARTWorld(void) const
+kido::simulation::World *KIDOModel::GetKIDOWorld(void) const
{
- return GetDARTPhysics()->GetDARTWorld();
+ return GetKIDOPhysics()->GetKIDOWorld();
}
diff --git a/gazebo/physics/dart/DARTModel.hh b/gazebo/physics/kido/KIDOModel.hh
similarity index 68%
rename from gazebo/physics/dart/DARTModel.hh
rename to gazebo/physics/kido/KIDOModel.hh
index 726635d..e49d34c 100644
--- a/gazebo/physics/dart/DARTModel.hh
+++ b/gazebo/physics/kido/KIDOModel.hh
@@ -15,11 +15,11 @@
*
*/
-#ifndef _GAZEBO_DARTMODEL_HH_
-#define _GAZEBO_DARTMODEL_HH_
+#ifndef _GAZEBO_KIDOMODEL_HH_
+#define _GAZEBO_KIDOMODEL_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
#include "gazebo/physics/Model.hh"
#include "gazebo/util/system.hh"
@@ -28,23 +28,23 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTModelPrivate;
+ class KIDOModelPrivate;
/// \ingroup gazebo_physics
- /// \addtogroup gazebo_physics_dart DART Physics
- /// \brief dart physics engine wrapper
+ /// \addtogroup gazebo_physics_kido KIDO Physics
+ /// \brief kido physics engine wrapper
/// \{
- /// \class DARTModel
- /// \brief DART model class
- class GZ_PHYSICS_VISIBLE DARTModel : public Model
+ /// \class KIDOModel
+ /// \brief KIDO model class
+ class GZ_PHYSICS_VISIBLE KIDOModel : public Model
{
/// \brief Constructor.
/// \param[in] _parent Parent object.
- public: explicit DARTModel(BasePtr _parent);
+ public: explicit KIDOModel(BasePtr _parent);
/// \brief Destructor.
- public: virtual ~DARTModel();
+ public: virtual ~KIDOModel();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
@@ -65,17 +65,17 @@ namespace gazebo
public: void RestoreState();
/// \brief
- public: dart::dynamics::Skeleton *GetDARTSkeleton();
+ public: kido::dynamics::Skeleton *GetKIDOSkeleton();
/// \brief
- public: DARTPhysicsPtr GetDARTPhysics(void) const;
+ public: KIDOPhysicsPtr GetKIDOPhysics(void) const;
/// \brief
- public: dart::simulation::World *GetDARTWorld(void) const;
+ public: kido::simulation::World *GetKIDOWorld(void) const;
/// \internal
/// \brief Pointer to private data
- private: DARTModelPrivate *dataPtr;
+ private: KIDOModelPrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTModelPrivate.hh b/gazebo/physics/kido/KIDOModelPrivate.hh
similarity index 76%
rename from gazebo/physics/dart/DARTModelPrivate.hh
rename to gazebo/physics/kido/KIDOModelPrivate.hh
index f1529f9..346eac7 100644
--- a/gazebo/physics/dart/DARTModelPrivate.hh
+++ b/gazebo/physics/kido/KIDOModelPrivate.hh
@@ -15,21 +15,21 @@
*
*/
-#ifndef _GAZEBO_DARTMODEL_PRIVATE_HH_
-#define _GAZEBO_DARTMODEL_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOMODEL_PRIVATE_HH_
+#define _GAZEBO_KIDOMODEL_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
+#include "gazebo/physics/kido/kido_inc.h"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTModel
- class DARTModelPrivate
+ /// \brief Private data class for KIDOModel
+ class KIDOModelPrivate
{
/// \brief Constructor
- public: DARTModelPrivate()
+ public: KIDOModelPrivate()
: dtSkeleton(NULL),
dtConfig(),
dtVelocity()
@@ -37,14 +37,14 @@ namespace gazebo
}
/// \brief Default destructor
- public: ~DARTModelPrivate()
+ public: ~KIDOModelPrivate()
{
// We don't need to delete dtSkeleton because world will delete
// dtSkeleton if it is registered to the world.
}
- /// \brief Pointer to DART Skeleton
- public: dart::dynamics::Skeleton *dtSkeleton;
+ /// \brief Pointer to KIDO Skeleton
+ public: kido::dynamics::Skeleton *dtSkeleton;
/// \brief Generalized positions
public: Eigen::VectorXd dtConfig;
diff --git a/gazebo/physics/dart/DARTMultiRayShape.cc b/gazebo/physics/kido/KIDOMultiRayShape.cc
similarity index 66%
rename from gazebo/physics/dart/DARTMultiRayShape.cc
rename to gazebo/physics/kido/KIDOMultiRayShape.cc
index 7e13c4f..9f2d83f 100644
--- a/gazebo/physics/dart/DARTMultiRayShape.cc
+++ b/gazebo/physics/kido/KIDOMultiRayShape.cc
@@ -18,34 +18,34 @@
#include "gazebo/common/Exception.hh"
#include "gazebo/physics/World.hh"
-#include "gazebo/physics/dart/DARTTypes.hh"
-#include "gazebo/physics/dart/DARTLink.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTRayShape.hh"
-#include "gazebo/physics/dart/DARTMultiRayShape.hh"
+#include "gazebo/physics/kido/KIDOTypes.hh"
+#include "gazebo/physics/kido/KIDOLink.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDORayShape.hh"
+#include "gazebo/physics/kido/KIDOMultiRayShape.hh"
-#include "gazebo/physics/dart/DARTMultiRayShapePrivate.hh"
+#include "gazebo/physics/kido/KIDOMultiRayShapePrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTMultiRayShape::DARTMultiRayShape(CollisionPtr _parent)
+KIDOMultiRayShape::KIDOMultiRayShape(CollisionPtr _parent)
: MultiRayShape(_parent),
- dataPtr(new DARTMultiRayShapePrivate())
+ dataPtr(new KIDOMultiRayShapePrivate())
{
- this->SetName("DART_multiray_shape");
+ this->SetName("KIDO_multiray_shape");
}
//////////////////////////////////////////////////
-DARTMultiRayShape::~DARTMultiRayShape()
+KIDOMultiRayShape::~KIDOMultiRayShape()
{
delete this->dataPtr;
}
//////////////////////////////////////////////////
-void DARTMultiRayShape::UpdateRays()
+void KIDOMultiRayShape::UpdateRays()
{
std::vector<RayShapePtr>::iterator iter;
for (iter = this->rays.begin(); iter != this->rays.end(); ++iter)
@@ -55,12 +55,12 @@ void DARTMultiRayShape::UpdateRays()
}
//////////////////////////////////////////////////
-void DARTMultiRayShape::AddRay(const math::Vector3& _start,
+void KIDOMultiRayShape::AddRay(const math::Vector3& _start,
const math::Vector3& _end)
{
MultiRayShape::AddRay(_start, _end);
- DARTRayShapePtr ray(new DARTRayShape(this->collisionParent));
+ KIDORayShapePtr ray(new KIDORayShape(this->collisionParent));
ray->SetPoints(_start, _end);
this->rays.push_back(ray);
diff --git a/gazebo/physics/dart/DARTMultiRayShape.hh b/gazebo/physics/kido/KIDOMultiRayShape.hh
similarity index 74%
rename from gazebo/physics/dart/DARTMultiRayShape.hh
rename to gazebo/physics/kido/KIDOMultiRayShape.hh
index a92513d..42bd3be 100644
--- a/gazebo/physics/dart/DARTMultiRayShape.hh
+++ b/gazebo/physics/kido/KIDOMultiRayShape.hh
@@ -15,32 +15,32 @@
*
*/
-#ifndef _GAZEBO_DARTMULTIRAYSHAPE_HH_
-#define _GAZEBO_DARTMULTIRAYSHAPE_HH_
+#ifndef _GAZEBO_KIDOMULTIRAYSHAPE_HH_
+#define _GAZEBO_KIDOMULTIRAYSHAPE_HH_
#include "gazebo/physics/MultiRayShape.hh"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/KIDOTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
/// Forward declare private data class
- class DARTMultiRayShapePrivate;
+ class KIDOMultiRayShapePrivate;
- /// \brief DART specific version of MultiRayShape
- class GZ_PHYSICS_VISIBLE DARTMultiRayShape : public MultiRayShape
+ /// \brief KIDO specific version of MultiRayShape
+ class GZ_PHYSICS_VISIBLE KIDOMultiRayShape : public MultiRayShape
{
/// \brief Constructor.
/// \param[in] _parent Parent Collision.
- public: explicit DARTMultiRayShape(CollisionPtr _parent);
+ public: explicit KIDOMultiRayShape(CollisionPtr _parent);
/// \brief Destructor.
- public: virtual ~DARTMultiRayShape();
+ public: virtual ~KIDOMultiRayShape();
// Documentation inherited.
public: virtual void UpdateRays();
@@ -53,7 +53,7 @@ namespace gazebo
/// \internal
/// \brief Pointer to private data
- private: DARTMultiRayShapePrivate *dataPtr;
+ private: KIDOMultiRayShapePrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTCylinderShapePrivate.hh b/gazebo/physics/kido/KIDOMultiRayShapePrivate.hh
similarity index 67%
rename from gazebo/physics/dart/DARTCylinderShapePrivate.hh
rename to gazebo/physics/kido/KIDOMultiRayShapePrivate.hh
index 0954d91..00fd9d3 100644
--- a/gazebo/physics/dart/DARTCylinderShapePrivate.hh
+++ b/gazebo/physics/kido/KIDOMultiRayShapePrivate.hh
@@ -15,25 +15,25 @@
*
*/
-#ifndef _GAZEBO_DARTCYLINDERSHAPE_PRIVATE_HH_
-#define _GAZEBO_DARTCYLINDERSHAPE_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOMULTIRAYSHAPE_PRIVATE_HH_
+#define _GAZEBO_KIDOMULTIRAYSHAPE_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTCylinderShape
- class DARTCylinderShapePrivate
+ /// \brief Private data class for KIDOMultiRayShape
+ class KIDOMultiRayShapePrivate
{
/// \brief Constructor
- public: DARTCylinderShapePrivate() = default;
+ public: KIDOMultiRayShapePrivate() = default;
/// \brief Default destructor
- public: ~DARTCylinderShapePrivate() = default;
+ public: ~KIDOMultiRayShapePrivate() = default;
};
}
}
diff --git a/gazebo/physics/dart/DARTPhysics.cc b/gazebo/physics/kido/KIDOPhysics.cc
similarity index 63%
rename from gazebo/physics/dart/DARTPhysics.cc
rename to gazebo/physics/kido/KIDOPhysics.cc
index 16ec3c1..0e4c7ac 100644
--- a/gazebo/physics/dart/DARTPhysics.cc
+++ b/gazebo/physics/kido/KIDOPhysics.cc
@@ -32,51 +32,51 @@
#include "gazebo/physics/SurfaceParams.hh"
#include "gazebo/physics/World.hh"
-#include "gazebo/physics/dart/DARTScrewJoint.hh"
-#include "gazebo/physics/dart/DARTHingeJoint.hh"
-#include "gazebo/physics/dart/DARTHinge2Joint.hh"
-#include "gazebo/physics/dart/DARTSliderJoint.hh"
-#include "gazebo/physics/dart/DARTBallJoint.hh"
-#include "gazebo/physics/dart/DARTUniversalJoint.hh"
-#include "gazebo/physics/dart/DARTFixedJoint.hh"
-
-#include "gazebo/physics/dart/DARTRayShape.hh"
-#include "gazebo/physics/dart/DARTBoxShape.hh"
-#include "gazebo/physics/dart/DARTSphereShape.hh"
-#include "gazebo/physics/dart/DARTCylinderShape.hh"
-#include "gazebo/physics/dart/DARTPlaneShape.hh"
-#include "gazebo/physics/dart/DARTMeshShape.hh"
-#include "gazebo/physics/dart/DARTPolylineShape.hh"
-#include "gazebo/physics/dart/DARTMultiRayShape.hh"
-#include "gazebo/physics/dart/DARTHeightmapShape.hh"
-
-#include "gazebo/physics/dart/DARTModel.hh"
-#include "gazebo/physics/dart/DARTLink.hh"
-
-#include "gazebo/physics/dart/DARTPhysics.hh"
-
-#include "gazebo/physics/dart/DARTPhysicsPrivate.hh"
+#include "gazebo/physics/kido/KIDOScrewJoint.hh"
+#include "gazebo/physics/kido/KIDOHingeJoint.hh"
+#include "gazebo/physics/kido/KIDOHinge2Joint.hh"
+#include "gazebo/physics/kido/KIDOSliderJoint.hh"
+#include "gazebo/physics/kido/KIDOBallJoint.hh"
+#include "gazebo/physics/kido/KIDOUniversalJoint.hh"
+#include "gazebo/physics/kido/KIDOFixedJoint.hh"
+
+#include "gazebo/physics/kido/KIDORayShape.hh"
+#include "gazebo/physics/kido/KIDOBoxShape.hh"
+#include "gazebo/physics/kido/KIDOSphereShape.hh"
+#include "gazebo/physics/kido/KIDOCylinderShape.hh"
+#include "gazebo/physics/kido/KIDOPlaneShape.hh"
+#include "gazebo/physics/kido/KIDOMeshShape.hh"
+#include "gazebo/physics/kido/KIDOPolylineShape.hh"
+#include "gazebo/physics/kido/KIDOMultiRayShape.hh"
+#include "gazebo/physics/kido/KIDOHeightmapShape.hh"
+
+#include "gazebo/physics/kido/KIDOModel.hh"
+#include "gazebo/physics/kido/KIDOLink.hh"
+
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+
+#include "gazebo/physics/kido/KIDOPhysicsPrivate.hh"
using namespace gazebo;
using namespace physics;
-GZ_REGISTER_PHYSICS_ENGINE("dart", DARTPhysics)
+GZ_REGISTER_PHYSICS_ENGINE("kido", KIDOPhysics)
//////////////////////////////////////////////////
-DARTPhysics::DARTPhysics(WorldPtr _world)
- : PhysicsEngine(_world), dataPtr(new DARTPhysicsPrivate())
+KIDOPhysics::KIDOPhysics(WorldPtr _world)
+ : PhysicsEngine(_world), dataPtr(new KIDOPhysicsPrivate())
{
}
//////////////////////////////////////////////////
-DARTPhysics::~DARTPhysics()
+KIDOPhysics::~KIDOPhysics()
{
delete this->dataPtr;
this->dataPtr = nullptr;
}
//////////////////////////////////////////////////
-void DARTPhysics::Load(sdf::ElementPtr _sdf)
+void KIDOPhysics::Load(sdf::ElementPtr _sdf)
{
PhysicsEngine::Load(_sdf);
@@ -89,76 +89,76 @@ void DARTPhysics::Load(sdf::ElementPtr _sdf)
// Time step
// double timeStep = this->sdf->GetValueDouble("time_step");
- // this->dartWorld->setTimeStep(timeStep);
+ // this->kidoWorld->setTimeStep(timeStep);
- // TODO: Elements for dart settings
- // sdf::ElementPtr dartElem = this->sdf->GetElement("dart");
- // this->stepTimeDouble = dartElem->GetElement("dt")->GetValueDouble();
+ // TODO: Elements for kido settings
+ // sdf::ElementPtr kidoElem = this->sdf->GetElement("kido");
+ // this->stepTimeDouble = kidoElem->GetElement("dt")->GetValueDouble();
}
//////////////////////////////////////////////////
-void DARTPhysics::Init()
+void KIDOPhysics::Init()
{
- // this->dartWorld->initialize();
+ // this->kidoWorld->initialize();
}
//////////////////////////////////////////////////
-void DARTPhysics::Fini()
+void KIDOPhysics::Fini()
{
PhysicsEngine::Fini();
}
//////////////////////////////////////////////////
-void DARTPhysics::Reset()
+void KIDOPhysics::Reset()
{
boost::recursive_mutex::scoped_lock lock(*this->physicsUpdateMutex);
// Restore state all the models
unsigned int modelCount = this->world->GetModelCount();
- DARTModelPtr dartModelIt;
+ KIDOModelPtr kidoModelIt;
for (unsigned int i = 0; i < modelCount; ++i)
{
- dartModelIt =
- boost::dynamic_pointer_cast<DARTModel>(this->world->GetModel(i));
- GZ_ASSERT(dartModelIt.get(), "dartModelIt pointer is NULL");
+ kidoModelIt =
+ boost::dynamic_pointer_cast<KIDOModel>(this->world->GetModel(i));
+ GZ_ASSERT(kidoModelIt.get(), "kidoModelIt pointer is NULL");
- dartModelIt->RestoreState();
+ kidoModelIt->RestoreState();
}
}
//////////////////////////////////////////////////
-void DARTPhysics::InitForThread()
+void KIDOPhysics::InitForThread()
{
}
//////////////////////////////////////////////////
-void DARTPhysics::UpdateCollision()
+void KIDOPhysics::UpdateCollision()
{
this->contactManager->ResetCount();
- dart::constraint::ConstraintSolver *dtConstraintSolver =
+ kido::constraint::ConstraintSolver *dtConstraintSolver =
this->dataPtr->dtWorld->getConstraintSolver();
- dart::collision::CollisionDetector *dtCollisionDetector =
+ kido::collision::CollisionDetector *dtCollisionDetector =
dtConstraintSolver->getCollisionDetector();
int numContacts = dtCollisionDetector->getNumContacts();
for (int i = 0; i < numContacts; ++i)
{
- const dart::collision::Contact &dtContact =
+ const kido::collision::Contact &dtContact =
dtCollisionDetector->getContact(i);
- dart::dynamics::BodyNode *dtBodyNode1 = dtContact.bodyNode1;
- dart::dynamics::BodyNode *dtBodyNode2 = dtContact.bodyNode2;
+ kido::dynamics::BodyNode *dtBodyNode1 = dtContact.bodyNode1;
+ kido::dynamics::BodyNode *dtBodyNode2 = dtContact.bodyNode2;
- DARTLinkPtr dartLink1 = this->FindDARTLink(dtBodyNode1);
- DARTLinkPtr dartLink2 = this->FindDARTLink(dtBodyNode2);
+ KIDOLinkPtr kidoLink1 = this->FindKIDOLink(dtBodyNode1);
+ KIDOLinkPtr kidoLink2 = this->FindKIDOLink(dtBodyNode2);
- GZ_ASSERT(dartLink1.get() != NULL, "dartLink1 in collision pare is NULL");
- GZ_ASSERT(dartLink2.get() != NULL, "dartLink2 in collision pare is NULL");
+ GZ_ASSERT(kidoLink1.get() != NULL, "kidoLink1 in collision pare is NULL");
+ GZ_ASSERT(kidoLink2.get() != NULL, "kidoLink2 in collision pare is NULL");
unsigned int colIndex = 0;
- CollisionPtr collisionPtr1 = dartLink1->GetCollision(colIndex);
- CollisionPtr collisionPtr2 = dartLink2->GetCollision(colIndex);
+ CollisionPtr collisionPtr1 = kidoLink1->GetCollision(colIndex);
+ CollisionPtr collisionPtr2 = kidoLink2->GetCollision(colIndex);
// Add a new contact to the manager. This will return NULL if no one is
// listening for contact information.
@@ -169,8 +169,8 @@ void DARTPhysics::UpdateCollision()
if (!contactFeedback)
continue;
- math::Pose body1Pose = dartLink1->GetWorldPose();
- math::Pose body2Pose = dartLink2->GetWorldPose();
+ math::Pose body1Pose = kidoLink1->GetWorldPose();
+ math::Pose body2Pose = kidoLink2->GetWorldPose();
math::Vector3 localForce1;
math::Vector3 localForce2;
math::Vector3 localTorque1;
@@ -189,25 +189,25 @@ void DARTPhysics::UpdateCollision()
// Convert from world to link frame
localForce1 = body1Pose.rot.RotateVectorReverse(
- DARTTypes::ConvVec3(force));
+ KIDOTypes::ConvVec3(force));
localForce2 = body2Pose.rot.RotateVectorReverse(
- DARTTypes::ConvVec3(-force));
+ KIDOTypes::ConvVec3(-force));
localTorque1 = body1Pose.rot.RotateVectorReverse(
- DARTTypes::ConvVec3(torqueA));
+ KIDOTypes::ConvVec3(torqueA));
localTorque2 = body2Pose.rot.RotateVectorReverse(
- DARTTypes::ConvVec3(torqueB));
+ KIDOTypes::ConvVec3(torqueB));
- contactFeedback->positions[0] = DARTTypes::ConvVec3(dtContact.point);
- contactFeedback->normals[0] = DARTTypes::ConvVec3(dtContact.normal);
+ contactFeedback->positions[0] = KIDOTypes::ConvVec3(dtContact.point);
+ contactFeedback->normals[0] = KIDOTypes::ConvVec3(dtContact.normal);
contactFeedback->depths[0] = dtContact.penetrationDepth;
- if (!dartLink1->IsStatic())
+ if (!kidoLink1->IsStatic())
{
contactFeedback->wrench[0].body1Force = localForce1;
contactFeedback->wrench[0].body1Torque = localTorque1;
}
- if (!dartLink2->IsStatic())
+ if (!kidoLink2->IsStatic())
{
contactFeedback->wrench[0].body2Force = localForce2;
contactFeedback->wrench[0].body2Torque = localTorque2;
@@ -218,7 +218,7 @@ void DARTPhysics::UpdateCollision()
}
//////////////////////////////////////////////////
-void DARTPhysics::UpdatePhysics()
+void KIDOPhysics::UpdatePhysics()
{
// need to lock, otherwise might conflict with world resetting
boost::recursive_mutex::scoped_lock lock(*this->physicsUpdateMutex);
@@ -228,7 +228,7 @@ void DARTPhysics::UpdatePhysics()
this->dataPtr->dtWorld->setTimeStep(this->maxStepSize);
this->dataPtr->dtWorld->step();
- // Update all the transformation of DART's links to gazebo's links
+ // Update all the transformation of KIDO's links to gazebo's links
// TODO: How to visit all the links in the world?
unsigned int modelCount = this->world->GetModelCount();
ModelPtr modelItr;
@@ -239,13 +239,13 @@ void DARTPhysics::UpdatePhysics()
// TODO: need to improve speed
Link_V links = modelItr->GetLinks();
unsigned int linkCount = links.size();
- DARTLinkPtr dartLinkItr;
+ KIDOLinkPtr kidoLinkItr;
for (unsigned int j = 0; j < linkCount; ++j)
{
- dartLinkItr
- = boost::dynamic_pointer_cast<DARTLink>(links.at(j));
- dartLinkItr->updateDirtyPoseFromDARTTransformation();
+ kidoLinkItr
+ = boost::dynamic_pointer_cast<KIDOLink>(links.at(j));
+ kidoLinkItr->updateDirtyPoseFromKIDOTransformation();
}
}
@@ -253,45 +253,45 @@ void DARTPhysics::UpdatePhysics()
}
//////////////////////////////////////////////////
-std::string DARTPhysics::GetType() const
+std::string KIDOPhysics::GetType() const
{
- return "dart";
+ return "kido";
}
//////////////////////////////////////////////////
-void DARTPhysics::SetSeed(uint32_t /*_seed*/)
+void KIDOPhysics::SetSeed(uint32_t /*_seed*/)
{
- gzwarn << "Not implemented yet in DART.\n";
+ gzwarn << "Not implemented yet in KIDO.\n";
}
//////////////////////////////////////////////////
-ModelPtr DARTPhysics::CreateModel(BasePtr _parent)
+ModelPtr KIDOPhysics::CreateModel(BasePtr _parent)
{
- DARTModelPtr model(new DARTModel(_parent));
+ KIDOModelPtr model(new KIDOModel(_parent));
return model;
}
//////////////////////////////////////////////////
-LinkPtr DARTPhysics::CreateLink(ModelPtr _parent)
+LinkPtr KIDOPhysics::CreateLink(ModelPtr _parent)
{
if (_parent == NULL)
{
- gzerr << "Link must have a parent in DART.\n";
+ gzerr << "Link must have a parent in KIDO.\n";
return LinkPtr();
}
- DARTLinkPtr link(new DARTLink(_parent));
+ KIDOLinkPtr link(new KIDOLink(_parent));
link->SetWorld(_parent->GetWorld());
return link;
}
//////////////////////////////////////////////////
-CollisionPtr DARTPhysics::CreateCollision(const std::string &_type,
+CollisionPtr KIDOPhysics::CreateCollision(const std::string &_type,
LinkPtr _body)
{
- DARTCollisionPtr collision(new DARTCollision(_body));
+ KIDOCollisionPtr collision(new KIDOCollision(_body));
ShapePtr shape = this->CreateShape(_type, collision);
collision->SetShape(shape);
shape->SetWorld(_body->GetWorld());
@@ -299,36 +299,36 @@ CollisionPtr DARTPhysics::CreateCollision(const std::string &_type,
}
//////////////////////////////////////////////////
-ShapePtr DARTPhysics::CreateShape(const std::string &_type,
+ShapePtr KIDOPhysics::CreateShape(const std::string &_type,
CollisionPtr _collision)
{
ShapePtr shape;
- DARTCollisionPtr collision =
- boost::dynamic_pointer_cast<DARTCollision>(_collision);
+ KIDOCollisionPtr collision =
+ boost::dynamic_pointer_cast<KIDOCollision>(_collision);
if (_type == "sphere")
- shape.reset(new DARTSphereShape(collision));
+ shape.reset(new KIDOSphereShape(collision));
else if (_type == "plane")
- shape.reset(new DARTPlaneShape(collision));
+ shape.reset(new KIDOPlaneShape(collision));
else if (_type == "box")
- shape.reset(new DARTBoxShape(collision));
+ shape.reset(new KIDOBoxShape(collision));
else if (_type == "cylinder")
- shape.reset(new DARTCylinderShape(collision));
+ shape.reset(new KIDOCylinderShape(collision));
else if (_type == "multiray")
- shape.reset(new DARTMultiRayShape(collision));
+ shape.reset(new KIDOMultiRayShape(collision));
else if (_type == "mesh" || _type == "trimesh")
- shape.reset(new DARTMeshShape(collision));
+ shape.reset(new KIDOMeshShape(collision));
else if (_type == "polyline")
- shape.reset(new DARTPolylineShape(collision));
+ shape.reset(new KIDOPolylineShape(collision));
else if (_type == "heightmap")
- shape.reset(new DARTHeightmapShape(collision));
+ shape.reset(new KIDOHeightmapShape(collision));
else if (_type == "map" || _type == "image")
shape.reset(new MapShape(collision));
else if (_type == "ray")
if (_collision)
- shape.reset(new DARTRayShape(collision));
+ shape.reset(new KIDORayShape(collision));
else
- shape.reset(new DARTRayShape(this->world->GetPhysicsEngine()));
+ shape.reset(new KIDORayShape(this->world->GetPhysicsEngine()));
else
gzerr << "Unable to create collision of type[" << _type << "]\n";
@@ -336,24 +336,24 @@ ShapePtr DARTPhysics::CreateShape(const std::string &_type,
}
//////////////////////////////////////////////////
-JointPtr DARTPhysics::CreateJoint(const std::string &_type, ModelPtr _parent)
+JointPtr KIDOPhysics::CreateJoint(const std::string &_type, ModelPtr _parent)
{
JointPtr joint;
if (_type == "prismatic")
- joint.reset(new DARTSliderJoint(_parent));
+ joint.reset(new KIDOSliderJoint(_parent));
else if (_type == "screw")
- joint.reset(new DARTScrewJoint(_parent));
+ joint.reset(new KIDOScrewJoint(_parent));
else if (_type == "revolute")
- joint.reset(new DARTHingeJoint(_parent));
+ joint.reset(new KIDOHingeJoint(_parent));
else if (_type == "revolute2")
- joint.reset(new DARTHinge2Joint(_parent));
+ joint.reset(new KIDOHinge2Joint(_parent));
else if (_type == "ball")
- joint.reset(new DARTBallJoint(_parent));
+ joint.reset(new KIDOBallJoint(_parent));
else if (_type == "universal")
- joint.reset(new DARTUniversalJoint(_parent));
+ joint.reset(new KIDOUniversalJoint(_parent));
else if (_type == "fixed")
- joint.reset(new DARTFixedJoint(_parent));
+ joint.reset(new KIDOFixedJoint(_parent));
else
gzerr << "Unable to create joint of type[" << _type << "]";
@@ -361,7 +361,7 @@ JointPtr DARTPhysics::CreateJoint(const std::string &_type, ModelPtr _parent)
}
//////////////////////////////////////////////////
-void DARTPhysics::SetGravity(const gazebo::math::Vector3 &_gravity)
+void KIDOPhysics::SetGravity(const gazebo::math::Vector3 &_gravity)
{
this->world->SetGravitySDF(_gravity.Ign());
this->dataPtr->dtWorld->setGravity(
@@ -369,13 +369,13 @@ void DARTPhysics::SetGravity(const gazebo::math::Vector3 &_gravity)
}
//////////////////////////////////////////////////
-void DARTPhysics::DebugPrint() const
+void KIDOPhysics::DebugPrint() const
{
- gzwarn << "Not implemented in DART.\n";
+ gzwarn << "Not implemented in KIDO.\n";
}
//////////////////////////////////////////////////
-boost::any DARTPhysics::GetParam(const std::string &_key) const
+boost::any KIDOPhysics::GetParam(const std::string &_key) const
{
boost::any value;
this->GetParam(_key, value);
@@ -383,23 +383,23 @@ boost::any DARTPhysics::GetParam(const std::string &_key) const
}
//////////////////////////////////////////////////
-bool DARTPhysics::GetParam(const std::string &_key, boost::any &_value) const
+bool KIDOPhysics::GetParam(const std::string &_key, boost::any &_value) const
{
- if (!this->sdf->HasElement("dart"))
+ if (!this->sdf->HasElement("kido"))
{
return PhysicsEngine::GetParam(_key, _value);
}
- sdf::ElementPtr dartElem = this->sdf->GetElement("dart");
- // physics dart element not yet added to sdformat
- // GZ_ASSERT(dartElem != NULL, "DART SDF element does not exist");
+ sdf::ElementPtr kidoElem = this->sdf->GetElement("kido");
+ // physics kido element not yet added to sdformat
+ // GZ_ASSERT(kidoElem != NULL, "KIDO SDF element does not exist");
if (_key == "max_contacts")
{
- _value = dartElem->GetElement("max_contacts")->Get<int>();
+ _value = kidoElem->GetElement("max_contacts")->Get<int>();
}
else if (_key == "min_step_size")
{
- _value = dartElem->GetElement("solver")->Get<double>("min_step_size");
+ _value = kidoElem->GetElement("solver")->Get<double>("min_step_size");
}
else
{
@@ -410,7 +410,7 @@ bool DARTPhysics::GetParam(const std::string &_key, boost::any &_value) const
}
//////////////////////////////////////////////////
-bool DARTPhysics::SetParam(const std::string &_key, const boost::any &_value)
+bool KIDOPhysics::SetParam(const std::string &_key, const boost::any &_value)
{
/// \TODO fill this out, see issue #1115
try
@@ -418,13 +418,13 @@ bool DARTPhysics::SetParam(const std::string &_key, const boost::any &_value)
if (_key == "max_contacts")
{
int value = boost::any_cast<int>(_value);
- gzerr << "Setting [" << _key << "] in DART to [" << value
+ gzerr << "Setting [" << _key << "] in KIDO to [" << value
<< "] not yet supported.\n";
}
else if (_key == "min_step_size")
{
double value = boost::any_cast<double>(_value);
- gzerr << "Setting [" << _key << "] in DART to [" << value
+ gzerr << "Setting [" << _key << "] in KIDO to [" << value
<< "] not yet supported.\n";
}
else
@@ -438,7 +438,7 @@ bool DARTPhysics::SetParam(const std::string &_key, const boost::any &_value)
}
catch(boost::bad_any_cast &e)
{
- gzerr << "DARTPhysics::SetParam(" << _key << ") boost::any_cast error: "
+ gzerr << "KIDOPhysics::SetParam(" << _key << ") boost::any_cast error: "
<< e.what() << std::endl;
return false;
}
@@ -446,13 +446,13 @@ bool DARTPhysics::SetParam(const std::string &_key, const boost::any &_value)
}
//////////////////////////////////////////////////
-dart::simulation::World *DARTPhysics::GetDARTWorld()
+kido::simulation::World *KIDOPhysics::GetKIDOWorld()
{
return this->dataPtr->dtWorld;
}
//////////////////////////////////////////////////
-void DARTPhysics::OnRequest(ConstRequestPtr &_msg)
+void KIDOPhysics::OnRequest(ConstRequestPtr &_msg)
{
msgs::Response response;
response.set_id(_msg->id());
@@ -463,7 +463,7 @@ void DARTPhysics::OnRequest(ConstRequestPtr &_msg)
if (_msg->request() == "physics_info")
{
msgs::Physics physicsMsg;
- physicsMsg.set_type(msgs::Physics::DART);
+ physicsMsg.set_type(msgs::Physics::KIDO);
physicsMsg.mutable_gravity()->CopyFrom(
msgs::Convert(this->world->Gravity()));
physicsMsg.mutable_magnetic_field()->CopyFrom(
@@ -480,7 +480,7 @@ void DARTPhysics::OnRequest(ConstRequestPtr &_msg)
}
//////////////////////////////////////////////////
-void DARTPhysics::OnPhysicsMsg(ConstPhysicsPtr& _msg)
+void KIDOPhysics::OnPhysicsMsg(ConstPhysicsPtr& _msg)
{
// Parent class handles many generic parameters
// This should be done first so that the profile settings
@@ -511,10 +511,10 @@ void DARTPhysics::OnPhysicsMsg(ConstPhysicsPtr& _msg)
}
//////////////////////////////////////////////////
-DARTLinkPtr DARTPhysics::FindDARTLink(
- const dart::dynamics::BodyNode *_dtBodyNode)
+KIDOLinkPtr KIDOPhysics::FindKIDOLink(
+ const kido::dynamics::BodyNode *_dtBodyNode)
{
- DARTLinkPtr res;
+ KIDOLinkPtr res;
const Model_V& models = this->world->GetModels();
@@ -526,11 +526,11 @@ DARTLinkPtr DARTPhysics::FindDARTLink(
for (Link_V::const_iterator itLink = links.begin();
itLink != links.end(); ++itLink)
{
- DARTLinkPtr dartLink = boost::dynamic_pointer_cast<DARTLink>(*itLink);
+ KIDOLinkPtr kidoLink = boost::dynamic_pointer_cast<KIDOLink>(*itLink);
- if (dartLink->GetDARTBodyNode() == _dtBodyNode)
+ if (kidoLink->GetKIDOBodyNode() == _dtBodyNode)
{
- res = dartLink;
+ res = kidoLink;
break;
}
}
diff --git a/gazebo/physics/dart/DARTPhysics.hh b/gazebo/physics/kido/KIDOPhysics.hh
similarity index 79%
rename from gazebo/physics/dart/DARTPhysics.hh
rename to gazebo/physics/kido/KIDOPhysics.hh
index e440f74..246bcb2 100644
--- a/gazebo/physics/dart/DARTPhysics.hh
+++ b/gazebo/physics/kido/KIDOPhysics.hh
@@ -15,8 +15,8 @@
*
*/
-#ifndef _GAZEBO_DARTPHYSICS_HH_
-#define _GAZEBO_DARTPHYSICS_HH_
+#ifndef _GAZEBO_KIDOPHYSICS_HH_
+#define _GAZEBO_KIDOPHYSICS_HH_
#include <string>
@@ -27,8 +27,8 @@
#include "gazebo/physics/Collision.hh"
#include "gazebo/physics/Shape.hh"
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
@@ -36,19 +36,19 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class.
- class DARTPhysicsPrivate;
+ class KIDOPhysicsPrivate;
/// \ingroup gazebo_physics
- /// \addtogroup gazebo_physics_dart DART Physics
- /// \brief DART physics engine wrapper
+ /// \addtogroup gazebo_physics_kido KIDO Physics
+ /// \brief KIDO physics engine wrapper
/// \{
- /// \brief DART physics engine
- class GZ_PHYSICS_VISIBLE DARTPhysics : public PhysicsEngine
+ /// \brief KIDO physics engine
+ class GZ_PHYSICS_VISIBLE KIDOPhysics : public PhysicsEngine
{
- /// \enum DARTParam
- /// \brief DART physics parameter types.
- public: enum DARTParam
+ /// \enum KIDOParam
+ /// \brief KIDO physics parameter types.
+ public: enum KIDOParam
{
// /// \brief Solve type
// SOLVER_TYPE,
@@ -76,10 +76,10 @@ namespace gazebo
};
/// \brief Constructor
- public: DARTPhysics(WorldPtr _world);
+ public: KIDOPhysics(WorldPtr _world);
/// \brief Destructor
- public: virtual ~DARTPhysics();
+ public: virtual ~KIDOPhysics();
// Documentation inherited
public: virtual void Load(sdf::ElementPtr _sdf);
@@ -143,9 +143,9 @@ namespace gazebo
public: virtual bool SetParam(const std::string &_key,
const boost::any &_value);
- /// \brief Get pointer to DART World associated with this DART Physics.
- /// \return The pointer to DART World.
- public: dart::simulation::World *GetDARTWorld();
+ /// \brief Get pointer to KIDO World associated with this KIDO Physics.
+ /// \return The pointer to KIDO World.
+ public: kido::simulation::World *GetKIDOWorld();
// Documentation inherited
protected: virtual void OnRequest(ConstRequestPtr &_msg);
@@ -153,15 +153,15 @@ namespace gazebo
// Documentation inherited
protected: virtual void OnPhysicsMsg(ConstPhysicsPtr &_msg);
- /// \brief Find DART Link corresponding to DART BodyNode.
- /// \param[in] _dtBodyNode The DART BodyNode.
- /// \return Pointer to the DART Link.
- private: DARTLinkPtr FindDARTLink(
- const dart::dynamics::BodyNode *_dtBodyNode);
+ /// \brief Find KIDO Link corresponding to KIDO BodyNode.
+ /// \param[in] _dtBodyNode The KIDO BodyNode.
+ /// \return Pointer to the KIDO Link.
+ private: KIDOLinkPtr FindKIDOLink(
+ const kido::dynamics::BodyNode *_dtBodyNode);
/// \internal
/// \brief Pointer to private data.
- private: DARTPhysicsPrivate *dataPtr;
+ private: KIDOPhysicsPrivate *dataPtr;
};
/// \}
diff --git a/gazebo/physics/dart/DARTPhysicsPrivate.hh b/gazebo/physics/kido/KIDOPhysicsPrivate.hh
similarity index 64%
rename from gazebo/physics/dart/DARTPhysicsPrivate.hh
rename to gazebo/physics/kido/KIDOPhysicsPrivate.hh
index 1a4dba7..08c4630 100644
--- a/gazebo/physics/dart/DARTPhysicsPrivate.hh
+++ b/gazebo/physics/kido/KIDOPhysicsPrivate.hh
@@ -15,36 +15,36 @@
*
*/
-#ifndef _GAZEBO_DARTPHYSICS_PRIVATE_HH_
-#define _GAZEBO_DARTPHYSICS_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOPHYSICS_PRIVATE_HH_
+#define _GAZEBO_KIDOPHYSICS_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
+#include "gazebo/physics/kido/kido_inc.h"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTPhysics
- class DARTPhysicsPrivate
+ /// \brief Private data class for KIDOPhysics
+ class KIDOPhysicsPrivate
{
/// \brief Constructor
- public: DARTPhysicsPrivate()
- : dtWorld(new dart::simulation::World())
+ public: KIDOPhysicsPrivate()
+ : dtWorld(new kido::simulation::World())
{
}
/// \brief Default destructor
- public: ~DARTPhysicsPrivate()
+ public: ~KIDOPhysicsPrivate()
{
delete dtWorld;
}
/// \brief Disabled copy constructor
- public: DARTPhysicsPrivate(const DARTPhysicsPrivate&) = delete;
+ public: KIDOPhysicsPrivate(const KIDOPhysicsPrivate&) = delete;
- /// \brief Pointer to DART World associated with this DART Physics.
- public: dart::simulation::World *dtWorld;
+ /// \brief Pointer to KIDO World associated with this KIDO Physics.
+ public: kido::simulation::World *dtWorld;
};
}
}
diff --git a/gazebo/physics/dart/DARTPlaneShape.cc b/gazebo/physics/kido/KIDOPlaneShape.cc
similarity index 61%
rename from gazebo/physics/dart/DARTPlaneShape.cc
rename to gazebo/physics/kido/KIDOPlaneShape.cc
index b36eae9..51fcfe6 100644
--- a/gazebo/physics/dart/DARTPlaneShape.cc
+++ b/gazebo/physics/kido/KIDOPlaneShape.cc
@@ -16,50 +16,50 @@
*/
#include "gazebo/common/Console.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTPlaneShape.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOPlaneShape.hh"
#include "gazebo/util/system.hh"
-#include "gazebo/physics/dart/DARTPlaneShapePrivate.hh"
+#include "gazebo/physics/kido/KIDOPlaneShapePrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTPlaneShape::DARTPlaneShape(CollisionPtr _parent)
+KIDOPlaneShape::KIDOPlaneShape(CollisionPtr _parent)
: PlaneShape(_parent),
- dataPtr(new DARTPlaneShapePrivate())
+ dataPtr(new KIDOPlaneShapePrivate())
{
}
//////////////////////////////////////////////////
-DARTPlaneShape::~DARTPlaneShape()
+KIDOPlaneShape::~KIDOPlaneShape()
{
delete this->dataPtr;
}
//////////////////////////////////////////////////
-void DARTPlaneShape::CreatePlane()
+void KIDOPlaneShape::CreatePlane()
{
PlaneShape::CreatePlane();
- DARTCollisionPtr dartCollisionParent =
- boost::dynamic_pointer_cast<DARTCollision>(this->collisionParent);
+ KIDOCollisionPtr kidoCollisionParent =
+ boost::dynamic_pointer_cast<KIDOCollision>(this->collisionParent);
// math::Vector3 n = this->GetNormal();
- dart::dynamics::BodyNode *dtBodyNode =
- dartCollisionParent->GetDARTBodyNode();
- dart::dynamics::BoxShape *dtBoxShape =
- new dart::dynamics::BoxShape(Eigen::Vector3d(2100, 2100, 0.01));
+ kido::dynamics::BodyNode *dtBodyNode =
+ kidoCollisionParent->GetKIDOBodyNode();
+ kido::dynamics::BoxShape *dtBoxShape =
+ new kido::dynamics::BoxShape(Eigen::Vector3d(2100, 2100, 0.01));
dtBodyNode->addCollisionShape(dtBoxShape);
dtBoxShape->setOffset(Eigen::Vector3d(0.0, 0.0, -0.005));
- dartCollisionParent->SetDARTCollisionShape(dtBoxShape, false);
+ kidoCollisionParent->SetKIDOCollisionShape(dtBoxShape, false);
}
//////////////////////////////////////////////////
-void DARTPlaneShape::SetAltitude(const math::Vector3 &_pos)
+void KIDOPlaneShape::SetAltitude(const math::Vector3 &_pos)
{
PlaneShape::SetAltitude(_pos);
}
diff --git a/gazebo/physics/dart/DARTPlaneShape.hh b/gazebo/physics/kido/KIDOPlaneShape.hh
similarity index 72%
rename from gazebo/physics/dart/DARTPlaneShape.hh
rename to gazebo/physics/kido/KIDOPlaneShape.hh
index 5a10b7b..ad6a687 100644
--- a/gazebo/physics/dart/DARTPlaneShape.hh
+++ b/gazebo/physics/kido/KIDOPlaneShape.hh
@@ -14,11 +14,11 @@
* limitations under the License.
*
*/
-#ifndef _GAZEBO_DARTPLANESHAPE_HH_
-#define _GAZEBO_DARTPLANESHAPE_HH_
+#ifndef _GAZEBO_KIDOPLANESHAPE_HH_
+#define _GAZEBO_KIDOPLANESHAPE_HH_
#include "gazebo/physics/PlaneShape.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
#include "gazebo/util/system.hh"
namespace gazebo
@@ -26,20 +26,20 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTPlaneShapePrivate;
+ class KIDOPlaneShapePrivate;
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \brief An DART Plane shape.
- class GZ_PHYSICS_VISIBLE DARTPlaneShape : public PlaneShape
+ /// \brief An KIDO Plane shape.
+ class GZ_PHYSICS_VISIBLE KIDOPlaneShape : public PlaneShape
{
/// \brief Constructor.
/// \param[in] _parent Parent Collision.
- public: explicit DARTPlaneShape(CollisionPtr _parent);
+ public: explicit KIDOPlaneShape(CollisionPtr _parent);
/// \brief Destructor.
- public: virtual ~DARTPlaneShape();
+ public: virtual ~KIDOPlaneShape();
// Documentation inherited
public: virtual void CreatePlane();
@@ -49,7 +49,7 @@ namespace gazebo
/// \internal
/// \brief Pointer to private data
- private: DARTPlaneShapePrivate *dataPtr;
+ private: KIDOPlaneShapePrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTPlaneShapePrivate.hh b/gazebo/physics/kido/KIDOPlaneShapePrivate.hh
similarity index 68%
copy from gazebo/physics/dart/DARTPlaneShapePrivate.hh
copy to gazebo/physics/kido/KIDOPlaneShapePrivate.hh
index fcc04f4..27e16c4 100644
--- a/gazebo/physics/dart/DARTPlaneShapePrivate.hh
+++ b/gazebo/physics/kido/KIDOPlaneShapePrivate.hh
@@ -15,25 +15,25 @@
*
*/
-#ifndef _GAZEBO_DARTPLANESHAPE_PRIVATE_HH_
-#define _GAZEBO_DARTPLANESHAPE_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOPLANESHAPE_PRIVATE_HH_
+#define _GAZEBO_KIDOPLANESHAPE_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTPlaneShape
- class DARTPlaneShapePrivate
+ /// \brief Private data class for KIDOPlaneShape
+ class KIDOPlaneShapePrivate
{
/// \brief Constructor
- public: DARTPlaneShapePrivate() = default;
+ public: KIDOPlaneShapePrivate() = default;
/// \brief Default destructor
- public: ~DARTPlaneShapePrivate() = default;
+ public: ~KIDOPlaneShapePrivate() = default;
};
}
}
diff --git a/gazebo/physics/dart/DARTPolylineShape.cc b/gazebo/physics/kido/KIDOPolylineShape.cc
similarity index 64%
rename from gazebo/physics/dart/DARTPolylineShape.cc
rename to gazebo/physics/kido/KIDOPolylineShape.cc
index 36f291a..08ed4c0 100644
--- a/gazebo/physics/dart/DARTPolylineShape.cc
+++ b/gazebo/physics/kido/KIDOPolylineShape.cc
@@ -17,46 +17,46 @@
#include "gazebo/common/Mesh.hh"
#include "gazebo/common/Console.hh"
-#include "gazebo/physics/dart/DARTMesh.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTPolylineShape.hh"
+#include "gazebo/physics/kido/KIDOMesh.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDOPolylineShape.hh"
-#include "gazebo/physics/dart/DARTPolylineShapePrivate.hh"
+#include "gazebo/physics/kido/KIDOPolylineShapePrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTPolylineShape::DARTPolylineShape(CollisionPtr _parent)
+KIDOPolylineShape::KIDOPolylineShape(CollisionPtr _parent)
: PolylineShape(_parent),
- dataPtr(new DARTPolylineShapePrivate())
+ dataPtr(new KIDOPolylineShapePrivate())
{
}
//////////////////////////////////////////////////
-DARTPolylineShape::~DARTPolylineShape()
+KIDOPolylineShape::~KIDOPolylineShape()
{
delete this->dataPtr;
}
//////////////////////////////////////////////////
-void DARTPolylineShape::Load(sdf::ElementPtr _sdf)
+void KIDOPolylineShape::Load(sdf::ElementPtr _sdf)
{
PolylineShape::Load(_sdf);
}
//////////////////////////////////////////////////
-void DARTPolylineShape::Init()
+void KIDOPolylineShape::Init()
{
PolylineShape::Init();
if (!this->mesh)
{
- gzerr << "Unable to create polyline in DART. Mesh pointer is null.\n";
+ gzerr << "Unable to create polyline in KIDO. Mesh pointer is null.\n";
return;
}
- this->dataPtr->dartMesh->Init(this->mesh,
- boost::static_pointer_cast<DARTCollision>(this->collisionParent),
+ this->dataPtr->kidoMesh->Init(this->mesh,
+ boost::static_pointer_cast<KIDOCollision>(this->collisionParent),
math::Vector3(1, 1, 1));
}
diff --git a/gazebo/physics/dart/DARTPolylineShape.hh b/gazebo/physics/kido/KIDOPolylineShape.hh
similarity index 74%
rename from gazebo/physics/dart/DARTPolylineShape.hh
rename to gazebo/physics/kido/KIDOPolylineShape.hh
index a50e76c..a221ff1 100644
--- a/gazebo/physics/dart/DARTPolylineShape.hh
+++ b/gazebo/physics/kido/KIDOPolylineShape.hh
@@ -14,8 +14,8 @@
* limitations under the License.
*
*/
-#ifndef _GAZEBO_DARTPOLYLINESHAPE_HH_
-#define _GAZEBO_DARTPOLYLINESHAPE_HH_
+#ifndef _GAZEBO_KIDOPOLYLINESHAPE_HH_
+#define _GAZEBO_KIDOPOLYLINESHAPE_HH_
#include "gazebo/physics/PolylineShape.hh"
#include "gazebo/util/system.hh"
@@ -25,20 +25,20 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTPolylineShapePrivate;
+ class KIDOPolylineShapePrivate;
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \brief DART polyline shape
- class GZ_PHYSICS_VISIBLE DARTPolylineShape : public PolylineShape
+ /// \brief KIDO polyline shape
+ class GZ_PHYSICS_VISIBLE KIDOPolylineShape : public PolylineShape
{
/// \brief Constructor
/// \param[in] _parent Collision parent.
- public: explicit DARTPolylineShape(CollisionPtr _parent);
+ public: explicit KIDOPolylineShape(CollisionPtr _parent);
/// \brief Destructor.
- public: virtual ~DARTPolylineShape();
+ public: virtual ~KIDOPolylineShape();
// Documentation inherited
public: virtual void Load(sdf::ElementPtr _sdf);
@@ -48,7 +48,7 @@ namespace gazebo
/// \internal
/// \brief Pointer to private data
- private: DARTPolylineShapePrivate *dataPtr;
+ private: KIDOPolylineShapePrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTPolylineShapePrivate.hh b/gazebo/physics/kido/KIDOPolylineShapePrivate.hh
similarity index 59%
rename from gazebo/physics/dart/DARTPolylineShapePrivate.hh
rename to gazebo/physics/kido/KIDOPolylineShapePrivate.hh
index 8c141f5..9ef46c6 100644
--- a/gazebo/physics/dart/DARTPolylineShapePrivate.hh
+++ b/gazebo/physics/kido/KIDOPolylineShapePrivate.hh
@@ -15,39 +15,39 @@
*
*/
-#ifndef _GAZEBO_DARTPOLYLINESHAPE_PRIVATE_HH_
-#define _GAZEBO_DARTPOLYLINESHAPE_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOPOLYLINESHAPE_PRIVATE_HH_
+#define _GAZEBO_KIDOPOLYLINESHAPE_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTMesh.hh"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOMesh.hh"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTPolylineShape
- class DARTPolylineShapePrivate
+ /// \brief Private data class for KIDOPolylineShape
+ class KIDOPolylineShapePrivate
{
/// \brief Constructor
- public: DARTPolylineShapePrivate()
- : dartMesh(new DARTMesh())
+ public: KIDOPolylineShapePrivate()
+ : kidoMesh(new KIDOMesh())
{
}
/// \brief Default destructor
- public: ~DARTPolylineShapePrivate()
+ public: ~KIDOPolylineShapePrivate()
{
- delete this->dartMesh;
+ delete this->kidoMesh;
}
/// \brief Disabled copy constructor
- public: DARTPolylineShapePrivate(const DARTPolylineShapePrivate&)
+ public: KIDOPolylineShapePrivate(const KIDOPolylineShapePrivate&)
= delete;
- /// \brief DART collision mesh helper class
- public: DARTMesh *dartMesh;
+ /// \brief KIDO collision mesh helper class
+ public: KIDOMesh *kidoMesh;
};
}
}
diff --git a/gazebo/physics/dart/DARTRayShape.cc b/gazebo/physics/kido/KIDORayShape.cc
similarity index 66%
rename from gazebo/physics/dart/DARTRayShape.cc
rename to gazebo/physics/kido/KIDORayShape.cc
index ee222c4..1aa0b1f 100644
--- a/gazebo/physics/dart/DARTRayShape.cc
+++ b/gazebo/physics/kido/KIDORayShape.cc
@@ -19,46 +19,46 @@
#include "gazebo/physics/World.hh"
#include "gazebo/physics/Link.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTTypes.hh"
-#include "gazebo/physics/dart/DARTLink.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTRayShape.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDOTypes.hh"
+#include "gazebo/physics/kido/KIDOLink.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDORayShape.hh"
-#include "gazebo/physics/dart/DARTRayShapePrivate.hh"
+#include "gazebo/physics/kido/KIDORayShapePrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTRayShape::DARTRayShape(PhysicsEnginePtr _physicsEngine)
+KIDORayShape::KIDORayShape(PhysicsEnginePtr _physicsEngine)
: RayShape(_physicsEngine),
- dataPtr(new DARTRayShapePrivate())
+ dataPtr(new KIDORayShapePrivate())
{
- this->SetName("DART_ray_shape");
+ this->SetName("KIDO_ray_shape");
}
//////////////////////////////////////////////////
-DARTRayShape::DARTRayShape(CollisionPtr _parent)
+KIDORayShape::KIDORayShape(CollisionPtr _parent)
: RayShape(_parent),
- dataPtr(new DARTRayShapePrivate())
+ dataPtr(new KIDORayShapePrivate())
{
- this->SetName("DART_ray_shape");
+ this->SetName("KIDO_ray_shape");
}
//////////////////////////////////////////////////
-DARTRayShape::~DARTRayShape()
+KIDORayShape::~KIDORayShape()
{
}
//////////////////////////////////////////////////
-void DARTRayShape::Update()
+void KIDORayShape::Update()
{
// Not implemented yet, please see issue #911
}
//////////////////////////////////////////////////
-void DARTRayShape::GetIntersection(double &_dist, std::string &_entity)
+void KIDORayShape::GetIntersection(double &_dist, std::string &_entity)
{
_dist = 0;
_entity = "";
@@ -67,7 +67,7 @@ void DARTRayShape::GetIntersection(double &_dist, std::string &_entity)
}
//////////////////////////////////////////////////
-void DARTRayShape::SetPoints(const math::Vector3& _posStart,
+void KIDORayShape::SetPoints(const math::Vector3& _posStart,
const math::Vector3& _posEnd)
{
RayShape::SetPoints(_posStart, _posEnd);
diff --git a/gazebo/physics/dart/DARTRayShape.hh b/gazebo/physics/kido/KIDORayShape.hh
similarity index 81%
rename from gazebo/physics/dart/DARTRayShape.hh
rename to gazebo/physics/kido/KIDORayShape.hh
index 2c106b6..b89d7ef 100644
--- a/gazebo/physics/dart/DARTRayShape.hh
+++ b/gazebo/physics/kido/KIDORayShape.hh
@@ -15,39 +15,39 @@
*
*/
-#ifndef _GAZEBO_DARTRAYSHAPE_HH_
-#define _GAZEBO_DARTRAYSHAPE_HH_
+#ifndef _GAZEBO_KIDORAYSHAPE_HH_
+#define _GAZEBO_KIDORAYSHAPE_HH_
#include <string>
#include "gazebo/physics/RayShape.hh"
#include "gazebo/physics/Shape.hh"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/KIDOTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
/// Forward declare private data class
- class DARTRayShapePrivate;
+ class KIDORayShapePrivate;
/// \brief Ray collision
- class GZ_PHYSICS_VISIBLE DARTRayShape : public RayShape
+ class GZ_PHYSICS_VISIBLE KIDORayShape : public RayShape
{
/// \brief Constructor for a global ray.
/// \param[in] _physicsEngine Pointer to the physics engine.
- public: explicit DARTRayShape(PhysicsEnginePtr _physicsEngine);
+ public: explicit KIDORayShape(PhysicsEnginePtr _physicsEngine);
/// \brief Constructor.
/// \param[in] _collision Collision object this ray is attached to.
- public: explicit DARTRayShape(CollisionPtr _collision);
+ public: explicit KIDORayShape(CollisionPtr _collision);
/// \brief Destructor.
- public: virtual ~DARTRayShape();
+ public: virtual ~KIDORayShape();
/// \brief Update the ray collision
public: virtual void Update();
@@ -66,7 +66,7 @@ namespace gazebo
/// \internal
/// \brief Pointer to private data
- private: DARTRayShapePrivate *dataPtr;
+ private: KIDORayShapePrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTBoxShapePrivate.hh b/gazebo/physics/kido/KIDORayShapePrivate.hh
similarity index 69%
rename from gazebo/physics/dart/DARTBoxShapePrivate.hh
rename to gazebo/physics/kido/KIDORayShapePrivate.hh
index fc88ca1..37712cb 100644
--- a/gazebo/physics/dart/DARTBoxShapePrivate.hh
+++ b/gazebo/physics/kido/KIDORayShapePrivate.hh
@@ -15,25 +15,25 @@
*
*/
-#ifndef _GAZEBO_DARTBOXSHAPE_PRIVATE_HH_
-#define _GAZEBO_DARTBOXSHAPE_PRIVATE_HH_
+#ifndef _GAZEBO_KIDORAYSHAPE_PRIVATE_HH_
+#define _GAZEBO_KIDORAYSHAPE_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTBoxShape
- class DARTBoxShapePrivate
+ /// \brief Private data class for KIDORayShape
+ class KIDORayShapePrivate
{
/// \brief Constructor
- public: DARTBoxShapePrivate() = default;
+ public: KIDORayShapePrivate() = default;
/// \brief Default destructor
- public: ~DARTBoxShapePrivate() = default;
+ public: ~KIDORayShapePrivate() = default;
};
}
}
diff --git a/gazebo/physics/dart/DARTScrewJoint.cc b/gazebo/physics/kido/KIDOScrewJoint.cc
similarity index 67%
rename from gazebo/physics/dart/DARTScrewJoint.cc
rename to gazebo/physics/kido/KIDOScrewJoint.cc
index 78b5c32..ef6652a 100644
--- a/gazebo/physics/dart/DARTScrewJoint.cc
+++ b/gazebo/physics/kido/KIDOScrewJoint.cc
@@ -21,64 +21,64 @@
#include "gazebo/common/Console.hh"
#include "gazebo/physics/Link.hh"
-#include "gazebo/physics/dart/DARTJointPrivate.hh"
-#include "gazebo/physics/dart/DARTScrewJoint.hh"
+#include "gazebo/physics/kido/KIDOJointPrivate.hh"
+#include "gazebo/physics/kido/KIDOScrewJoint.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTScrewJoint::DARTScrewJoint(BasePtr _parent)
- : ScrewJoint<DARTJoint>(_parent)
+KIDOScrewJoint::KIDOScrewJoint(BasePtr _parent)
+ : ScrewJoint<KIDOJoint>(_parent)
{
- this->dataPtr->dtJoint = new dart::dynamics::ScrewJoint();
+ this->dataPtr->dtJoint = new kido::dynamics::ScrewJoint();
}
//////////////////////////////////////////////////
-DARTScrewJoint::~DARTScrewJoint()
+KIDOScrewJoint::~KIDOScrewJoint()
{
// We don't need to delete dtJoint because the world will delete it
}
//////////////////////////////////////////////////
-void DARTScrewJoint::Load(sdf::ElementPtr _sdf)
+void KIDOScrewJoint::Load(sdf::ElementPtr _sdf)
{
- ScrewJoint<DARTJoint>::Load(_sdf);
+ ScrewJoint<KIDOJoint>::Load(_sdf);
this->SetThreadPitch(0, this->threadPitch);
}
//////////////////////////////////////////////////
-void DARTScrewJoint::SetAnchor(unsigned int /*index*/,
+void KIDOScrewJoint::SetAnchor(unsigned int /*index*/,
const math::Vector3 &/*_anchor*/)
{
- gzerr << "DARTScrewJoint::SetAnchor not implemented.\n";
+ gzerr << "KIDOScrewJoint::SetAnchor not implemented.\n";
}
//////////////////////////////////////////////////
-void DARTScrewJoint::Init()
+void KIDOScrewJoint::Init()
{
- ScrewJoint<DARTJoint>::Init();
+ ScrewJoint<KIDOJoint>::Init();
}
//////////////////////////////////////////////////
-math::Vector3 DARTScrewJoint::GetAnchor(unsigned int /*index*/) const
+math::Vector3 KIDOScrewJoint::GetAnchor(unsigned int /*index*/) const
{
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
this->dataPtr->dtJoint->getTransformFromChildBodyNode();
Eigen::Vector3d worldOrigin = T.translation();
- return DARTTypes::ConvVec3(worldOrigin);
+ return KIDOTypes::ConvVec3(worldOrigin);
}
//////////////////////////////////////////////////
-math::Vector3 DARTScrewJoint::GetGlobalAxis(unsigned int _index) const
+math::Vector3 KIDOScrewJoint::GetGlobalAxis(unsigned int _index) const
{
Eigen::Vector3d globalAxis = Eigen::Vector3d::UnitX();
if (_index < this->GetAngleCount())
{
- dart::dynamics::ScrewJoint *dtScrewJoint =
- reinterpret_cast<dart::dynamics::ScrewJoint *>(this->dataPtr->dtJoint);
+ kido::dynamics::ScrewJoint *dtScrewJoint =
+ reinterpret_cast<kido::dynamics::ScrewJoint *>(this->dataPtr->dtJoint);
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
this->dataPtr->dtJoint->getTransformFromChildBodyNode();
@@ -93,26 +93,26 @@ math::Vector3 DARTScrewJoint::GetGlobalAxis(unsigned int _index) const
// TODO: Issue #494
// See: https://bitbucket.org/osrf/gazebo/issue/494
// joint-axis-reference-frame-doesnt-match
- return DARTTypes::ConvVec3(globalAxis);
+ return KIDOTypes::ConvVec3(globalAxis);
}
//////////////////////////////////////////////////
-void DARTScrewJoint::SetAxis(unsigned int _index, const math::Vector3 &_axis)
+void KIDOScrewJoint::SetAxis(unsigned int _index, const math::Vector3 &_axis)
{
if (_index == 0)
{
- dart::dynamics::ScrewJoint *dtScrewJoint =
- reinterpret_cast<dart::dynamics::ScrewJoint *>(this->dataPtr->dtJoint);
+ kido::dynamics::ScrewJoint *dtScrewJoint =
+ reinterpret_cast<kido::dynamics::ScrewJoint *>(this->dataPtr->dtJoint);
// TODO: Issue #494
// See: https://bitbucket.org/osrf/gazebo/issue/494
// joint-axis-reference-frame-doesnt-match
- Eigen::Vector3d dartVec3 = DARTTypes::ConvVec3(_axis);
- Eigen::Isometry3d dartTransfJointLeftToParentLink
+ Eigen::Vector3d kidoVec3 = KIDOTypes::ConvVec3(_axis);
+ Eigen::Isometry3d kidoTransfJointLeftToParentLink
= this->dataPtr->dtJoint->getTransformFromParentBodyNode().inverse();
- dartVec3 = dartTransfJointLeftToParentLink.linear() * dartVec3;
+ kidoVec3 = kidoTransfJointLeftToParentLink.linear() * kidoVec3;
- dtScrewJoint->setAxis(dartVec3);
+ dtScrewJoint->setAxis(kidoVec3);
}
else
{
@@ -121,7 +121,7 @@ void DARTScrewJoint::SetAxis(unsigned int _index, const math::Vector3 &_axis)
}
//////////////////////////////////////////////////
-double DARTScrewJoint::GetVelocity(unsigned int _index) const
+double KIDOScrewJoint::GetVelocity(unsigned int _index) const
{
double result = 0.0;
@@ -134,7 +134,7 @@ double DARTScrewJoint::GetVelocity(unsigned int _index) const
}
//////////////////////////////////////////////////
-void DARTScrewJoint::SetVelocity(unsigned int _index, double _vel)
+void KIDOScrewJoint::SetVelocity(unsigned int _index, double _vel)
{
if (_index == 0)
this->dataPtr->dtJoint->setVelocity(0, _vel);
@@ -143,7 +143,7 @@ void DARTScrewJoint::SetVelocity(unsigned int _index, double _vel)
}
//////////////////////////////////////////////////
-void DARTScrewJoint::SetThreadPitch(unsigned int _index, double _threadPitch)
+void KIDOScrewJoint::SetThreadPitch(unsigned int _index, double _threadPitch)
{
if (_index >= this->GetAngleCount())
gzerr << "Invalid index[" << _index << "]\n";
@@ -152,17 +152,17 @@ void DARTScrewJoint::SetThreadPitch(unsigned int _index, double _threadPitch)
}
//////////////////////////////////////////////////
-void DARTScrewJoint::SetThreadPitch(double _threadPitch)
+void KIDOScrewJoint::SetThreadPitch(double _threadPitch)
{
- dart::dynamics::ScrewJoint *dtScrewJoint =
- reinterpret_cast<dart::dynamics::ScrewJoint *>(this->dataPtr->dtJoint);
+ kido::dynamics::ScrewJoint *dtScrewJoint =
+ reinterpret_cast<kido::dynamics::ScrewJoint *>(this->dataPtr->dtJoint);
this->threadPitch = _threadPitch;
- dtScrewJoint->setPitch(DARTTypes::InvertThreadPitch(_threadPitch));
+ dtScrewJoint->setPitch(KIDOTypes::InvertThreadPitch(_threadPitch));
}
//////////////////////////////////////////////////
-double DARTScrewJoint::GetThreadPitch(unsigned int _index)
+double KIDOScrewJoint::GetThreadPitch(unsigned int _index)
{
if (_index >= this->GetAngleCount())
gzerr << "Invalid index[" << _index << "]\n";
@@ -171,31 +171,31 @@ double DARTScrewJoint::GetThreadPitch(unsigned int _index)
}
//////////////////////////////////////////////////
-double DARTScrewJoint::GetThreadPitch()
+double KIDOScrewJoint::GetThreadPitch()
{
- dart::dynamics::ScrewJoint *dtScrewJoint =
- reinterpret_cast<dart::dynamics::ScrewJoint *>(this->dataPtr->dtJoint);
+ kido::dynamics::ScrewJoint *dtScrewJoint =
+ reinterpret_cast<kido::dynamics::ScrewJoint *>(this->dataPtr->dtJoint);
double result = this->threadPitch;
if (dtScrewJoint)
- result = DARTTypes::InvertThreadPitch(dtScrewJoint->getPitch());
+ result = KIDOTypes::InvertThreadPitch(dtScrewJoint->getPitch());
else
- gzwarn << "dartScrewJoint not created yet, returning cached threadPitch.\n";
+ gzwarn << "kidoScrewJoint not created yet, returning cached threadPitch.\n";
return result;
}
//////////////////////////////////////////////////
-double DARTScrewJoint::GetParam(const std::string &_key, unsigned int _index)
+double KIDOScrewJoint::GetParam(const std::string &_key, unsigned int _index)
{
if (_key == "thread_pitch")
return this->GetThreadPitch();
else
- return DARTJoint::GetParam(_key, _index);
+ return KIDOJoint::GetParam(_key, _index);
}
//////////////////////////////////////////////////
-math::Angle DARTScrewJoint::GetAngleImpl(unsigned int _index) const
+math::Angle KIDOScrewJoint::GetAngleImpl(unsigned int _index) const
{
math::Angle result;
@@ -210,7 +210,7 @@ math::Angle DARTScrewJoint::GetAngleImpl(unsigned int _index) const
// linear position
const double radianAngle = this->dataPtr->dtJoint->getPosition(0);
result.SetFromRadian(-radianAngle /
- const_cast<DARTScrewJoint*>(this)->GetThreadPitch());
+ const_cast<KIDOScrewJoint*>(this)->GetThreadPitch());
// TODO: The ScrewJoint::GetThreadPitch() function is not const. As an
// workaround, we use const_cast here until #1686 is resolved.
}
@@ -223,7 +223,7 @@ math::Angle DARTScrewJoint::GetAngleImpl(unsigned int _index) const
}
//////////////////////////////////////////////////
-void DARTScrewJoint::SetForceImpl(unsigned int _index, double _effort)
+void KIDOScrewJoint::SetForceImpl(unsigned int _index, double _effort)
{
if (_index == 0)
this->dataPtr->dtJoint->setForce(0, _effort);
@@ -232,7 +232,7 @@ void DARTScrewJoint::SetForceImpl(unsigned int _index, double _effort)
}
//////////////////////////////////////////////////
-math::Angle DARTScrewJoint::GetHighStop(unsigned int _index)
+math::Angle KIDOScrewJoint::GetHighStop(unsigned int _index)
{
switch (_index)
{
@@ -246,7 +246,7 @@ math::Angle DARTScrewJoint::GetHighStop(unsigned int _index)
}
//////////////////////////////////////////////////
-math::Angle DARTScrewJoint::GetLowStop(unsigned int _index)
+math::Angle KIDOScrewJoint::GetLowStop(unsigned int _index)
{
switch (_index)
{
diff --git a/gazebo/physics/dart/DARTScrewJoint.hh b/gazebo/physics/kido/KIDOScrewJoint.hh
similarity index 90%
rename from gazebo/physics/dart/DARTScrewJoint.hh
rename to gazebo/physics/kido/KIDOScrewJoint.hh
index c1eea49..5c9dfca 100644
--- a/gazebo/physics/dart/DARTScrewJoint.hh
+++ b/gazebo/physics/kido/KIDOScrewJoint.hh
@@ -15,31 +15,31 @@
*
*/
-#ifndef _GAZEBO_DARTSCREWJOINT_HH_
-#define _GAZEBO_DARTSCREWJOINT_HH_
+#ifndef _GAZEBO_KIDOSCREWJOINT_HH_
+#define _GAZEBO_KIDOSCREWJOINT_HH_
#include <string>
#include "gazebo/physics/ScrewJoint.hh"
-#include "gazebo/physics/dart/DARTJoint.hh"
+#include "gazebo/physics/kido/KIDOJoint.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
/// \brief A screw joint.
- class GZ_PHYSICS_VISIBLE DARTScrewJoint : public ScrewJoint<DARTJoint>
+ class GZ_PHYSICS_VISIBLE KIDOScrewJoint : public ScrewJoint<KIDOJoint>
{
/// \brief Constructor.
/// \param[in] _parent Pointer to the Link that is the joint' parent
- public: DARTScrewJoint(BasePtr _parent);
+ public: KIDOScrewJoint(BasePtr _parent);
/// \brief Destructor.
- public: virtual ~DARTScrewJoint();
+ public: virtual ~KIDOScrewJoint();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
diff --git a/gazebo/physics/dart/DARTSliderJoint.cc b/gazebo/physics/kido/KIDOSliderJoint.cc
similarity index 69%
rename from gazebo/physics/dart/DARTSliderJoint.cc
rename to gazebo/physics/kido/KIDOSliderJoint.cc
index 2752e5b..ec263a1 100644
--- a/gazebo/physics/dart/DARTSliderJoint.cc
+++ b/gazebo/physics/kido/KIDOSliderJoint.cc
@@ -20,56 +20,56 @@
#include "gazebo/gazebo_config.h"
#include "gazebo/common/Console.hh"
#include "gazebo/physics/Link.hh"
-#include "gazebo/physics/dart/DARTJointPrivate.hh"
-#include "gazebo/physics/dart/DARTSliderJoint.hh"
+#include "gazebo/physics/kido/KIDOJointPrivate.hh"
+#include "gazebo/physics/kido/KIDOSliderJoint.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTSliderJoint::DARTSliderJoint(BasePtr _parent)
- : SliderJoint<DARTJoint>(_parent)
+KIDOSliderJoint::KIDOSliderJoint(BasePtr _parent)
+ : SliderJoint<KIDOJoint>(_parent)
{
- this->dataPtr->dtJoint = new dart::dynamics::PrismaticJoint();
+ this->dataPtr->dtJoint = new kido::dynamics::PrismaticJoint();
}
//////////////////////////////////////////////////
-DARTSliderJoint::~DARTSliderJoint()
+KIDOSliderJoint::~KIDOSliderJoint()
{
// We don't need to delete dtJoint because the world will delete it
}
//////////////////////////////////////////////////
-void DARTSliderJoint::Load(sdf::ElementPtr _sdf)
+void KIDOSliderJoint::Load(sdf::ElementPtr _sdf)
{
- SliderJoint<DARTJoint>::Load(_sdf);
+ SliderJoint<KIDOJoint>::Load(_sdf);
}
//////////////////////////////////////////////////
-void DARTSliderJoint::Init()
+void KIDOSliderJoint::Init()
{
- SliderJoint<DARTJoint>::Init();
+ SliderJoint<KIDOJoint>::Init();
}
//////////////////////////////////////////////////
-math::Vector3 DARTSliderJoint::GetAnchor(unsigned int /*_index*/) const
+math::Vector3 KIDOSliderJoint::GetAnchor(unsigned int /*_index*/) const
{
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
this->dataPtr->dtJoint->getTransformFromChildBodyNode();
Eigen::Vector3d worldOrigin = T.translation();
- return DARTTypes::ConvVec3(worldOrigin);
+ return KIDOTypes::ConvVec3(worldOrigin);
}
//////////////////////////////////////////////////
-math::Vector3 DARTSliderJoint::GetGlobalAxis(unsigned int _index) const
+math::Vector3 KIDOSliderJoint::GetGlobalAxis(unsigned int _index) const
{
Eigen::Vector3d globalAxis = Eigen::Vector3d::UnitX();
if (_index == 0)
{
- dart::dynamics::PrismaticJoint *dtPrismaticJoint =
- reinterpret_cast<dart::dynamics::PrismaticJoint *>(
+ kido::dynamics::PrismaticJoint *dtPrismaticJoint =
+ reinterpret_cast<kido::dynamics::PrismaticJoint *>(
this->dataPtr->dtJoint);
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
@@ -82,25 +82,25 @@ math::Vector3 DARTSliderJoint::GetGlobalAxis(unsigned int _index) const
gzerr << "Invalid index[" << _index << "]\n";
}
- return DARTTypes::ConvVec3(globalAxis);
+ return KIDOTypes::ConvVec3(globalAxis);
}
//////////////////////////////////////////////////
-void DARTSliderJoint::SetAxis(unsigned int _index, const math::Vector3 &_axis)
+void KIDOSliderJoint::SetAxis(unsigned int _index, const math::Vector3 &_axis)
{
if (_index == 0)
{
- dart::dynamics::PrismaticJoint *dtPrismaticJoint =
- reinterpret_cast<dart::dynamics::PrismaticJoint *>(
+ kido::dynamics::PrismaticJoint *dtPrismaticJoint =
+ reinterpret_cast<kido::dynamics::PrismaticJoint *>(
this->dataPtr->dtJoint);
- Eigen::Vector3d dartVec3 = DARTTypes::ConvVec3(
+ Eigen::Vector3d kidoVec3 = KIDOTypes::ConvVec3(
this->GetAxisFrameOffset(0).RotateVector(_axis));
- Eigen::Isometry3d dartTransfJointLeftToParentLink
+ Eigen::Isometry3d kidoTransfJointLeftToParentLink
= this->dataPtr->dtJoint->getTransformFromParentBodyNode().inverse();
- dartVec3 = dartTransfJointLeftToParentLink.linear() * dartVec3;
+ kidoVec3 = kidoTransfJointLeftToParentLink.linear() * kidoVec3;
- dtPrismaticJoint->setAxis(dartVec3);
+ dtPrismaticJoint->setAxis(kidoVec3);
}
else
{
@@ -109,7 +109,7 @@ void DARTSliderJoint::SetAxis(unsigned int _index, const math::Vector3 &_axis)
}
//////////////////////////////////////////////////
-math::Angle DARTSliderJoint::GetAngleImpl(unsigned int _index) const
+math::Angle KIDOSliderJoint::GetAngleImpl(unsigned int _index) const
{
math::Angle result;
@@ -127,7 +127,7 @@ math::Angle DARTSliderJoint::GetAngleImpl(unsigned int _index) const
}
//////////////////////////////////////////////////
-void DARTSliderJoint::SetVelocity(unsigned int _index, double _vel)
+void KIDOSliderJoint::SetVelocity(unsigned int _index, double _vel)
{
if (_index == 0)
{
@@ -140,7 +140,7 @@ void DARTSliderJoint::SetVelocity(unsigned int _index, double _vel)
}
//////////////////////////////////////////////////
-double DARTSliderJoint::GetVelocity(unsigned int _index) const
+double KIDOSliderJoint::GetVelocity(unsigned int _index) const
{
double result = 0.0;
@@ -153,7 +153,7 @@ double DARTSliderJoint::GetVelocity(unsigned int _index) const
}
//////////////////////////////////////////////////
-void DARTSliderJoint::SetForceImpl(unsigned int _index, double _effort)
+void KIDOSliderJoint::SetForceImpl(unsigned int _index, double _effort)
{
if (_index == 0)
this->dataPtr->dtJoint->setForce(0, _effort);
diff --git a/gazebo/physics/dart/DARTSliderJoint.hh b/gazebo/physics/kido/KIDOSliderJoint.hh
similarity index 85%
rename from gazebo/physics/dart/DARTSliderJoint.hh
rename to gazebo/physics/kido/KIDOSliderJoint.hh
index 7c30e96..7026a0f 100644
--- a/gazebo/physics/dart/DARTSliderJoint.hh
+++ b/gazebo/physics/kido/KIDOSliderJoint.hh
@@ -15,29 +15,29 @@
*
*/
-#ifndef _GAZEBO_DARTSLIDERJOINT_HH_
-#define _GAZEBO_DARTSLIDERJOINT_HH_
+#ifndef _GAZEBO_KIDOSLIDERJOINT_HH_
+#define _GAZEBO_KIDOSLIDERJOINT_HH_
#include "gazebo/physics/SliderJoint.hh"
-#include "gazebo/physics/dart/DARTJoint.hh"
+#include "gazebo/physics/kido/KIDOJoint.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
/// \brief A slider joint
- class GZ_PHYSICS_VISIBLE DARTSliderJoint : public SliderJoint<DARTJoint>
+ class GZ_PHYSICS_VISIBLE KIDOSliderJoint : public SliderJoint<KIDOJoint>
{
/// \brief Constructor
/// \param[in] _parent Pointer to the Link that is the joint' parent
- public: DARTSliderJoint(BasePtr _parent);
+ public: KIDOSliderJoint(BasePtr _parent);
/// \brief Destructor
- public: virtual ~DARTSliderJoint();
+ public: virtual ~KIDOSliderJoint();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
diff --git a/gazebo/physics/dart/DARTSphereShape.cc b/gazebo/physics/kido/KIDOSphereShape.cc
similarity index 63%
rename from gazebo/physics/dart/DARTSphereShape.cc
rename to gazebo/physics/kido/KIDOSphereShape.cc
index 2ef8fa0..efe3318 100644
--- a/gazebo/physics/dart/DARTSphereShape.cc
+++ b/gazebo/physics/kido/KIDOSphereShape.cc
@@ -16,31 +16,31 @@
*/
#include "gazebo/common/Console.hh"
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
-#include "gazebo/physics/dart/DARTSphereShape.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
+#include "gazebo/physics/kido/KIDOSphereShape.hh"
#include "gazebo/util/system.hh"
-#include "gazebo/physics/dart/DARTSphereShapePrivate.hh"
+#include "gazebo/physics/kido/KIDOSphereShapePrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTSphereShape::DARTSphereShape(DARTCollisionPtr _parent)
+KIDOSphereShape::KIDOSphereShape(KIDOCollisionPtr _parent)
: SphereShape(_parent),
- dataPtr(new DARTSphereShapePrivate())
+ dataPtr(new KIDOSphereShapePrivate())
{
}
//////////////////////////////////////////////////
-DARTSphereShape::~DARTSphereShape()
+KIDOSphereShape::~KIDOSphereShape()
{
delete this->dataPtr;
}
//////////////////////////////////////////////////
-void DARTSphereShape::SetRadius(double _radius)
+void KIDOSphereShape::SetRadius(double _radius)
{
if (_radius < 0)
{
@@ -53,31 +53,31 @@ void DARTSphereShape::SetRadius(double _radius)
// otherwise later resize operations using setLocalScaling
// will not be possible
gzwarn << "Setting sphere shape's radius to zero is not supported "
- << "in DART, using 1e-4.\n";
+ << "in KIDO, using 1e-4.\n";
_radius = 1e-4;
}
SphereShape::SetRadius(_radius);
- DARTCollisionPtr dartCollisionParent =
- boost::dynamic_pointer_cast<DARTCollision>(this->collisionParent);
+ KIDOCollisionPtr kidoCollisionParent =
+ boost::dynamic_pointer_cast<KIDOCollision>(this->collisionParent);
- if (dartCollisionParent->GetDARTCollisionShape() == NULL)
+ if (kidoCollisionParent->GetKIDOCollisionShape() == NULL)
{
- dart::dynamics::BodyNode *dtBodyNode =
- dartCollisionParent->GetDARTBodyNode();
- dart::dynamics::EllipsoidShape *dtEllisoidShape =
- new dart::dynamics::EllipsoidShape(Eigen::Vector3d(_radius*2.0,
+ kido::dynamics::BodyNode *dtBodyNode =
+ kidoCollisionParent->GetKIDOBodyNode();
+ kido::dynamics::EllipsoidShape *dtEllisoidShape =
+ new kido::dynamics::EllipsoidShape(Eigen::Vector3d(_radius*2.0,
_radius*2.0,
_radius*2.0));
dtBodyNode->addCollisionShape(dtEllisoidShape);
- dartCollisionParent->SetDARTCollisionShape(dtEllisoidShape);
+ kidoCollisionParent->SetKIDOCollisionShape(dtEllisoidShape);
}
else
{
- dart::dynamics::EllipsoidShape *dtEllipsoidShape =
- dynamic_cast<dart::dynamics::EllipsoidShape*>(
- dartCollisionParent->GetDARTCollisionShape());
+ kido::dynamics::EllipsoidShape *dtEllipsoidShape =
+ dynamic_cast<kido::dynamics::EllipsoidShape*>(
+ kidoCollisionParent->GetKIDOCollisionShape());
dtEllipsoidShape->setSize(Eigen::Vector3d(_radius*2.0,
_radius*2.0,
_radius*2.0));
diff --git a/gazebo/physics/dart/DARTSphereShape.hh b/gazebo/physics/kido/KIDOSphereShape.hh
similarity index 69%
rename from gazebo/physics/dart/DARTSphereShape.hh
rename to gazebo/physics/kido/KIDOSphereShape.hh
index 4e97bef..12aed1a 100644
--- a/gazebo/physics/dart/DARTSphereShape.hh
+++ b/gazebo/physics/kido/KIDOSphereShape.hh
@@ -14,11 +14,11 @@
* limitations under the License.
*
*/
-#ifndef _GAZEBO_DARTSPHERESHAPE_HH_
-#define _GAZEBO_DARTSPHERESHAPE_HH_
+#ifndef _GAZEBO_KIDOSPHERESHAPE_HH_
+#define _GAZEBO_KIDOSPHERESHAPE_HH_
-#include "gazebo/physics/dart/DARTPhysics.hh"
-#include "gazebo/physics/dart/DARTCollision.hh"
+#include "gazebo/physics/kido/KIDOPhysics.hh"
+#include "gazebo/physics/kido/KIDOCollision.hh"
#include "gazebo/physics/PhysicsTypes.hh"
#include "gazebo/physics/SphereShape.hh"
#include "gazebo/util/system.hh"
@@ -28,27 +28,27 @@ namespace gazebo
namespace physics
{
/// Forward declare private data class
- class DARTSphereShapePrivate;
+ class KIDOSphereShapePrivate;
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \brief A DART sphere shape
- class GZ_PHYSICS_VISIBLE DARTSphereShape : public SphereShape
+ /// \brief A KIDO sphere shape
+ class GZ_PHYSICS_VISIBLE KIDOSphereShape : public SphereShape
{
/// \brief Constructor.
/// \param[in] _parent Parent Collision.
- public: explicit DARTSphereShape(DARTCollisionPtr _parent);
+ public: explicit KIDOSphereShape(KIDOCollisionPtr _parent);
/// \brief Destructor.
- public: virtual ~DARTSphereShape();
+ public: virtual ~KIDOSphereShape();
// Documentation inherited.
public: virtual void SetRadius(double _radius);
/// \internal
/// \brief Pointer to private data
- private: DARTSphereShapePrivate *dataPtr;
+ private: KIDOSphereShapePrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTPlaneShapePrivate.hh b/gazebo/physics/kido/KIDOSphereShapePrivate.hh
similarity index 68%
rename from gazebo/physics/dart/DARTPlaneShapePrivate.hh
rename to gazebo/physics/kido/KIDOSphereShapePrivate.hh
index fcc04f4..607c2e8 100644
--- a/gazebo/physics/dart/DARTPlaneShapePrivate.hh
+++ b/gazebo/physics/kido/KIDOSphereShapePrivate.hh
@@ -15,25 +15,25 @@
*
*/
-#ifndef _GAZEBO_DARTPLANESHAPE_PRIVATE_HH_
-#define _GAZEBO_DARTPLANESHAPE_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOSPHERESHAPE_PRIVATE_HH_
+#define _GAZEBO_KIDOSPHERESHAPE_PRIVATE_HH_
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTPlaneShape
- class DARTPlaneShapePrivate
+ /// \brief Private data class for KIDOSphereShape
+ class KIDOSphereShapePrivate
{
/// \brief Constructor
- public: DARTPlaneShapePrivate() = default;
+ public: KIDOSphereShapePrivate() = default;
/// \brief Default destructor
- public: ~DARTPlaneShapePrivate() = default;
+ public: ~KIDOSphereShapePrivate() = default;
};
}
}
diff --git a/gazebo/physics/dart/DARTSurfaceParams.cc b/gazebo/physics/kido/KIDOSurfaceParams.cc
similarity index 83%
rename from gazebo/physics/dart/DARTSurfaceParams.cc
rename to gazebo/physics/kido/KIDOSurfaceParams.cc
index 2517914..c7be590 100644
--- a/gazebo/physics/dart/DARTSurfaceParams.cc
+++ b/gazebo/physics/kido/KIDOSurfaceParams.cc
@@ -16,28 +16,28 @@
*/
#include "gazebo/common/Console.hh"
-#include "gazebo/physics/dart/DARTSurfaceParams.hh"
+#include "gazebo/physics/kido/KIDOSurfaceParams.hh"
-#include "gazebo/physics/dart/DARTSurfaceParamsPrivate.hh"
+#include "gazebo/physics/kido/KIDOSurfaceParamsPrivate.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTSurfaceParams::DARTSurfaceParams()
+KIDOSurfaceParams::KIDOSurfaceParams()
: SurfaceParams(),
- dataPtr(new DARTSurfaceParamsPrivate())
+ dataPtr(new KIDOSurfaceParamsPrivate())
{
}
//////////////////////////////////////////////////
-DARTSurfaceParams::~DARTSurfaceParams()
+KIDOSurfaceParams::~KIDOSurfaceParams()
{
delete this->dataPtr;
}
//////////////////////////////////////////////////
-void DARTSurfaceParams::Load(sdf::ElementPtr _sdf)
+void KIDOSurfaceParams::Load(sdf::ElementPtr _sdf)
{
// Load parent class
SurfaceParams::Load(_sdf);
@@ -69,7 +69,7 @@ void DARTSurfaceParams::Load(sdf::ElementPtr _sdf)
}
/////////////////////////////////////////////////
-void DARTSurfaceParams::FillMsg(msgs::Surface &_msg)
+void KIDOSurfaceParams::FillMsg(msgs::Surface &_msg)
{
SurfaceParams::FillMsg(_msg);
@@ -80,7 +80,7 @@ void DARTSurfaceParams::FillMsg(msgs::Surface &_msg)
}
/////////////////////////////////////////////////
-void DARTSurfaceParams::ProcessMsg(const msgs::Surface &_msg)
+void KIDOSurfaceParams::ProcessMsg(const msgs::Surface &_msg)
{
SurfaceParams::ProcessMsg(_msg);
@@ -94,13 +94,13 @@ void DARTSurfaceParams::ProcessMsg(const msgs::Surface &_msg)
}
/////////////////////////////////////////////////
-FrictionPyramidPtr DARTSurfaceParams::GetFrictionPyramid() const
+FrictionPyramidPtr KIDOSurfaceParams::GetFrictionPyramid() const
{
return this->dataPtr->frictionPyramid;
}
/////////////////////////////////////////////////
-FrictionPyramidPtr DARTSurfaceParams::FrictionPyramid() const
+FrictionPyramidPtr KIDOSurfaceParams::FrictionPyramid() const
{
return this->dataPtr->frictionPyramid;
}
diff --git a/gazebo/physics/dart/DARTSurfaceParams.hh b/gazebo/physics/kido/KIDOSurfaceParams.hh
similarity index 80%
rename from gazebo/physics/dart/DARTSurfaceParams.hh
rename to gazebo/physics/kido/KIDOSurfaceParams.hh
index 4edf880..0d23978 100644
--- a/gazebo/physics/dart/DARTSurfaceParams.hh
+++ b/gazebo/physics/kido/KIDOSurfaceParams.hh
@@ -15,8 +15,8 @@
*
*/
-#ifndef _GAZEBO_DARTSURFACEPARAMS_HH_
-#define _GAZEBO_DARTSURFACEPARAMS_HH_
+#ifndef _GAZEBO_KIDOSURFACEPARAMS_HH_
+#define _GAZEBO_KIDOSURFACEPARAMS_HH_
#include <sdf/sdf.hh>
@@ -29,20 +29,20 @@ namespace gazebo
{
namespace physics
{
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
/// Forward declare private data class
- class DARTSurfaceParamsPrivate;
+ class KIDOSurfaceParamsPrivate;
- /// \brief DART surface parameters.
- class GZ_PHYSICS_VISIBLE DARTSurfaceParams : public SurfaceParams
+ /// \brief KIDO surface parameters.
+ class GZ_PHYSICS_VISIBLE KIDOSurfaceParams : public SurfaceParams
{
/// \brief Constructor.
- public: DARTSurfaceParams();
+ public: KIDOSurfaceParams();
/// \brief Destructor.
- public: virtual ~DARTSurfaceParams();
+ public: virtual ~KIDOSurfaceParams();
/// \brief Load the contact params.
/// \param[in] _sdf SDF values to load from.
@@ -63,7 +63,7 @@ namespace gazebo
/// \internal
/// \brief Pointer to private data
- private: DARTSurfaceParamsPrivate *dataPtr;
+ private: KIDOSurfaceParamsPrivate *dataPtr;
};
/// \}
}
diff --git a/gazebo/physics/dart/DARTSurfaceParamsPrivate.hh b/gazebo/physics/kido/KIDOSurfaceParamsPrivate.hh
similarity index 74%
rename from gazebo/physics/dart/DARTSurfaceParamsPrivate.hh
rename to gazebo/physics/kido/KIDOSurfaceParamsPrivate.hh
index 6f9d74f..52d33a1 100644
--- a/gazebo/physics/dart/DARTSurfaceParamsPrivate.hh
+++ b/gazebo/physics/kido/KIDOSurfaceParamsPrivate.hh
@@ -15,29 +15,29 @@
*
*/
-#ifndef _GAZEBO_DARTSURFACEPARAMS_PRIVATE_HH_
-#define _GAZEBO_DARTSURFACEPARAMS_PRIVATE_HH_
+#ifndef _GAZEBO_KIDOSURFACEPARAMS_PRIVATE_HH_
+#define _GAZEBO_KIDOSURFACEPARAMS_PRIVATE_HH_
#include "gazebo/physics/SurfaceParams.hh"
-#include "gazebo/physics/dart/dart_inc.h"
-#include "gazebo/physics/dart/DARTTypes.hh"
+#include "gazebo/physics/kido/kido_inc.h"
+#include "gazebo/physics/kido/KIDOTypes.hh"
namespace gazebo
{
namespace physics
{
/// \internal
- /// \brief Private data class for DARTSurfaceParams
- class DARTSurfaceParamsPrivate
+ /// \brief Private data class for KIDOSurfaceParams
+ class KIDOSurfaceParamsPrivate
{
/// \brief Constructor
- public: DARTSurfaceParamsPrivate()
+ public: KIDOSurfaceParamsPrivate()
: frictionPyramid(new FrictionPyramid())
{
}
/// \brief Default destructor
- public: ~DARTSurfaceParamsPrivate()
+ public: ~KIDOSurfaceParamsPrivate()
{
}
diff --git a/gazebo/physics/dart/DARTTypes.hh b/gazebo/physics/kido/KIDOTypes.hh
similarity index 73%
rename from gazebo/physics/dart/DARTTypes.hh
rename to gazebo/physics/kido/KIDOTypes.hh
index f122533..920a3ce 100644
--- a/gazebo/physics/dart/DARTTypes.hh
+++ b/gazebo/physics/kido/KIDOTypes.hh
@@ -15,46 +15,46 @@
*
*/
-#ifndef _GAZEBO_DARTTYPES_HH_
-#define _GAZEBO_DARTTYPES_HH_
+#ifndef _GAZEBO_KIDOTYPES_HH_
+#define _GAZEBO_KIDOTYPES_HH_
#include <boost/shared_ptr.hpp>
#include "gazebo/common/Assert.hh"
#include "gazebo/math/Pose.hh"
-#include "gazebo/physics/dart/dart_inc.h"
+#include "gazebo/physics/kido/kido_inc.h"
#include "gazebo/util/system.hh"
/// \file
/// \ingroup gazebo_physics
-/// \ingroup gazebo_physics_dart
-/// \brief DART wrapper forward declarations and typedefs
+/// \ingroup gazebo_physics_kido
+/// \brief KIDO wrapper forward declarations and typedefs
namespace gazebo
{
namespace physics
{
- class DARTPhysics;
- class DARTModel;
- class DARTLink;
- class DARTJoint;
- class DARTCollision;
- class DARTRayShape;
- class DARTSurfaceParams;
-
- typedef boost::shared_ptr<DARTPhysics> DARTPhysicsPtr;
- typedef boost::shared_ptr<DARTModel> DARTModelPtr;
- typedef boost::shared_ptr<DARTLink> DARTLinkPtr;
- typedef boost::shared_ptr<DARTJoint> DARTJointPtr;
- typedef boost::shared_ptr<DARTCollision> DARTCollisionPtr;
- typedef boost::shared_ptr<DARTRayShape> DARTRayShapePtr;
- typedef boost::shared_ptr<DARTSurfaceParams> DARTSurfaceParamsPtr;
-
- /// \addtogroup gazebo_physics_dart
+ class KIDOPhysics;
+ class KIDOModel;
+ class KIDOLink;
+ class KIDOJoint;
+ class KIDOCollision;
+ class KIDORayShape;
+ class KIDOSurfaceParams;
+
+ typedef boost::shared_ptr<KIDOPhysics> KIDOPhysicsPtr;
+ typedef boost::shared_ptr<KIDOModel> KIDOModelPtr;
+ typedef boost::shared_ptr<KIDOLink> KIDOLinkPtr;
+ typedef boost::shared_ptr<KIDOJoint> KIDOJointPtr;
+ typedef boost::shared_ptr<KIDOCollision> KIDOCollisionPtr;
+ typedef boost::shared_ptr<KIDORayShape> KIDORayShapePtr;
+ typedef boost::shared_ptr<KIDOSurfaceParams> KIDOSurfaceParamsPtr;
+
+ /// \addtogroup gazebo_physics_kido
/// \{
- /// \class DARTTypes DARTTypes.hh
+ /// \class KIDOTypes KIDOTypes.hh
/// \brief A set of functions for converting between the math types used
- /// by gazebo and dart.
- class GZ_PHYSICS_VISIBLE DARTTypes
+ /// by gazebo and kido.
+ class GZ_PHYSICS_VISIBLE KIDOTypes
{
/// \brief
public: static Eigen::Vector3d ConvVec3(const math::Vector3 &_vec3)
@@ -105,11 +105,11 @@ namespace gazebo
}
/// \brief Invert thread pitch to match the different definitions of
- /// thread pitch in Gazebo and DART.
+ /// thread pitch in Gazebo and KIDO.
///
/// [Definitions of thread pitch]
/// Gazebo: NEGATIVE angular motion per linear motion.
- /// DART : linear motion per single rotation.
+ /// KIDO : linear motion per single rotation.
public: static double InvertThreadPitch(double _pitch)
{
GZ_ASSERT(std::abs(_pitch) > 0.0,
diff --git a/gazebo/physics/dart/DARTUniversalJoint.cc b/gazebo/physics/kido/KIDOUniversalJoint.cc
similarity index 73%
rename from gazebo/physics/dart/DARTUniversalJoint.cc
rename to gazebo/physics/kido/KIDOUniversalJoint.cc
index 35cf110..e2ff3f6 100644
--- a/gazebo/physics/dart/DARTUniversalJoint.cc
+++ b/gazebo/physics/kido/KIDOUniversalJoint.cc
@@ -18,56 +18,56 @@
#include "gazebo/gazebo_config.h"
#include "gazebo/common/Console.hh"
#include "gazebo/physics/Link.hh"
-#include "gazebo/physics/dart/DARTJointPrivate.hh"
-#include "gazebo/physics/dart/DARTUniversalJoint.hh"
+#include "gazebo/physics/kido/KIDOJointPrivate.hh"
+#include "gazebo/physics/kido/KIDOUniversalJoint.hh"
using namespace gazebo;
using namespace physics;
//////////////////////////////////////////////////
-DARTUniversalJoint::DARTUniversalJoint(BasePtr _parent)
- : UniversalJoint<DARTJoint>(_parent)
+KIDOUniversalJoint::KIDOUniversalJoint(BasePtr _parent)
+ : UniversalJoint<KIDOJoint>(_parent)
{
- this->dataPtr->dtJoint = new dart::dynamics::UniversalJoint();
+ this->dataPtr->dtJoint = new kido::dynamics::UniversalJoint();
}
//////////////////////////////////////////////////
-DARTUniversalJoint::~DARTUniversalJoint()
+KIDOUniversalJoint::~KIDOUniversalJoint()
{
// We don't need to delete dtJoint because the world will delete it
}
//////////////////////////////////////////////////
-void DARTUniversalJoint::Load(sdf::ElementPtr _sdf)
+void KIDOUniversalJoint::Load(sdf::ElementPtr _sdf)
{
- UniversalJoint<DARTJoint>::Load(_sdf);
+ UniversalJoint<KIDOJoint>::Load(_sdf);
}
//////////////////////////////////////////////////
-void DARTUniversalJoint::Init()
+void KIDOUniversalJoint::Init()
{
- UniversalJoint<DARTJoint>::Init();
+ UniversalJoint<KIDOJoint>::Init();
}
//////////////////////////////////////////////////
-math::Vector3 DARTUniversalJoint::GetAnchor(unsigned int /*index*/) const
+math::Vector3 KIDOUniversalJoint::GetAnchor(unsigned int /*index*/) const
{
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
this->dataPtr->dtJoint->getTransformFromChildBodyNode();
Eigen::Vector3d worldOrigin = T.translation();
- return DARTTypes::ConvVec3(worldOrigin);
+ return KIDOTypes::ConvVec3(worldOrigin);
}
//////////////////////////////////////////////////
-math::Vector3 DARTUniversalJoint::GetGlobalAxis(unsigned int _index) const
+math::Vector3 KIDOUniversalJoint::GetGlobalAxis(unsigned int _index) const
{
Eigen::Vector3d globalAxis = Eigen::Vector3d::UnitX();
if (_index == 0)
{
- dart::dynamics::UniversalJoint *dtUniveralJoint =
- reinterpret_cast<dart::dynamics::UniversalJoint *>(
+ kido::dynamics::UniversalJoint *dtUniveralJoint =
+ reinterpret_cast<kido::dynamics::UniversalJoint *>(
this->dataPtr->dtJoint);
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
@@ -79,8 +79,8 @@ math::Vector3 DARTUniversalJoint::GetGlobalAxis(unsigned int _index) const
}
else if (_index == 1)
{
- dart::dynamics::UniversalJoint *dtUniveralJoint =
- reinterpret_cast<dart::dynamics::UniversalJoint *>(
+ kido::dynamics::UniversalJoint *dtUniveralJoint =
+ reinterpret_cast<kido::dynamics::UniversalJoint *>(
this->dataPtr->dtJoint);
Eigen::Isometry3d T = this->dataPtr->dtChildBodyNode->getTransform() *
@@ -94,14 +94,14 @@ math::Vector3 DARTUniversalJoint::GetGlobalAxis(unsigned int _index) const
gzerr << "Invalid index[" << _index << "]\n";
}
- return DARTTypes::ConvVec3(globalAxis);
+ return KIDOTypes::ConvVec3(globalAxis);
}
//////////////////////////////////////////////////
-void DARTUniversalJoint::SetAxis(unsigned int _index,
+void KIDOUniversalJoint::SetAxis(unsigned int _index,
const math::Vector3 &_axis)
{
- Eigen::Vector3d dtAxis = DARTTypes::ConvVec3(
+ Eigen::Vector3d dtAxis = KIDOTypes::ConvVec3(
this->GetAxisFrameOffset(_index).RotateVector(_axis));
Eigen::Isometry3d dtTransfJointLeftToParentLink
= this->dataPtr->dtJoint->getTransformFromParentBodyNode().inverse();
@@ -109,15 +109,15 @@ void DARTUniversalJoint::SetAxis(unsigned int _index,
if (_index == 0)
{
- dart::dynamics::UniversalJoint *dtUniveralJoint =
- reinterpret_cast<dart::dynamics::UniversalJoint *>(
+ kido::dynamics::UniversalJoint *dtUniveralJoint =
+ reinterpret_cast<kido::dynamics::UniversalJoint *>(
this->dataPtr->dtJoint);
dtUniveralJoint->setAxis1(dtAxis);
}
else if (_index == 1)
{
- dart::dynamics::UniversalJoint *dtUniveralJoint =
- reinterpret_cast<dart::dynamics::UniversalJoint *>(
+ kido::dynamics::UniversalJoint *dtUniveralJoint =
+ reinterpret_cast<kido::dynamics::UniversalJoint *>(
this->dataPtr->dtJoint);
dtUniveralJoint->setAxis2(dtAxis);
}
@@ -128,7 +128,7 @@ void DARTUniversalJoint::SetAxis(unsigned int _index,
}
//////////////////////////////////////////////////
-math::Angle DARTUniversalJoint::GetAngleImpl(unsigned int _index) const
+math::Angle KIDOUniversalJoint::GetAngleImpl(unsigned int _index) const
{
math::Angle result;
@@ -151,7 +151,7 @@ math::Angle DARTUniversalJoint::GetAngleImpl(unsigned int _index) const
}
//////////////////////////////////////////////////
-double DARTUniversalJoint::GetVelocity(unsigned int _index) const
+double KIDOUniversalJoint::GetVelocity(unsigned int _index) const
{
double result = 0.0;
@@ -166,7 +166,7 @@ double DARTUniversalJoint::GetVelocity(unsigned int _index) const
}
//////////////////////////////////////////////////
-void DARTUniversalJoint::SetVelocity(unsigned int _index, double _vel)
+void KIDOUniversalJoint::SetVelocity(unsigned int _index, double _vel)
{
if (_index < this->GetAngleCount())
{
@@ -179,7 +179,7 @@ void DARTUniversalJoint::SetVelocity(unsigned int _index, double _vel)
}
//////////////////////////////////////////////////
-void DARTUniversalJoint::SetForceImpl(unsigned int _index, double _effort)
+void KIDOUniversalJoint::SetForceImpl(unsigned int _index, double _effort)
{
if (_index == 0)
this->dataPtr->dtJoint->setForce(0, _effort);
diff --git a/gazebo/physics/dart/DARTUniversalJoint.hh b/gazebo/physics/kido/KIDOUniversalJoint.hh
similarity index 84%
rename from gazebo/physics/dart/DARTUniversalJoint.hh
rename to gazebo/physics/kido/KIDOUniversalJoint.hh
index d96cde7..f9814e7 100644
--- a/gazebo/physics/dart/DARTUniversalJoint.hh
+++ b/gazebo/physics/kido/KIDOUniversalJoint.hh
@@ -15,30 +15,30 @@
*
*/
-#ifndef _GAZEBO_DARTUNIVERSALJOINT_HH_
-#define _GAZEBO_DARTUNIVERSALJOINT_HH_
+#ifndef _GAZEBO_KIDOUNIVERSALJOINT_HH_
+#define _GAZEBO_KIDOUNIVERSALJOINT_HH_
#include "gazebo/physics/UniversalJoint.hh"
-#include "gazebo/physics/dart/DARTJoint.hh"
+#include "gazebo/physics/kido/KIDOJoint.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
- /// \addtogroup gazebo_physics_dart
+ /// \addtogroup gazebo_physics_kido
/// \{
/// \brief A universal joint.
- class GZ_PHYSICS_VISIBLE DARTUniversalJoint :
- public UniversalJoint<DARTJoint>
+ class GZ_PHYSICS_VISIBLE KIDOUniversalJoint :
+ public UniversalJoint<KIDOJoint>
{
/// \brief Constructor.
/// \param[in] _parent Pointer to the Link that is the joint' parent
- public: DARTUniversalJoint(BasePtr _parent);
+ public: KIDOUniversalJoint(BasePtr _parent);
/// \brief Destuctor.
- public: virtual ~DARTUniversalJoint();
+ public: virtual ~KIDOUniversalJoint();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
diff --git a/gazebo/physics/dart/dart_inc.h b/gazebo/physics/kido/kido_inc.h
similarity index 68%
rename from gazebo/physics/dart/dart_inc.h
rename to gazebo/physics/kido/kido_inc.h
index eb8c664..2bec177 100644
--- a/gazebo/physics/dart/dart_inc.h
+++ b/gazebo/physics/kido/kido_inc.h
@@ -15,18 +15,18 @@
*
*/
-#ifndef _GAZEBO_DART_INC_H_
-#define _GAZEBO_DART_INC_H_
+#ifndef _GAZEBO_KIDO_INC_H_
+#define _GAZEBO_KIDO_INC_H_
// This disables warning messages for ODE
#pragma GCC system_header
-#include <dart/common/common.h>
-#include <dart/math/math.h>
-#include <dart/collision/collision.h>
-#include <dart/integration/integration.h>
-#include <dart/dynamics/dynamics.h>
-#include <dart/constraint/constraint.h>
-#include <dart/simulation/simulation.h>
+#include <kido/common/common.hpp>
+#include <kido/math/math.hpp>
+#include <kido/collision/collision.hpp>
+#include <kido/integration/integration.hpp>
+#include <kido/dynamics/dynamics.hpp>
+#include <kido/constraint/constraint.hpp>
+#include <kido/simulation/simulation.hpp>
#endif
diff --git a/gazebo/physics/ode/ODEPhysics.cc b/gazebo/physics/ode/ODEPhysics.cc
index 4e290b0..9cdbe98 100644
--- a/gazebo/physics/ode/ODEPhysics.cc
+++ b/gazebo/physics/ode/ODEPhysics.cc
@@ -626,8 +626,8 @@ ODEPhysics::ConvertWorldStepSolverType(const std::string &_solverType)
World_Solver_Type result = ODE_DEFAULT;
if (_solverType.compare("ODE_DANTZIG") == 0)
result = ODE_DEFAULT;
- else if (_solverType.compare("DART_PGS") == 0)
- result = DART_PGS;
+ else if (_solverType.compare("KIDO_PGS") == 0)
+ result = KIDO_PGS;
else if (_solverType.compare("BULLET_LEMKE") == 0)
result = BULLET_LEMKE;
else if (_solverType.compare("BULLET_PGS") == 0)
@@ -654,9 +654,9 @@ ODEPhysics::ConvertWorldStepSolverType(const World_Solver_Type _solverType)
result = "ODE_DANTZIG";
break;
}
- case DART_PGS:
+ case KIDO_PGS:
{
- result = "DART_PGS";
+ result = "KIDO_PGS";
break;
}
case BULLET_LEMKE:
diff --git a/gazebo/physics/ode/ODEPhysics_TEST.cc b/gazebo/physics/ode/ODEPhysics_TEST.cc
index 4df61bb..5668b7a 100644
--- a/gazebo/physics/ode/ODEPhysics_TEST.cc
+++ b/gazebo/physics/ode/ODEPhysics_TEST.cc
@@ -313,8 +313,8 @@ TEST_F(ODEPhysics_TEST, PhysicsParam)
}
{
- // Switch to "DART_PGS" using SetWorldStepSolverType
- const std::string worldSolverType = "DART_PGS";
+ // Switch to "KIDO_PGS" using SetWorldStepSolverType
+ const std::string worldSolverType = "KIDO_PGS";
odePhysics->SetWorldStepSolverType(worldSolverType);
EXPECT_EQ(odePhysics->GetWorldStepSolverType(), worldSolverType);
std::string param;
diff --git a/gazebo/test/helper_physics_generator.hh b/gazebo/test/helper_physics_generator.hh
index 5179fca..9937ca3 100644
--- a/gazebo/test/helper_physics_generator.hh
+++ b/gazebo/test/helper_physics_generator.hh
@@ -36,30 +36,30 @@
#endif
#define SIMBODY_SUPPORT
-#define DART_SUPPORT
-#define WORLD_STEP_DART_PGS
+#define KIDO_SUPPORT
+#define WORLD_STEP_KIDO_PGS
#ifdef HAVE_SIMBODY
# undef SIMBODY_SUPPORT
# define SIMBODY_SUPPORT , "simbody"
#endif
-#ifdef HAVE_DART
-# undef DART_SUPPORT
-# define DART_SUPPORT , "dart"
-# undef WORLD_STEP_DART_PGS
-# define WORLD_STEP_DART_PGS , "DART_PGS"
+#ifdef HAVE_KIDO
+# undef KIDO_SUPPORT
+# define KIDO_SUPPORT , "kido"
+# undef WORLD_STEP_KIDO_PGS
+# define WORLD_STEP_KIDO_PGS , "KIDO_PGS"
#endif
/// \brief Helper macro to instantiate gtest for different physics engines
#define PHYSICS_ENGINE_VALUES ::testing::Values("ode" \
BULLET_SUPPORT \
SIMBODY_SUPPORT \
- DART_SUPPORT \
+ KIDO_SUPPORT \
)
/// \brief Helper macro to instantiate gtest for different solvers
#define WORLD_STEP_SOLVERS ::testing::Values("ODE_DANTZIG" \
- WORLD_STEP_DART_PGS \
+ WORLD_STEP_KIDO_PGS \
WORLD_STEP_BULLET_PGS \
WORLD_STEP_BULLET_LEMKE \
)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gazebo.git
More information about the debian-science-commits
mailing list