Revision history [back]

the question about the contact sensor data

when I get the data of contact sensor, such as, in 1 second, gazebo will generate 16 group(contact size =16)(I know that is the data of different time),and in a group, there are 12 groups data(contact(i).position size=12),whether it means that in that time, the link's 12 groups force and torque must be added up to sum as the result data? and I saw the instance as: // gzerr << " Depth:" << contacts.contact(i).depth(j) << "\n"; fTotal += math::Vector3( contacts.contact(i).wrench(j).body_1_force().x(), contacts.contact(i).wrench(j).body_1_force().y(), contacts.contact(i).wrench(j).body_1_force().z()); tTotal += math::Vector3( contacts.contact(i).wrench(j).body_1_torque().x(), contacts.contact(i).wrench(j).body_1_torque().y(), contacts.contact(i).wrench(j).body_1_torque().z()); } // low pass filter over time double e = 0.99; this->rFootForce = this->rFootForce * e + fTotal * (1.0 - e); this->rFootTorque = this->rFootTorque * e + tTotal * (1.0 - e);

geometry_msgs::Wrench msg;
msg.force.x = this->rFootForce.x;
msg.force.y = this->rFootForce.y;
msg.force.z = this->rFootForce.z;
msg.torque.x = this->rFootTorque.x;
msg.torque.y = this->rFootTorque.y;
msg.torque.z = this->rFootTorque.z;
this->pubRFootContact.publish(msg);


why use double e = 0.99; this->rFootForce = this->rFootForce * e + fTotal * (1.0 - e);? what is the filter's aim? if there is not the 'e', the fTotal cannot be the last result?

the question about the contact sensor data

when I get the data of contact sensor, such as, in 1 second, gazebo will generate 16 group(contact size =16)(I know that is the data of different time),and in a group, there are 12 groups data(contact(i).position size=12),whether it means that in that time, the link's 12 groups force and torque must be added up to sum as the result data? and I saw the instance as: // gzerr << " Depth:" << contacts.contact(i).depth(j) << "\n"; fTotal += math::Vector3( contacts.contact(i).wrench(j).body_1_force().x(), contacts.contact(i).wrench(j).body_1_force().y(), contacts.contact(i).wrench(j).body_1_force().z()); tTotal += math::Vector3( contacts.contact(i).wrench(j).body_1_torque().x(), contacts.contact(i).wrench(j).body_1_torque().y(), contacts.contact(i).wrench(j).body_1_torque().z()); } // low pass filter over time double e = 0.99; this->rFootForce = this->rFootForce * e + fTotal * (1.0 - e); this->rFootTorque = this->rFootTorque * e + tTotal * (1.0 - e);

geometry_msgs::Wrench msg;
msg.force.x = this->rFootForce.x;
msg.force.y = this->rFootForce.y;
msg.force.z = this->rFootForce.z;
msg.torque.x = this->rFootTorque.x;
msg.torque.y = this->rFootTorque.y;
msg.torque.z = this->rFootTorque.z;
this->pubRFootContact.publish(msg);


why use double e = 0.99; this->rFootForce = this->rFootForce * e + fTotal * (1.0 - e);? what is the filter's aim? if there is not the 'e', the fTotal cannot be the last result?

and whether are the contact force and torque data equal to the joint force and torque of this link? please help me, thank you.