Gazebo | Ignition | Community
Ask Your Question

guihome's profile - activity

2015-04-14 14:42:01 -0500 answered a question change Maximum number of contacts , max_contacts, allowed between two entities gazebo ros

the solution suggested by Andrei works on my side in gazebo2 on trusty if the <max_contacts>100</max_contacts> is put in the .world config after the physics tag (not in the urdf)

but I looked deeper to understand why the service to set physics properties does not work. I found the reason and this is a problem only before gazebo 3.0. From gazeboros the set physics properties service calls the generic PhysicsEngine setMaxContacts which does not in turn call the derived ODEPhysicsEngine setMaxContacts due to a mismatch between the arguments types between the class and its parent class (double vs unsigned int) This fix and the following probably solved the issue in gazebo 3.0 https://bitbucket.org/osrf/gazebo/diff/gazebo/physics/PhysicsEngine.hh?diff2=b15c2c925cb1&at=minorabi_3.0

recompiling gazebo2.2 from source with the double to unsigned int worked for me, I could set max contacts with the setphysicsproperties

2015-04-14 12:03:02 -0500 commented answer change Maximum number of contacts , max_contacts, allowed between two entities gazebo ros

I had a really quick look at the maxcontact setters and find it strange the way the value is set compared to other set value : this->sdf->GetElement("maxcontacts")->GetValue()->Set(value); [EDIT] Apparently this is ok as getvalue retrieves a paramPtr which can be set