diff --git a/CMakeLists.txt b/CMakeLists.txt index 6258aa10d6..7e27bd81ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE ) # Define here the needed parameters set (OPENRAVE_VERSION_MAJOR 0) set (OPENRAVE_VERSION_MINOR 136) -set (OPENRAVE_VERSION_PATCH 0) +set (OPENRAVE_VERSION_PATCH 1) set (OPENRAVE_VERSION ${OPENRAVE_VERSION_MAJOR}.${OPENRAVE_VERSION_MINOR}.${OPENRAVE_VERSION_PATCH}) set (OPENRAVE_SOVERSION ${OPENRAVE_VERSION_MAJOR}.${OPENRAVE_VERSION_MINOR}) message(STATUS "Compiling OpenRAVE Version ${OPENRAVE_VERSION}, soversion=${OPENRAVE_SOVERSION}") diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 7e962a2b57..dc96424a21 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -6,6 +6,11 @@ ChangeLog Unreleased ========== +Version 0.136.1 +=============== + +* Support reading of `grippername` under `manipulator` from XML files. + Version 0.136.0 =============== diff --git a/plugins/configurationcache/configurationjitterer.cpp b/plugins/configurationcache/configurationjitterer.cpp index ade223b741..6ad2999839 100644 --- a/plugins/configurationcache/configurationjitterer.cpp +++ b/plugins/configurationcache/configurationjitterer.cpp @@ -75,8 +75,13 @@ By default will sample the robot's active DOFs. Parameters part of the interface _vActiveIndices = _probot->GetActiveDOFIndices(); _nActiveAffineDOFs = _probot->GetAffineDOF(); _vActiveAffineAxis = _probot->GetAffineRotationAxis(); + _vLinks.reserve(_probot->GetLinks().size()); if( _nActiveAffineDOFs == 0 ) { for (size_t ilink = 0; ilink < _probot->GetLinks().size(); ++ilink) { + if( _probot->GetLinks()[ilink]->GetGeometries().empty() ) { + // Links that don't have geometries (virtual links) don't matter for jittering. Their AABBs can interfere with the results. + continue; + } for (int dofindex : _vActiveIndices) { if( _probot->DoesAffect(_probot->GetJointFromDOFIndex(dofindex)->GetJointIndex(), ilink)) { _vLinks.push_back(_probot->GetLinks()[ilink]); @@ -86,7 +91,13 @@ By default will sample the robot's active DOFs. Parameters part of the interface } } else { - _vLinks = _probot->GetLinks(); + for (const KinBody::LinkPtr& plink: _probot->GetLinks()) { + if( plink->GetGeometries().empty() ) { + // Links that don't have geometries (virtual links) don't matter for jittering. Their AABBs can interfere with the results. + continue; + } + _vLinks.push_back(plink); + } } _vLinkAABBs.resize(_vLinks.size()); for(size_t i = 0; i < _vLinks.size(); ++i) { @@ -970,9 +981,14 @@ By default will sample the robot's active DOFs. Parameters part of the interface vector vgrabbedbodies; _probot->GetGrabbed(vgrabbedbodies); // robot itself might have changed? + _vLinks.resize(0); + _vLinks.reserve(_probot->GetLinks().size()); if( _nActiveAffineDOFs == 0 ) { - _vLinks.clear(); for (size_t ilink = 0; ilink < _probot->GetLinks().size(); ++ilink) { + if( _probot->GetLinks()[ilink]->GetGeometries().empty() ) { + // Links that don't have geometries (virtual links) don't matter for jittering. Their AABBs can interfere with the results. + continue; + } for (int dofindex : _vActiveIndices) { if( _probot->DoesAffect(_probot->GetJointFromDOFIndex(dofindex)->GetJointIndex(), ilink)) { _vLinks.push_back(_probot->GetLinks()[ilink]); @@ -982,7 +998,13 @@ By default will sample the robot's active DOFs. Parameters part of the interface } } else { - _vLinks = _probot->GetLinks(); + for (const KinBody::LinkPtr& plink: _probot->GetLinks()) { + if( plink->GetGeometries().empty() ) { + // Links that don't have geometries (virtual links) don't matter for jittering. Their AABBs can interfere with the results. + continue; + } + _vLinks.push_back(plink); + } } FOREACHC(itgrabbed, vgrabbedbodies) { FOREACHC(itlink2, (*itgrabbed)->GetLinks()) { diff --git a/plugins/configurationcache/workspaceconfigurationjitterer.cpp b/plugins/configurationcache/workspaceconfigurationjitterer.cpp index 06a5c05946..e1b9a38240 100644 --- a/plugins/configurationcache/workspaceconfigurationjitterer.cpp +++ b/plugins/configurationcache/workspaceconfigurationjitterer.cpp @@ -75,8 +75,13 @@ By default will sample the robot's active DOFs. Parameters part of the interface _vActiveIndices = _probot->GetActiveDOFIndices(); _nActiveAffineDOFs = _probot->GetAffineDOF(); _vActiveAffineAxis = _probot->GetAffineRotationAxis(); + _vLinks.reserve(_probot->GetLinks().size()); if( _nActiveAffineDOFs == 0 ) { for (size_t ilink = 0; ilink < _probot->GetLinks().size(); ++ilink) { + if( _probot->GetLinks()[ilink]->GetGeometries().empty() ) { + // Links that don't have geometries (virtual links) don't matter for jittering. Their AABBs can interfere with the results. + continue; + } for (int dofindex : _vActiveIndices) { if( _probot->DoesAffect(_probot->GetJointFromDOFIndex(dofindex)->GetJointIndex(), ilink)) { _vLinks.push_back(_probot->GetLinks()[ilink]); @@ -86,7 +91,13 @@ By default will sample the robot's active DOFs. Parameters part of the interface } } else { - _vLinks = _probot->GetLinks(); + for (const KinBody::LinkPtr& plink: _probot->GetLinks()) { + if( plink->GetGeometries().empty() ) { + // Links that don't have geometries (virtual links) don't matter for jittering. Their AABBs can interfere with the results. + continue; + } + _vLinks.push_back(plink); + } } _vLinkAABBs.resize(_vLinks.size()); for(size_t i = 0; i < _vLinks.size(); ++i) { @@ -939,9 +950,14 @@ By default will sample the robot's active DOFs. Parameters part of the interface vector vgrabbedbodies; _probot->GetGrabbed(vgrabbedbodies); // robot itself might have changed? + _vLinks.resize(0); + _vLinks.reserve(_probot->GetLinks().size()); if( _nActiveAffineDOFs == 0 ) { - _vLinks.clear(); for (size_t ilink = 0; ilink < _probot->GetLinks().size(); ++ilink) { + if( _probot->GetLinks()[ilink]->GetGeometries().empty() ) { + // Links that don't have geometries (virtual links) don't matter for jittering. Their AABBs can interfere with the results. + continue; + } for(int dofindex : _vActiveIndices) { if( _probot->DoesAffect(_probot->GetJointFromDOFIndex(dofindex)->GetJointIndex(), ilink)) { _vLinks.push_back(_probot->GetLinks()[ilink]); @@ -951,7 +967,13 @@ By default will sample the robot's active DOFs. Parameters part of the interface } } else { - _vLinks = _probot->GetLinks(); + for (const KinBody::LinkPtr& plink: _probot->GetLinks()) { + if( plink->GetGeometries().empty() ) { + // Links that don't have geometries (virtual links) don't matter for jittering. Their AABBs can interfere with the results. + continue; + } + _vLinks.push_back(plink); + } } FOREACHC(itgrabbed, vgrabbedbodies) { FOREACHC(itlink2, (*itgrabbed)->GetLinks()) { diff --git a/src/libopenrave-core/xmlreaders-core.cpp b/src/libopenrave-core/xmlreaders-core.cpp index e48704e9a1..cf2a34904f 100644 --- a/src/libopenrave-core/xmlreaders-core.cpp +++ b/src/libopenrave-core/xmlreaders-core.cpp @@ -2542,7 +2542,7 @@ class ManipulatorXMLReader : public StreamXMLReader if( _processingtag.size() > 0 ) { return PE_Ignore; } - if (( xmlname == "effector") ||( xmlname == "gripperjoints") ||( xmlname == "joints") ||( xmlname == "armjoints") ||( xmlname == "base") ||( xmlname == "iksolver") ||( xmlname == "closingdir") ||( xmlname == "palmdirection") ||( xmlname=="direction") ||( xmlname == "closingdirection") ||( xmlname == "translation") ||( xmlname == "quat") ||( xmlname == "rotationaxis") ||( xmlname == "rotationmat") || xmlname == "chuckingdirection") { + if (( xmlname == "effector") ||( xmlname == "gripperjoints") ||( xmlname == "joints") ||( xmlname == "armjoints") ||( xmlname == "base") ||( xmlname == "iksolver") ||( xmlname == "closingdir") ||( xmlname == "palmdirection") ||( xmlname=="direction") ||( xmlname == "closingdirection") ||( xmlname == "translation") ||( xmlname == "quat") ||( xmlname == "rotationaxis") ||( xmlname == "rotationmat") || xmlname == "chuckingdirection" || (xmlname == "grippername") ) { _processingtag = xmlname; return PE_Support; } @@ -2583,6 +2583,9 @@ class ManipulatorXMLReader : public StreamXMLReader else if((xmlname == "joints")||(xmlname == "gripperjoints")) { _manipinfo._vGripperJointNames = vector((istream_iterator(_ss)), istream_iterator()); } + else if( xmlname == "grippername" ) { + _ss >> _manipinfo._grippername; + } else if( xmlname == "armjoints" ) { RAVELOG_WARN(" for tag is not used anymore\n"); } @@ -3504,7 +3507,7 @@ class EnvironmentXMLReader : public StreamXMLReader _ss >> pluginname; RaveLoadPlugin(pluginname); } - else if(xmlname == "unit"){ + else if(xmlname == "unit") { std::pair unit; _ss >> unit.first >> unit.second; UnitInfo unitInfo = _penv->GetUnitInfo();