Commit 96e8b57a authored by Rohan Budhiraja's avatar Rohan Budhiraja
Browse files

[C++][Minor] Use fixed size eigen vectors instead of dynamic size vectorxd

parent 06f1a24b
......@@ -128,9 +128,9 @@ struct GeometryObject
const JointIndex parentJ,
const boost::shared_ptr<fcl::CollisionGeometry> & collision,
const SE3 & placement, const std::string & meshPath = "",
const Eigen::Vector3d & meshScale = Eigen::VectorXd::Ones(3),
const Eigen::Vector3d & meshScale = Eigen::Vector3d::Ones(),
const bool overrideMaterial = false,
const Eigen::Vector4d & meshColor = Eigen::VectorXd::Zero(4),
const Eigen::Vector4d & meshColor = Eigen::Vector4d::Zero(),
const std::string & meshTexturePath = "")
: name(name)
, parentFrame(parentF)
......
......@@ -165,15 +165,15 @@ namespace se3
* @param[in] package_dirs A vector containing the different directories where to search for packages
*
*/
template<typename T>
inline bool getVisualMaterial(const boost::shared_ptr< T > urdf_object,std::string& meshTexturePath,
template<typename urdfObject>
inline bool getVisualMaterial(const boost::shared_ptr< urdfObject > urdf_object,std::string& meshTexturePath,
Eigen::Vector4d & meshColor, const std::vector<std::string> & package_dirs);
template<>
inline bool getVisualMaterial< ::urdf::Collision>(const boost::shared_ptr< ::urdf::Collision >, std::string& meshTexturePath,
Eigen::Vector4d & meshColor, const std::vector<std::string> &)
{
meshColor = Eigen::VectorXd::Zero(4);
meshColor.setZero();
meshTexturePath = "";
return false;
}
......@@ -182,7 +182,7 @@ namespace se3
inline bool getVisualMaterial< ::urdf::Visual>(const boost::shared_ptr< ::urdf::Visual > urdf_visual, std::string& meshTexturePath,
Eigen::Vector4d & meshColor, const std::vector<std::string> & package_dirs)
{
meshColor = Eigen::VectorXd::Zero(4);
meshColor.setZero();
meshTexturePath = "";
bool overrideMaterial = false;
if(urdf_visual->material!=NULL) {
......
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