0
$\begingroup$

When trying to use the library libgazebo_ros_ft_sensor.so for a F/T-sensor plugin there is a strange repeating pattern of "noise" on the topic when the robot is just being gravity compensated and locked in place with an impedance controller, in other words no movement of any kind on the robot.

Image of ft sensor output

I made a xacro macro to use with the rest of my setup xacro setup wherein the gazebo plugin using libgazebo_ros_ft_sensor.so is defined.

<xacro:macro name="ft_sensor" params="connected_to:='' arm_id:='' xyz:='0 0 0' rpy:='0 0 0'">
    <xacro:unless value="${connected_to == ''}">
    <joint name="${arm_id}_ft_joint" type="fixed">
            <parent link="${connected_to}"/>
        <child link="${arm_id}_ft_base_flange"/>
            <origin xyz="${xyz}" rpy="${rpy}"/>
        </joint>
    </xacro:unless>
    
    <link name="${arm_id}_ft_base_flange"/>
    
    <joint name="${arm_id}_ft_base_flange_joint" type="fixed">
        <parent link="${arm_id}_ft_base_flange"/>
            <child link="${arm_id}_ft_base"/>
        <origin xyz="0 0 0" rpy="0 0 ${pi/2}"/>
    </joint>
    
    <link name="${arm_id}_ft_base">
        <visual>
            <origin rpy="0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://franka_loadouts/meshes/visual/ft_sensor.obj" scale="1 1 1"/>
            </geometry>
        </visual>
        <collision>
            <origin rpy="0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://franka_loadouts/meshes/collision/ft_sensor.stl" scale="1 1 1"/>
            </geometry>
        </collision>
        <inertial>
            <mass value="0.3327"/>
            <origin rpy="0 0 0" xyz="0 0 0.0178"/>
            <inertia ixx="0.0001801" ixy="0" ixz="0" iyy="0.0001801" iyz="0" izz="0.0002567"/>
        </inertial>
    </link>
    
    <joint name="${arm_id}_ft_insert_joint" type="fixed">
        <parent link="${arm_id}_ft_base"/>
            <child link="${arm_id}_ft_insert"/>
            <origin xyz="0 0 0.038" rpy="0 0 0"/>
    </joint>
    
    <gazebo reference="${arm_id}_ft_insert_joint">
    <disableFixedJointLumping>true</disableFixedJointLumping>
    <sensor name="F/T-sensor" type="force_torque">
        <force_torque>
            <frame>parent</frame>
            <measure_direction>child_to_parent</measure_direction>
            <noise>
                <type>gaussian</type>
                <mean>0.0</mean>
                <stddev>0.0</stddev>
                <bias_mean>0.0</bias_mean>
                <bias_stddev>0.0</bias_stddev>
            </noise>
        </force_torque>
    </sensor>
</gazebo>
<gazebo>
    <plugin name="ft_sensor" filename="libgazebo_ros_ft_sensor.so">
        <updateRate>200.0</updateRate>
        <topicName>/ft_sensor/measurements</topicName>
        <gaussianNoise>0.0</gaussianNoise>
        <jointName>${arm_id}_ft_insert_joint</jointName>
        </plugin>
    </gazebo>
    
    <link name="${arm_id}_ft_insert"> <!-- Visual and collision defined in the base and also include the insert -->
        <inertial>
            <origin rpy="0 0 0" xyz="0 0 0.0760"/>
            <mass value="0.0760"/>
            <inertia ixx="0.0000146" ixy="0" ixz="0" iyy="0.0000143" iyz="0" izz="0.0000252"/>
        </inertial>
    </link>
    
    <joint name="${arm_id}_ft_flange_joint" type="fixed">
        <parent link="${arm_id}_ft_insert"/>
            <child link="${arm_id}_ft_flange"/>
        <origin rpy="0 0 ${pi/2}" xyz="0 0 0.0116"/>
    </joint>
    
    <link name="${arm_id}_ft_flange"/>
    
</xacro:macro>

Where is this coming from?

I've tried to set all the noise related parameters to zero, but to no avail, it seems they get set to zero by default anyway. At least according to:

https://github.com/ros-simulation/gazebo_ros_pkgs/blob/noetic-devel/gazebo_plugins/src/gazebo_ros_ft_sensor.cpp

Although admittedly I can't seem to wrap my head around how noise is generated and applied in:

https://github.com/gazebosim/gz-sensors/blob/gz-sensors7/src/ForceTorqueSensor.cc

And to begin with I'm not even sure if these sources apply to my current setup.

I'm a little confused about how this plugin is supposed to work, at the moment it seems to me like some things are defined twice in the sensor and plugin sections respectively. I can't seem to find the sources I'm looking for relating to general information about the valid syntax for plugin setup.

My end goal is to either lessen the amplitude of this "noise" or completely remove it.

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.