搭建环境:XMWare  Ubuntu14.04  ROS(indigo)

转载自古月居  转载连接:http://www.guyuehome.com/243

一、创建硬件描述包

    1. 已创建catkin_ws
    2. 打开终端(Ctrl + Alt + T)输入:cd ~/catkin_ws/src
    3. 输入:catkin_create_pkg smartcar_description urdf (indigo版)

二、智能车尺寸数据

三、建立urdf文件

  1. 在smartcar_description文件夹下创建urdf文件:先定位到smartcar_description(cd ~/catkin_ws/src/smartcar_description),然后输入:mkdir urdf //创建urdf文件夹
  2. 定位到urdf(cd urdf)文件夹,创建smartcar.urdf(touch smartcar.urdf),在smartcar.urdf中插入下列代码
 <?xml version="1.0"?>
<robot name="smartcar">
<link name="base_link">
<visual>
<geometry>
<box size="0.25 .16 .05"/>
</geometry>
<origin rpy="0 0 1.57075" xyz="0 0 0"/>
<material name="blue">
<color rgba="0 0 .8 1"/>
</material>
</visual>
</link> <link name="right_front_wheel">
<visual>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
</link> <joint name="right_front_wheel_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="right_front_wheel"/>
<origin rpy="0 1.57075 0" xyz="0.08 0.1 -0.03"/>
<limit effort="100" velocity="100"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint> <link name="right_back_wheel">
<visual>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
</link> <joint name="right_back_wheel_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="right_back_wheel"/>
<origin rpy="0 1.57075 0" xyz="0.08 -0.1 -0.03"/>
<limit effort="100" velocity="100"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint> <link name="left_front_wheel">
<visual>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
</link> <joint name="left_front_wheel_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="left_front_wheel"/>
<origin rpy="0 1.57075 0" xyz="-0.08 0.1 -0.03"/>
<limit effort="100" velocity="100"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint> <link name="left_back_wheel">
<visual>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
</link> <joint name="left_back_wheel_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="left_back_wheel"/>
<origin rpy="0 1.57075 0" xyz="-0.08 -0.1 -0.03"/>
<limit effort="100" velocity="100"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint> <link name="head">
<visual>
<geometry>
<box size=".02 .03 .03"/>
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
</link> <joint name="tobox" type="fixed">
<parent link="base_link"/>
<child link="head"/>
<origin xyz="0 0.08 0.025"/>
</joint>
</robot>

四、建立launch命令文件

在smartcar_description文件夹下建立launch文件夹,创建智能车的描述文件 base.urdf.rviz.launch(输入:touch base.urdf.rviz.launch创建),对其最后一行进行更改(更改内容:(find urdf_tutorial)/urdf.vcg 改为 (find urdf_tutorial)/urdf.rviz)描述代码如下:

 <launch>
<arg name="model" />
<arg name="gui" default="False" />
<param name="robot_description" textfile="$(find smartcar_description)/urdf/smartcar.urdf" />
<param name="use_gui" value="$(arg gui)"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" >
</node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find urdf_tutorial)/urdf.rviz" />
</launch>

五、效果演示

        在终端中输入显示命令:

roslaunch smartcar_description base.urdf.rviz.launch gui:=true

Robot Operating System (ROS)学习笔记---创建简单的机器人模型smartcar的更多相关文章

  1. Robot Operating System (ROS)学习笔记2---使用smartcar进行仿真

    搭建环境:XMWare  Ubuntu14.04  ROS(indigo) 转载自古月居  转载连接:http://www.guyuehome.com/248 一.模型完善 文件夹urdf下,创建ga ...

  2. Robot Operating System (ROS)学习笔记3---键盘控制

    搭建环境:XMWare  Ubuntu14.04  ROS(indigo) 转载自古月居  转载连接:http://www.guyuehome.com/253 一.创建控制包 catkin_creat ...

  3. Robot Operating System (ROS)学习笔记4---语音控制

    搭建环境:XMWare  Ubuntu14.04  ROS(indigo) 转载自古月居  转载连接:http://www.guyuehome.com/260 一.语音识别包 1.安装         ...

  4. ROS探索总结(五)——创建简单的机器人模型smartcar

    前面我们使用的是已有的机器人模型进行仿真,这一节我们将建立一个简单的智能车机器人smartcar,为后面建立复杂机器人打下基础. 一.创建硬件描述包 roscreat-pkg  smartcar_de ...

  5. 创建简单的机器人模型smartcar

    前面我们使用的是已有的机器人模型进行仿真,这一节我们将建立一个简单的智能车机器人 smartcar,为后面建立复杂机器人打下基础. 一.创建硬件描述包. cd ~/catkin_ws/srcroscr ...

  6. 【kinetic】操作系统探索总结(五)创建简单的机器人模型smartcar

    p { margin-bottom: 0.1in; direction: ltr; line-height: 120%; text-align: justify } a:link { color: r ...

  7. ROS学习记录(一)————创建简单的机器人模型smartcar

    这是我在古月居上找的(http://www.guyuehome.com/243),但直接运行的话,没办法跑起来,我也是查了好多博客和日志,才实现最后的功能的,所以,记录下来,以备后用吧,也欢迎其他和我 ...

  8. Melodic 使用URDF创建简单的机器人模型

    本人Linux版本:Ubuntu 18.04LTS ROS版本:Melodic URDF代码 <?xml version="1.0" ?> <robot name ...

  9. 快速了解 Robot Operating System(ROS) 机器人操作系统

     http://www.ros.org/ 关于ROS About ROS http://www.ros.org/about-ros/ 机器人操作系统(ROS)是用于编写机器人软件的灵活框架.目的在简化 ...

随机推荐

  1. sql日期操作

    日期格式化函数 ), ): :57AM ), ): ), ): ), ): ), ): ), ): ), ): ), ): , ), ): :: ), ): :::827AM ), ): ), ): ...

  2. [转]Eclipse快捷键 10个最有用的快捷键

    Eclipse快捷键 10个最有用的快捷键 5 4 Eclipse中10个最有用的快捷键组合  一个Eclipse骨灰级开发者总结了他认为最有用但又不太为人所知的快捷键组合.通过这些组合可以更加容易的 ...

  3. paramiko 实现ssh登录和sftp登录

    简单ssh登录 import paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddP ...

  4. Git的一些东西(后续补充)

    查看帮助,要装git-doc,另外推荐git的图形客户端gitg,比gitk好看多了,用apt-get install就可   HEAD是当前工作版本的指针   --global保存的是当前用户的配置 ...

  5. System.Threading.Timer

    GLog.WLog("_thdTimer before"); _thdTimer = new System.Threading.Timer(new TimerCallback(Ti ...

  6. Tomcat默认工具manager管理页面访问配置

    Tomcat的默认工具manager配置,在很多的生产环境中由于基本用不到.或者是不太需要使用Tomcat默认的manager管理页面时一般都会把Tomcat的默认webapp下的内容给删除了,但是如 ...

  7. axios 上传图片

    let data = new FormData(); for (var i = 0; i < files.length; i++) { let file = files.item(i); dat ...

  8. win10和ubuntu16.04双系统时间同步

    在win10安装了ubuntu双系统,发现在两个系统见时间相差8个小时,这是由于windows和和ubuntu对于从主板取得时间后的处理方式不同,如果你把位置设为上海,ubuntu总是把主板时间当作u ...

  9. mac nginx 一些资料

    http://www.jianshu.com/p/918eb337a206 mac 的nginx 配置目录在/usr/local/etc/nginx 安装之前最好执行brew的update和upgra ...

  10. mysql 5.6 binlog组提交实现原理(转载)

    http://blog.itpub.net/15480802/viewspace-1411356/ Redo组提交 Redo提交流程大致如下 lock log->mutex write redo ...