Commit 70c2e090 authored by Diane Bury's avatar Diane Bury
Browse files

Add object names in collision validation report

For use with objects that are not of CollisionObjectConstPtr_t type
parent f13a05ef
......@@ -34,15 +34,17 @@ namespace hpp {
{
/// First object in collision
CollisionObjectConstPtr_t object1;
std::string objectName1;
/// Second object in collision
CollisionObjectConstPtr_t object2;
std::string objectName2;
/// fcl collision results
fcl::CollisionResult result;
/// Write report in a stream
virtual std::ostream& print (std::ostream& os) const
{
os << "Collision between object " << object1->name () << " and "
<< object2->name ();
os << "Collision between object " << (object1 ? object1->name() : objectName1) << " and "
<< (object2 ? object2->name() : objectName2);
return os;
}
}; // class CollisionValidationReport
......
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