Home | Tutorials | Wiki | Issues
Ask Your Question
1

Could not clear body wrenches

asked 2012-12-13 10:51:21 -0500

Shanker Keshavdas gravatar image

updated 2012-12-13 10:51:45 -0500

I am trying to clear body wrenches while following the tutorials in ROS for an object. Upon application of the body wrench, the object starts rotating. However, issuing the clear_body_wrenches service call does not clear them.

$ rosrun gazebo spawn_model -file desknog.sdf -gazebo -model desk -z 1
loading model xml from file
[INFO] [WallTime: 1355416257.896005] [0.000000] waiting for service /gazebo/spawn_gazebo_model
spawn status:  SpawnModel: successfully spawned model
$ rosservice call gazebo/apply_body_wrench '{body_name: "desk::desk6" , wrench: { torque: { x: 0.04, y: 0 , z: 0 } }, start_time: 10000000000, duration: 1000000000 }'
success: True
status_message: ''
$ rosservice call gazebo/clear_body_wrenches '{body_name: "desk::desk6"}'

The output from the terminal running gazebo reads:

Msg Waiting for master.[ INFO] [1355416249.217083040]: waitForService: Service 
Msg Connected to gazebo master @ http://localhost:11345
[ INFO] [1355416251.158477063, 0.160000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1355416251.196082250, 3.310000000]: Starting to spin physics dynamic reconfigure node...
LightListWidget::OnLightMsg
[ INFO] [1355416263.447845715, 889.273000000]: ApplyBodyWrench: reference_frame is empty/world/map, using inertial frame, transferring from body relative to inertial frame

The gazebo model file (desknog.sdf) reads:

<gazebo version='1.0'>
  <model name='desk6_model' static='0'>
<origin pose='0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000'/>
<link name='desk6' gravity='0' self_collide='0' kinematic='0'>
  <origin pose='0.000000 0.000000 0.375000 0.000000 -0.000000 0.000000'/>
  <inertial mass='10.000000' density='1.000000'>
    <origin pose='0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000'/>
    <inertia ixx='1.000000' ixy='0.000000' ixz='0.000000' iyy='1.000000' iyz='0.000000' izz='1.000000'/>
  </inertial>
  <collision name='desk6top_geom' laser_retro='0.000000'>
    <origin pose='0.000000 0.000000 0.750000 0.000000 -0.000000 0.000000'/>
    <geometry>
      <box size='0.750000 1.500000 0.100000'/>
    </geometry>
    <surface>
      <friction>
        <ode mu='-1.000000' mu2='-1.000000' fdir1='0.000000 0.000000 0.000000' slip1='0.000000' slip2='0.000000'/>
      </friction>
      <bounce restitution_coefficient='0.000000' threshold='100000.000000'/>
      <contact>
        <ode soft_cfm='0.000000' soft_erp='0.200000' kp='100000000.000000' kd='1.000000' max_vel='100.000000' min_depth='0.001000'/>
      </contact>
    </surface>
  </collision>
  <visual name='desk6top_geom_visual' cast_shadows='1' laser_retro='0.000000' transparency='0.000000'>
    <origin pose='0.000000 0.000000 0.750000 0.000000 -0.000000 0.000000'/>
    <geometry>
      <box size='0.750000 1.500000 0.100000'/>
    </geometry>
    <material script='Gazebo/Green'/>
  </visual>
  <collision name='desk6leg_geom' laser_retro='0.000000'>
    <origin pose='0.000000 0.000000 0.375000 0.000000 -0.000000 0.000000'/>
    <geometry>
      <box size='0.650000 1.300000 0.700000'/>
    </geometry>
    <surface>
      <friction>
        <ode mu='-1.000000' mu2='-1.000000' fdir1='0.000000 0.000000 0.000000' slip1='0.000000' slip2='0.000000'/>
      </friction>
      <bounce restitution_coefficient='0.000000' threshold='100000.000000'/>
      <contact>
        <ode soft_cfm='0.000000' soft_erp='0.200000' kp='100000000.000000' kd='1.000000' max_vel='100.000000' min_depth='0.001000'/>
      </contact>
    </surface>
  </collision>
  <visual name='desk6leg_geom_visual' cast_shadows='1' laser_retro='0.000000' transparency='0.000000'>
    <origin pose='0.000000 0.000000 0.375000 0.000000 -0.000000 0.000000'/>
    <geometry>
      <box size='0 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-07-23 17:15:51 -0500

nkoenig gravatar image

ROS tutorials related to Gazebo are outdated. Please use the tutorials on gazebosim.org/wiki.

edit flag offensive delete link more
0

answered 2013-01-02 05:37:58 -0500

I ran into the same problem and I dont have a solution. All I can say is that when you do "roscd gazebo" and then "cd srv" you can see that there is not a single clear service.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-12-13 10:51:21 -0500

Seen: 453 times

Last updated: Jul 23 '13