Gazebo | Ignition | Community
Ask Your Question

Disable physics or enable kinematics for link through ROS or command line

asked 2015-10-07 21:05:07 -0600

LevAva gravatar image

I am trying to send model state information to gazebo for my robot, and control it using a teleop_twist_keyboard. The model state is sent and received fine, but then the robot starts rubberbanding around on the axis where I changed its position (I am sending absolute xyz/orientation, not velocity commands from the teleop keyboard). I noticed that if I either disable physics under the Physics tab on the gui, or set Models/MyRobot/link1/kinematic true, also through the gui, everything behaves much much better.

The problem is, I can't find a way to change either of those options through the command line or through ROS. The options are neither in the physics properties message nor the link properties message, and I haven't seen any other way to change them other than the gui.

Pausing and unpausing physics does not work, since that turns off the simulation timer altogether which means model state positions aren't updated, nor are laser scans. If I try to set my model to static, then my laser link stops updating rayscans, which is not helpful. Doing <kinematic>true</kinematic> on my .gazebo for the .urdf did nothing at all.

Is there a way to either disable physics (but keep the simulation running) or make my link/robot kinematic through command line arguments or through ROS service calls/messages? Preferably the disabling physics one, though, since it's running on a VM and disabling physics gives a massive speed boost.

ROS Version: Jade Gazebo Version: 5.0

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-10-08 19:38:19 -0600

LevAva gravatar image

I have found a solution of sorts, instead of disabling physics directly I just set the solver iterations to 0 which has the same effect and can be done through messages. Of course this is the nuclear option, since this turns off all physics, not just for the link you want.

Here's a rosservice call to do it:

rosservice call /gazebo/set_physics_properties "
time_step: 0.001
max_update_rate: 1000.0
  x: 0.0
  y: 0.0
  z: 0.0
  auto_disable_bodies: False
  sor_pgs_precon_iters: 0
  sor_pgs_iters: 0
  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: 20"
edit flag offensive delete link more

Question Tools


Asked: 2015-10-07 21:05:07 -0600

Seen: 1,234 times

Last updated: Oct 08 '15