# Warn: gazebo ApplyBodyWrench: reference frame not implemented yet

Hello List

I'm a newbie to Gazebo and have been experimenting with it for the last couple of days. So now I have a small problem, I wrote a simple 4 wheels robot (attached to this email) which spawns perfectly in gazebo. Now whenever I apply a body wrench, I get the following warning in Gazebo "[ WARN] [1299848525.581625793, 11872.099000000]: ApplyBodyWrench: reference frame and reference_point not implemented yet, force is defined and applied at the body frame"

rosservice call gazebo/apply_body_wrench '{body_name: "car::left_front_wheel" , wrench: { force: { x: 0.1, y: 0, z: 0 } , torque: { x: 0.0, y: 0 , z: 0 } }, start_time: 10000000000, duration: 1000000000 }'

The car moves actually the way I want, but it I'd understande from that warning that the force is applied to the base_link and not to the wheel the way I want. Or did I miss something?

Thanks alot for the help Best regards Moataz

wheels_robot4.urdf

<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from wheels_robot4.xacro            | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="wheels_robot" xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body" xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom" xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint" xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model" xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:visual="http://playerstage.sourceforge.net/gazebo/xmlschema/#visual" xmlns:xacro="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
<inertial>
<mass value="1"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<geometry>
<box size="1 0.6 0.1"/>
</geometry>
</visual>
<collision>
<geometry>
<box size="1 0.6 0.1"/>
</geometry>
</collision>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
</geometry>
<material name="Cyan1">
<color rgba="0 1 1 1.0"/>
</material>
</visual>
<collision>
<geometry>
</geometry>
</collision>
<inertial>
<mass value="0.1"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
</geometry>
<material name="Cyan1">
<color rgba="0 1 1 1.0"/>
</material>
</visual>
<collision>
<geometry>
</geometry>
</collision>
<inertial>
<mass value="0.1"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
</geometry>
<material name="Cyan1">
<color rgba="0 1 1 1.0"/>
</material>
</visual>
<collision>
<geometry>
</geometry>
</collision>
<inertial>
<mass value="0.1"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0 ...
edit retag close merge delete

Sort by » oldest newest most voted

implemented in trunk, please see r36485. Now you can apply a wrench on body1 where the wrench is defined in body2 frame. If the 2 frames are moving relative to each other, only the initial relative pose are used.

more

Hi, the service call you made applied the wrench on the correct body "car::left_front_wheel" correctly as you described above.

The warning applies only if a "reference_frame" different than the "body_name" is supplied. For example, if a "reference_frame" is added to your service call that is different than "car::left_front_wheel":

rosservice call gazebo/apply_body_wrench '{reference_frame: "car::base_link", body_name: "car::left_front_wheel" , wrench: { force: { x: 0.1, y: 0, z: 0 } , torque: { x: 0.0, y: 0 , z: 0 } }, start_time: 10000000000, duration: 1000000000 }'

The service call will still apply the specified wrench to "car::left_front_wheel" correctly, the warning pertains to the reference frame of the wrench is now erroneously located at "car::left_front_wheel", not the desired "car::base_link".

hope this makes sense.

the patch is in r36485 as mentioned above.

more

Sorry, couldn´t upload the code here (No enough Karma) so here it is uploaded to paste.org

With the reference_frame, it looks like one has to define the origin in origin and collision, although its said the identity vector will be used if not defined, I'll come back later regarding this point. many Thanks

more

Everything is ok now. I looked into the gazebo code. This warning is issued in all cases and force is applied to links the way I wanted. Thanks
( 2011-03-17 21:57:52 -0500 )edit

Thanks!

more