Commit 9c3a688c authored by Valenza Florian's avatar Valenza Florian
Browse files

[Python] Updated RobotWrapper with change in buildGeom

parent cb910e16
......@@ -25,10 +25,8 @@ class RobotWrapper:
def __init__(self, filename, package_dirs = None, root_joint = None):
if(root_joint is None):
self.model = se3.buildModelFromUrdf(filename)
self.root_added = False
else:
self.model = se3.buildModelFromUrdf(filename, root_joint)
self.root_added = True
self.data = self.model.createData()
......@@ -36,13 +34,13 @@ class RobotWrapper:
raise Exception('It seems that the Geometry Module has not been compiled with Pinocchio. No geometry model')
else:
if (package_dirs is None):
self.geometry_model = se3.buildGeomFromUrdf(self.model, filename, self.root_added) # Will parse ROS_PACKAGE_PATH
self.geometry_model = se3.buildGeomFromUrdf(self.model, filename)
self.geometry_data = se3.GeometryData(self.data, self.geometry_model)
else:
if not all(isinstance(item,basestring) for item in package_dirs):
raise Exception('The list of package directories is wrong. At least one is not a string')
else:
self.geometry_model = se3.buildGeomFromUrdf(self.model, filename, utils.fromListToVectorOfString(package_dirs), self.root_added)
self.geometry_model = se3.buildGeomFromUrdf(self.model, filename, utils.fromListToVectorOfString(package_dirs))
self.geometry_data = se3.GeometryData(self.data, self.geometry_model)
self.v0 = utils.zero(self.nv)
......
......@@ -34,7 +34,7 @@ namespace se3
*
* @param[in][out] paths { The package directories where to search for meshes }
*/
void appendRosPackagePaths(std::vector<std::string> & package_dirs)
inline void appendRosPackagePaths(std::vector<std::string> & package_dirs)
{
std::string delimiter = ":";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment