How to add simple controller to my robot
Hi! I'm newbie with ROS. I'm trying to simulate my robot in Gazebo. It's a 4-wheel car-based platform.
First I created urdf-file, describing my model:
<?xml version="1.0"?>
<robot name="robocv" xmlns:controller="<a href=" http:="" playerstage.sourceforge.net="" gazebo="" xmlschema="" #controller"="">http://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
<link name="base_link">
<visual>
<origin rpy="0 0 0" xyz="0 0 0.17"/>
<geometry>
<box size="0.6 0.3 0.2"/>
</geometry>
<material name="blue">
<color rgba="0 0 0.8 1"/>
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0.17"/>
<geometry>
<box size="0.6 0.3 0.2"/>
</geometry>
</collision>
<inertial>
<mass value="10"/>
<inertia ixx="1.0" ixy="0.4" ixz="0.4" iyy="4" iyz="0.4" izz="4"/>
</inertial>
</link>
<gazebo reference="base_link">
</gazebo>
<link name="front_left_wheel">
<visual>
<geometry>
<cylinder length="0.1" radius="0.07"/>
</geometry>
<material name="random">
<color rgba="0.6 0.7 0.8 1"/>
</material>
</visual>
<collision>
<geometry>
<cylinder length="0.1" radius="0.07"/>
</geometry>
</collision>
<inertial>
<mass value="0.5"/>
<inertia ixx="0.2" ixy="0.2" ixz="0.2" iyy="0.2" iyz="0.2" izz="0.3"/>
</inertial>
</link>
<link name="front_right_wheel">
<visual>
<geometry>
<cylinder length="0.1" radius="0.07"/>
</geometry>
<material name="random"/>
</visual>
<collision>
<geometry>
<cylinder length="0.1" radius="0.07"/>
</geometry>
</collision>
<inertial>
<mass value="0.5"/>
<inertia ixx="0.2" ixy="0.2" ixz="0.2" iyy="0.2" iyz="0.2" izz="0.3"/>
</inertial>
</link>
<link name="back_left_wheel">
<visual>
<geometry>
<cylinder length="0.1" radius="0.07"/>
</geometry>
<material name="random"/>
</visual>
<collision>
<geometry>
<cylinder length="0.1" radius="0.07"/>
</geometry>
</collision>
<inertial>
<mass value="0.5"/>
<inertia ixx="0.2" ixy="0.2" ixz="0.2" iyy="0.2" iyz="0.2" izz="0.3"/>
</inertial>
</link>
<link name="back_right_wheel">
<visual>
<geometry>
<cylinder length="0.1" radius="0.07"/>
</geometry>
<material name="random"/>
</visual>
<collision>
<geometry>
<cylinder length="0.1" radius="0.07"/>
</geometry>
</collision>
<inertial>
<mass value="0.5"/>
<inertia ixx="0.2" ixy="0.2" ixz="0.2" iyy="0.2" iyz="0.2" izz="0.3"/>
</inertial>
</link>
<link name="front_left_wheelholder">
<visual>
<geometry>
<cylinder length="0.01" radius="0.01"/>
</geometry>
<material name="random"/>
</visual>
<inertial>
<mass value="0.5"/>
<inertia ixx="0.2" ixy="0.2" ixz="0.2" iyy="0.2" iyz="0.2" izz="0.3"/>
</inertial>
</link>
<link name="front_right_wheelholder">
<visual>
<geometry>
<cylinder length="0.01" radius="0.01"/>
</geometry>
<material name="random"/>
</visual>
<inertial>
<mass value="0.5"/>
<inertia ixx="0.2" ixy="0.2" ixz="0.2" iyy="0.2" iyz="0.2" izz="0.3"/>
</inertial>
</link>
<link name="back_left_wheelholder">
<visual>
<geometry>
<cylinder length="0.01" radius="0.01"/>
</geometry>
<material name="random"/>
</visual>
<inertial>
<mass value="0.5"/>
<inertia ixx="0.2" ixy="0.2" ixz="0.2" iyy="0.2" iyz="0.2" izz="0 ...
The Problem solved.
Hi Peter! Could you explain how you solved it? I tried running a controller for my own robot following the tutorial you posted above and the "simple urdf controller example", but the plugin I made isnt found although I inserted it in my urdf file. I don't really understand. Any help very appreciated
Sure. I'll write the answer.