Hello,
I updated ubuntu 12.04 yesterday and I am running Gazebo standslone 1.8.6 and Ros fuerte. The problem is after installing updates the contact sensor plugin compiling error
error: ‘const class gazebo::msgs::JointWrench’ has no member named ‘body_2_torque’
before the updates the plugin was running perfectly. And this error only related to body forces and torques
for (unsigned int j = 0; j < contacts.contact(i).wrench_size(); ++j)
{
std::cout << j << " wrench between [" <<
contacts.contact(i).wrench(j).body_1_name() << "] and [" <<
contacts.contact(i).wrench(j).body_2_name() << "]\n";
std::cout << " body_1_force: "
<< 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() << "\n";
std::cout << " body_2_force: "
<< contacts.contact(i).wrench(j).body_2_force().x() << " "
<< contacts.contact(i).wrench(j).body_2_force().y() << " "
<< contacts.contact(i).wrench(j).body_2_force().z() << "\n";
std::cout << " body_1_torque: "
<< 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() << "\n";
std::cout << " body_2_torque: "
<< contacts.contact(i).wrench(j).body_2_torque().x() << " "
<< contacts.contact(i).wrench(j).body_2_torque().y() << " "
<< contacts.contact(i).wrench(j).body_2_torque().z() << "\n";
}
otherwise the position , depth, normal and collision strings are working. Any suggestions are so much appreciated. Thanks in advance!
Originally posted by Zahra on Gazebo Answers with karma: 122 on 2013-07-26
Post score: 0