Commits

Martin Felis  committed 3970719

Adjusted default constructor for Body

  • Participants
  • Parent commits 7fe0085
  • Tags v2.2.2

Comments (0)

Files changed (8)

File CMakeLists.txt

 
 INCLUDE(GNUInstallDirs)
 
-SET (PROJECT_VERSION 2.2.0)
+SET (PROJECT_VERSION 2.2.2)
 
 SET_TARGET_PROPERTIES ( ${PROJECT_EXECUTABLES} PROPERTIES
 		LINKER_LANGUAGE CXX
 
 Recent Changes
 ==============
+   * 06 November 2013: New version 2.2.2: adjusted Body default constructor (inertia matrix now 3x3 identity instead of zero matrix)
    * 04 November 2013: New version 2.2.1: fixed exported library version
    * 28 October 2013: New version 2.2.0: added support for spherical joints that do not suffer from joint singularities
    * 29 September 2013: New version 2.1.0: adjusted build settings and symbol export to be debian compatible. Removed vendor code such as Lua 5.2 and UnitTest++. Must be pre-installed if tests or LuaModel Addon is enabled.

File addons/luamodel/luamodel.cc

 
 		SpatialTransform joint_frame = model_table["frames"][i]["joint_frame"].getDefault(SpatialTransform());
 		Joint joint = model_table["frames"][i]["joint"].getDefault(Joint(JointTypeFixed));
-		Body body = model_table["frames"][i]["body"];
+		Body body = model_table["frames"][i]["body"].getDefault<Body>(Body());
 
 		unsigned int body_id = model->AddBody (parent_id, joint_frame, joint, body, body_name);
 		body_table_id_map[body_name] = body_id;

File addons/luamodel/luamodel.h

    *     Specification of the dynamical parameters of the body. It uses the
    *     values (if existing):
 	 *     \code
-   *       mass (scalar value, default 0.),
+   *       mass (scalar value, default 1.),
    *       com (3-d vector, default:  (0., 0., 0.))
    *       inertia (3x3  matrix, default: identity matrix)
 	 *     \endcode

File doc/Mainpage.h

  *
  * \section recent_changes Recent Changes :
  * <ul>
- * <li> 4 November 2013: New version 2.2.1: fixed exported library
- * version</li>
- * <li> 28 October 2013: New version 2.2.0: added support for
- * spherical joints that do not suffer from \ref joint_singularities</li>
+ * <li>06 November 2013: New version 2.2.2: adjusted Body default constructor (inertia matrix now 3x3 identity instead of zero matrix)</li>
+ * <li> 4 November 2013: New version 2.2.1: fixed exported library version</li>
+ * <li> 28 October 2013: New version 2.2.0: added support for spherical joints that do not suffer from \ref joint_singularities</li>
  * <li> 29 September 2013: New version 2.1.0: adjusted build settings and symbol export to be debian compatible. Removed vendor code such as Lua 5.2 and UnitTest++. Must be pre-installed if tests or LuaModel Addon is enabled.</li>
  * <li>05 September 2013: New version 2.0.1: fixed some errors on older compilers and CMake configuration of examples. No changes required when migrating from 2.0.0.</li>
- * <li> 18. July 2013: new API version 2.0.0 for details see (\ref
- * api_version_checking_page) </li>
+ * <li> 18. July 2013: new API version 2.0.0 for details see (\ref api_version_checking_page) </li>
  * <li> 20. February 2013: removed too specialized RigidBodyDynamics::Body constructor (API version 1.1.0)</li>
  * <li> 29. January 2013: added code for \ref api_version_checking_page. Current is 1.0.0.</li>
  * <li> 18. June 2012: added support of \ref luamodel_introduction</li>
  * <li> 01. June 2012: added support of \ref joint_models_fixed</li>
  * <li> 14. May 2012: fixed Body constructor as reported by Maxime Reis</li>
  * <li> 04. April 2012: added benchmark tool for CRBA</li>
- * <li> 01. March 2012: added multi degree of freedom \ref
- * joint_description</li>
+ * <li> 01. March 2012: added multi degree of freedom \ref joint_description</li>
  * <li> 06. Februry 2012: restructured constraint handling using \ref RigidBodyDynamics::ConstraintSet</li>
  * <li> 24. January 2012: implemented compact and fast representation of \ref RigidBodyDynamics::Math::SpatialTransform </li>
  * </ul>

File doc/api_changes.txt

+2.2.1 -> 2.2.2
+- adjusted default constructor for Body. It now has the identity matrix as
+	inertia, instead of a zero matrix.
+- LuaModel: made sure that the Body value is optional and uses the default
+	Body constructor if not defined.
+
 2.2.0 -> 2.2.1
 - properly exporting LuaTables++ functions when using LuaModel addon
   Fixes linking 

File include/rbdl/Body.h

 	Body() :
 		mMass (1.),
 		mCenterOfMass (0., 0., 0.),
-		mInertia (Math::Matrix3d::Zero(3,3)),
+		mInertia (Math::Matrix3d::Identity(3,3)),
 		mSpatialInertia (Math::SpatialMatrix::Zero(6,6)),
 		mIsVirtual (false)
 	{ };

File include/rbdl/rbdl_config.h.cmake

 #ifndef _RBDLCONFIG_H
 #define _RBDLCONFIG_H
 
-#define RBDL_API_VERSION 0x020200
+#define RBDL_API_VERSION 0x020202
 
 #cmakedefine RBDL_USE_SIMPLE_MATH
 #cmakedefine RBDL_ENABLE_LOGGING