{"id":1474,"date":"2016-09-04T09:26:37","date_gmt":"2016-09-04T08:26:37","guid":{"rendered":"http:\/\/www.macerobotics.com\/?p=1474"},"modified":"2016-09-04T09:26:37","modified_gmt":"2016-09-04T08:26:37","slug":"ros-partie-1-creer-votre-robot","status":"publish","type":"post","link":"https:\/\/www.macerobotics.com\/?p=1474","title":{"rendered":"ROS Partie 1 : Cr\u00e9er votre robot"},"content":{"rendered":"<p>Dans ce tutoriel vous allez cr\u00e9er votre propre mod\u00e9lisation de robot mobile avec l&#8217;aide d&#8217;un fichier URDF. Ce tutoriel n\u00e9cessite l&#8217;installation de ROS sur Ubuntu.<\/p>\n<p><span style=\"text-decoration: underline;\">Syst\u00e8me :<\/span><\/p>\n<ul>\n<li>Ubuntu version 16.04<\/li>\n<li><a href=\"http:\/\/www.ros.org\/\">ROS Kinectic<\/a><\/li>\n<\/ul>\n<h1>Cr\u00e9e votre workspace<\/h1>\n<p>Une fois sur Ubuntu, vous pouvez ouvrir un terminal.<\/p>\n<p>La premi\u00e8re chose \u00e0 faire et de cr\u00e9er votre workspace pour la cr\u00e9ation de votre robot.<\/p>\n<ul>\n<li>Commande pour cr\u00e9e le dosser <em><strong>MyRobot_ws<\/strong><\/em> :<\/li>\n<\/ul>\n<pre><strong>$ mkdir -p ~\/MyRobot_ws\/src\r\n$ cd ~\/MyRobot_ws\/src<\/strong><\/pre>\n<ul>\n<li>Commande pour initialiser le workspace :<\/li>\n<\/ul>\n<pre><strong>$ catkin_init_workspace<\/strong><\/pre>\n<h1>Cr\u00e9e votre package<\/h1>\n<ul>\n<li>Commande pour cr\u00e9e le package MyRobot :<\/li>\n<\/ul>\n<pre><strong>$ cd ~\/MyRobot_ws\/src\r\n$ catkin_create_pkg MyRobot<\/strong><\/pre>\n<p>Maintenant que votre environnement est pr\u00e8s vous pouvez cr\u00e9e la mod\u00e9lisation du robot.<\/p>\n<h1>Mod\u00e9lisation du robot<\/h1>\n<p>Cette partie va vous permettre de r\u00e9aliser la mod\u00e9lisation du petit robot mobile de type diff\u00e9rentielle :<\/p>\n<ul>\n<li>2 roues<\/li>\n<li>1 ball-caster<\/li>\n<li>1 chassis<\/li>\n<\/ul>\n<h3>Mod\u00e9lisation du ch\u00e2ssis<\/h3>\n<ul>\n<li>Cr\u00e9e un fichier de type URDF (Unified Robot Description Format) :<\/li>\n<\/ul>\n<pre><strong>$ gedit ~\/MyRobot_ws\/src\/MyRobot\/MyRobot.urdf<\/strong><\/pre>\n<ul>\n<li>Fichier <em>MyRobot.urdf :<\/em><\/li>\n<\/ul>\n<pre><strong><span style=\"color: #000000;\"><span style=\"color: #008000;\">&lt;?xml version=\"1.0\"?&gt;\r\n&lt;robot name=\"MyRobot\"&gt;<\/span>\r\n\r\n&lt;link name=\"base_link\"&gt;\r\n\u00a0\u00a0 &lt;visual&gt;\r\n\u00a0\u00a0\u00a0 &lt;geometry&gt;\r\n\u00a0\u00a0\u00a0\u00a0 &lt;cylinder length=\"0.035\" radius=\"0.05\"\/&gt;\r\n\u00a0\u00a0\u00a0 &lt;\/geometry&gt;\r\n\u00a0\u00a0\u00a0 &lt;material name=\"white\"&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;color rgba=\"1 1 1 1\"\/&gt;\r\n\u00a0\u00a0\u00a0 &lt;\/material&gt;\r\n\u00a0\u00a0 &lt;\/visual&gt;\r\n\u00a0&lt;\/link&gt;\r\n<span style=\"color: #008000;\">\r\n&lt;\/robot&gt;<\/span><\/span><\/strong><\/pre>\n<ul>\n<li>Enregistrer le fichier<\/li>\n<li>Commande pour visualisez le ch\u00e2ssis en 3D avec l&#8217;outils Rviz :<\/li>\n<\/ul>\n<pre><strong>$ roslaunch urdf_tutorial display.launch model:=MyRobot.urdf<\/strong><\/pre>\n<h3><a href=\"http:\/\/fr.macerobotics.com\/wp-content\/uploads\/sites\/4\/2016\/09\/Imge_rviz.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1322\" src=\"http:\/\/fr.macerobotics.com\/wp-content\/uploads\/sites\/4\/2016\/09\/Imge_rviz.png\" alt=\"Imge_rviz\" width=\"996\" height=\"448\" \/><\/a><\/h3>\n<h3>Mod\u00e9lisation des roues du robot mobile<\/h3>\n<ul>\n<li>Mod\u00e9lisation de la roue droite :<\/li>\n<\/ul>\n<pre><strong>\u00a0&lt;link name=\"right_wheel\"&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;visual&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;geometry&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;cylinder length=\"0.005\" radius=\"0.016\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/geometry&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;material name=\"black\"&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;color rgba=\"0 0 0 1\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/material&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;\/visual&gt; <\/strong>\r\n<strong>\u00a0 &lt;\/link&gt;<\/strong><\/pre>\n<ul>\n<li>Mod\u00e9lisation du lien entre la roue droite et le ch\u00e2ssis :<\/li>\n<\/ul>\n<pre><strong>\u00a0&lt;joint name=\"right_wheel_joint\" type=\"continuous\"&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;axis xyz=\"0 0 1\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;parent link=\"base_link\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;child link=\"right_wheel\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;origin rpy=\"0 -1.5708 0\" xyz=\"0.05 0 -0.0105\"\/&gt; <\/strong>\r\n<strong>\u00a0 &lt;\/joint&gt;<\/strong><\/pre>\n<ul>\n<li>Mod\u00e9lisation de la roue gauche :<\/li>\n<\/ul>\n<pre>\u00a0<strong>&lt;link name=\"left_wheel\"&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;visual&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;geometry&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;cylinder length=\"0.005\" radius=\"0.016\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/geometry&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;material name=\"black\"&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;color rgba=\"0 0 0 1\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/material&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;\/visual&gt; <\/strong>\r\n<strong>\u00a0 &lt;\/link&gt;<\/strong><\/pre>\n<ul>\n<li>Mod\u00e9lisation du lien entre la roue gauche et le ch\u00e2ssis :<\/li>\n<\/ul>\n<pre><strong>\u00a0 &lt;joint name=\"left_wheel_joint\" type=\"continuous\"&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;axis xyz=\"0 0 1\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;parent link=\"base_link\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;child link=\"left_wheel\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;origin rpy=\"0 -1.5708 0\" xyz=\"-0.05 0 -0.0105\"\/&gt; <\/strong>\r\n<strong>\u00a0 &lt;\/joint&gt;<\/strong><\/pre>\n<ul>\n<li>Visualisation du r\u00e9sultat avec Rviz :<\/li>\n<\/ul>\n<pre><strong>$ roslaunch urdf_tutorial display.launch model:=MyRobot.urdf<\/strong><\/pre>\n<h3><a href=\"http:\/\/fr.macerobotics.com\/wp-content\/uploads\/sites\/4\/2016\/09\/Imge_rviz_2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1325\" src=\"http:\/\/fr.macerobotics.com\/wp-content\/uploads\/sites\/4\/2016\/09\/Imge_rviz_2.png\" alt=\"Imge_rviz_2\" width=\"945\" height=\"463\" \/><\/a><\/h3>\n<p>Avec Rviz vous pouvez visualiser le robot avec les deux roues.<\/p>\n<h3>Mod\u00e9lisation de la ball caster<\/h3>\n<ul>\n<li>Mod\u00e9lisation de la ball-caster :<\/li>\n<\/ul>\n<pre><strong>\u00a0 &lt;link name=\"caster_wheel\"&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;visual&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;geometry&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;sphere radius=\"0.0045\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/geometry&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;material name=\"black\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;\/visual&gt; <\/strong>\r\n<strong>\u00a0 &lt;\/link&gt;<\/strong><\/pre>\n<ul>\n<li>Mod\u00e9lisation du lien entre la roue gauche et le ch\u00e2ssis :<\/li>\n<\/ul>\n<pre><strong>\u00a0 &lt;joint name=\"caster_wheel_joint\" type=\"fixed\"&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;parent link=\"base_link\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;child link=\"caster_wheel\"\/&gt; <\/strong>\r\n<strong>\u00a0\u00a0\u00a0 &lt;origin rpy=\"0 0 0\" xyz=\"0 0.025 -0.022\"\/&gt; <\/strong>\r\n<strong>\u00a0 &lt;\/joint&gt;<\/strong><\/pre>\n<ul>\n<li>Visualisation du r\u00e9sultat avec Rviz :<\/li>\n<\/ul>\n<pre><strong>$ roslaunch urdf_tutorial display.launch model:=MyRobot.urdf<\/strong><\/pre>\n<p><a href=\"http:\/\/fr.macerobotics.com\/wp-content\/uploads\/sites\/4\/2016\/09\/Imge_rviz_3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1330\" src=\"http:\/\/fr.macerobotics.com\/wp-content\/uploads\/sites\/4\/2016\/09\/Imge_rviz_3.png\" alt=\"Imge_rviz_3\" width=\"1360\" height=\"710\" \/><\/a><\/p>\n<p>Fin de la partie n\u00b01.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dans ce tutoriel vous allez cr\u00e9er votre propre mod\u00e9lisation de robot mobile avec l&#8217;aide d&#8217;un fichier URDF. Ce tutoriel n\u00e9cessite l&#8217;installation de ROS sur Ubuntu. Syst\u00e8me : Ubuntu version 16.04 ROS Kinectic Cr\u00e9e votre workspace Une fois sur Ubuntu, vous pouvez ouvrir un terminal. La premi\u00e8re chose \u00e0 faire et de cr\u00e9er votre workspace pour &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-1474","post","type-post","status-publish","format-standard","hentry","category-ros"],"_links":{"self":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/1474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1474"}],"version-history":[{"count":1,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/1474\/revisions"}],"predecessor-version":[{"id":1475,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/1474\/revisions\/1475"}],"wp:attachment":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}