PID position controller in Gazebo
Can someone point me to a simple example of how to use a PID controlled actuator in Gazebo? I found an example here but there is command topic (in rostopic list
) I just want to be able to send a joint to a position. Do I need an action server for this?
My urdf (sorry fo the long file, launch file is below).
<?xml version="1.0"?>
<gazebo>
<controller:gazebo_ros_controller_manager name="gazebo_ros_controller_manager" plugin="libgazebo_ros_controller_manager.so">
<alwaysOn>true</alwaysOn>
<updateRate>1000.0</updateRate>
<robotNamespace></robotNamespace>
<robotParam>robot_description</robotParam>
<interface:audio name="gazebo_ros_controller_manager_dummy_iface" />
</controller:gazebo_ros_controller_manager>
</gazebo>
<robot name="ar_arm">
<link name="world" />
<link name="arm_base">
<inertial>
<origin xyz="0.000000 0.000000 0.000990" rpy="0.000000 -0.000000 0.000000"/>
<mass value="101.000000" />
<inertia ixx="1.110000" ixy="0.000000" ixz="0.000000" iyy="100.110000" iyz="0.000000" izz="1.010000"/>
</inertial>
<collision name="arm_base_geom">
<origin xyz="0.000000 0.000000 0.050000" rpy="0.000000 -0.000000 0.000000"/>
<geometry>
<box size="1.000000 1.000000 0.100000"/>
</geometry>
</collision>
<visual>
<origin xyz="0.000000 0.000000 0.050000" rpy="0.000000 -0.000000 0.000000"/>
<geometry>
<box size="1.000000 1.000000 0.100000"/>
</geometry>
<material name="Cyan">
<color rgba="0 1 1 1.0"/>
</material>
</visual>
</link>
<link name="arm_cylinder">
<inertial>
<origin xyz="0.000000 0.000000 0.600000" rpy="0.000000 -0.000000 0.000000"/>
<mass value="1.000000" />
<inertia ixx="0.110000" ixy="0.000000" ixz="0.000000" iyy="100.110000" iyz="0.000000" izz="1.010000"/>
</inertial>
<collision name="arm_base_geom_arm_trunk">
<origin xyz="0.000000 0.000000 0.600000" rpy="0.000000 -0.000000 0.000000"/>
<geometry>
<cylinder radius="0.050000" length="1.00000"/>
</geometry>
</collision>
<visual name="arm_base_geom_arm_trunk_visual" cast_shadows="1">
<origin xyz="0.000000 0.000000 0.650000" rpy="0.000000 -0.000000 0.000000"/>
<geometry>
<cylinder radius="0.050000" length="1.100000"/>
</geometry>
<material name="Red">
<color rgba="255 0 0 1"/>
</material>
</visual>
</link>
<link name="arm_shoulder_pan">
<inertial>
<mass value="1.100000"/>
<origin xyz="0.045455 0.000000 0.000000" rpy="0.000000 -0.000000 0.000000"/>
<inertia ixx="0.011000" ixy="0.000000" ixz="0.000000" iyy="0.022500" iyz="0.000000" izz="0.013500"/>
</inertial>
<collision name="arm_shoulder_pan_geom_arm_shoulder">
<origin xyz="0.550000 0.000000 0.050000" rpy="0.000000 -0.000000 0.000000"/>
<geometry>
<box size="1.000000 0.050000 0.100000"/>
</geometry>
</collision>
<visual name="arm_shoulder_pan_geom_arm_shoulder_visual" cast_shadows="1">
<origin xyz="0.550000 0.000000 0.050000" rpy="0.000000 -0.000000 0.000000"/>
<geometry>
<box size="1.000000 0.050000 0.100000"/>
</geometry>
<material name="Cyan">
<color rgba="0 1 1 1.0"/>
</material>
</visual>
</link>
<link name="arm_shoulder_pivot">
<inertial>
<mass value="0.100001"/>
<origin xyz="0.045455 0.000000 0.000000" rpy="0.000000 -0.000000 0.000000"/>
<inertia ixx="0.011000" ixy="0.000000" ixz="0.000000" iyy="0.022500" iyz="0.000000" izz="0.013500"/>
</inertial>
<collision name="arm_shoulder_pan_geom">
<origin pose="0.000000 0.000000 0.050000 0.000000 -0.000000 0.000000"/>
<geometry>
<cylinder ...
http://gazebosim.org/wiki/Tutorials/1.3/intermediate/pid_control_joint
@inflo deadlink