Skip to content
Snippets Groups Projects
Commit c925cf02 authored by Nicolas Mansard's avatar Nicolas Mansard Committed by Nicolas Mansard
Browse files

Corrected two typos in the code, as notived by @fvalenza.

parent 8cc9df54
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "pinocchio/algorithm/center-of-mass.hpp" #include "pinocchio/algorithm/center-of-mass.hpp"
#include "pinocchio/algorithm/compute-all-terms.hpp" #include "pinocchio/algorithm/compute-all-terms.hpp"
#include "pinocchio/algorithm/kinematics.hpp" #include "pinocchio/algorithm/kinematics.hpp"
#include "pinocchio/algorithm/collisions.hpp" #include "pinocchio/algorithm/geometry.hpp"
#include "pinocchio/parsers/urdf.hpp" #include "pinocchio/parsers/urdf.hpp"
#include "pinocchio/parsers/sample-models.hpp" #include "pinocchio/parsers/sample-models.hpp"
......
...@@ -79,8 +79,9 @@ namespace se3 ...@@ -79,8 +79,9 @@ namespace se3
const Eigen::VectorXd & q const Eigen::VectorXd & q
); );
inline void computeBodyRadius(const GeometryModel & geomModel, inline void computeBodyRadius(const Model & model,
GeometryData & geomData); const GeometryModel & geomModel,
GeometryData & geomData);
} // namespace se3 } // namespace se3
......
...@@ -103,9 +103,8 @@ namespace se3 ...@@ -103,9 +103,8 @@ namespace se3
#define SE3_GEOM_AABB(FCL,p1,p2,p3) \ #define SE3_GEOM_AABB(FCL,p1,p2,p3) \
SE3::Vector3( \ SE3::Vector3( \
FCL->aabb_local.p1##_ [0], \ FCL->aabb_local.p1##_ [0], \
FCL->aabb_local.p1##_ [1], \ FCL->aabb_local.p2##_ [1], \
FCL->aabb_local.p1##_ [2]) FCL->aabb_local.p3##_ [2])
/// For all bodies of the model, compute the point of the geometry model /// For all bodies of the model, compute the point of the geometry model
/// that is the further from the center of the joint. This quantity is used /// that is the further from the center of the joint. This quantity is used
...@@ -114,7 +113,7 @@ namespace se3 ...@@ -114,7 +113,7 @@ namespace se3
const GeometryModel & geomModel, const GeometryModel & geomModel,
GeometryData & geomData) GeometryData & geomData)
{ {
geomData.radius.resize(model.joints.size()); geomData.radius.resize(model.joints.size(),0);
BOOST_FOREACH(const GeometryObject & geom,geomModel.geometryObjects) BOOST_FOREACH(const GeometryObject & geom,geomModel.geometryObjects)
{ {
std::cout << "New body radius" << geom.name << std::endl; std::cout << "New body radius" << geom.name << std::endl;
...@@ -122,7 +121,7 @@ namespace se3 ...@@ -122,7 +121,7 @@ namespace se3
= geom.collision_object.collisionGeometry(); = geom.collision_object.collisionGeometry();
const SE3 & jMb = geom.placement; // placement in joint. const SE3 & jMb = geom.placement; // placement in joint.
double radius = 0.0; double radius = geomData.radius[geom.parent];
// The radius is simply the one of the 8 corners of the AABB cube, expressed // The radius is simply the one of the 8 corners of the AABB cube, expressed
// in the joint frame, whose norm is the highest. // in the joint frame, whose norm is the highest.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment