Commit 25ab6af0 authored by Rohan Budhiraja's avatar Rohan Budhiraja
Browse files

[bindings][geometry] missing const

parent 2c6cace5
......@@ -185,7 +185,7 @@ namespace pinocchio
static_cast <GeometryModel (*) (Model &, PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel)&, const std::string &, const GeometryType, const std::string &)> (pinocchio::python::buildGeomFromSdf),
static_cast <GeometryModel (*) (const Model &, PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel)&, const std::string &, const GeometryType, const std::string &)> (pinocchio::python::buildGeomFromSdf),
bp::args("model","contact_models","sdf_filename","geom_type","package_dir" ),
"Parse the SDF file given as input looking for the geometry of the given input model and\n"
"return a GeometryModel containing either the collision geometries (GeometryType.COLLISION) or the visual geometries (GeometryType.VISUAL).\n"
......@@ -5,7 +5,7 @@
from . import pinocchio_pywrap_default as pin
from . import utils
from .deprecation import deprecated
from .shortcuts import buildModelsFromUrdf, createDatas
from .shortcuts import buildModelsFromUrdf, createDatas, buildModelsFromSdf
import numpy as np
......@@ -27,7 +27,7 @@ class RobotWrapper(object):
return robot
def initFromSDF(self,filename, package_dirs=None, root_joint=None, verbose=False, meshLoader=None):
model, constraint_models, collision_model, visual_model = buildModelsFromSDF(filename, package_dirs, root_joint, verbose, meshLoader)
model, constraint_models, collision_model, visual_model = buildModelsFromSdf(filename, package_dirs, root_joint, verbose, meshLoader)
self.constraint_models = constraint_models
......@@ -326,7 +326,7 @@ namespace pinocchio
} // namespace details
template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
GeometryModel& buildGeom(ModelTpl<Scalar,Options,JointCollectionTpl> & model,
GeometryModel& buildGeom(const ModelTpl<Scalar,Options,JointCollectionTpl> & const_model,
PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel)& contact_models,
const std::string & filename,
const GeometryType type,
......@@ -335,6 +335,7 @@ namespace pinocchio
::hpp::fcl::MeshLoaderPtr meshLoader)
Model& model = const_cast<Model &>(const_model); //TODO: buildGeom should not need to parse model again.
::pinocchio::urdf::details::UrdfVisitor<Scalar, Options, JointCollectionTpl> visitor (model);
::pinocchio::sdf::details::SdfGraph graph (visitor, contact_models);
//if (verbose) visitor.log = &std::cout;
Markdown is supported
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