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

LevAva's profile - activity

2016-12-14 11:51:20 -0500 received badge  Student (source)
2015-12-16 02:53:18 -0500 received badge  Famous Question (source)
2015-11-12 09:34:06 -0500 received badge  Notable Question (source)
2015-10-19 09:07:12 -0500 received badge  Popular Question (source)
2015-10-08 19:39:38 -0500 answered a question Gazebo: disable physics or enable kinematics through code/command line

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
gravity:
  x: 0.0
  y: 0.0
  z: 0.0
ode_config:
  auto_disable_bodies: False
  sor_pgs_precon_iters: 0
  <!--SET THIS TO ZERO TO DISABLE PHYSICS-->
  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"
2015-10-07 01:08:12 -0500 asked a question Gazebo: disable physics or enable kinematics through code/command line

I know that Gazebo has its own answers page, but it doesn't seem to be up anymore so I thought I might try here.

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