ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Maximum number of contacts Gazebo ROS

asked 2015-03-31 04:30:50 -0600

Where and how can we set maximum number of contacts in Gazebo?

By default the max. num. of contacts is 20 "rosparam get /gazebo/max_contacts" Setting the parameter to any other ( ex. 100) " rosparam set /gazebo/max_contacts 100 " does not affect the simulation results, I am always getting 20 contacts using gazebo plugin bumpers.

edit retag flag offensive close merge delete

Comments

Calling service rosservice call /gazebo/setphysicsproperties and setting maxcontacts to 100 does not work. After calling service rosservice call /gazebo/getphysicsproperties the maxcontacts is still 20.

Nomad gravatar image Nomad  ( 2015-04-06 05:09:06 -0600 )edit

in https://bitbucket.org/osrf/gazebo/src...

// MAX_CONTACT_JOINTS truncates <max_contacts> specified in SDF #define MAX_CONTACT_JOINTS 32 might be one reason which limits the number of contacts generated ?

GuiHome gravatar image GuiHome  ( 2015-04-08 09:57:21 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-03-31 06:31:13 -0600

GuiHome gravatar image

I think gazebo would react to a service call, not to a parameter change on the parameter server

maybe try using the

rosservice call /gazebo/set_physics_properties

and copy the current properties that you get with

rosservice call /gazebo/get_physics_properties

something like

rosservice call /gazebo/set_physics_properties "time_step: 0.001
max_update_rate: 1000.0
gravity: 
  x: 0.0
  y: 0.0
  z: 0.0
ode_config: 
  auto_disable_bodies: False
  sor_pgs_precon_iters: 0
  sor_pgs_iters: 50
  sor_pgs_w: 1.3
  sor_pgs_rms_error_tol: 0.0
  contact_surface_layer: 0.001
  contact_max_correcting_vel: 100.0
  cfm: 0.0
  erp: 0.2
  max_contacts: 100"
edit flag offensive delete link more

Comments

@GuiHome the objects in Gazebo freeze after calling this service. However in RVIZ, I see that frames move and there even collisions. It seems that simulation is working but the visualization in Gazebo fails. The maximum number of contacts is still 20.

Nomad gravatar image Nomad  ( 2015-04-01 02:26:45 -0600 )edit

my suggested parameters have no gravity and settings that work on my side. You should copy the settings that worked for you using the get_physics_properties I double checked and indeed the maximum contact does not change after setting it

GuiHome gravatar image GuiHome  ( 2015-04-08 09:38:53 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-31 04:30:50 -0600

Seen: 2,600 times

Last updated: Mar 31 '15