Robot Operating System (ROS)学习笔记---创建简单的机器人模型smartcar
搭建环境:XMWare Ubuntu14.04 ROS(indigo)
转载自古月居 转载连接:http://www.guyuehome.com/243
一、创建硬件描述包
- 已创建catkin_ws
- 打开终端(Ctrl + Alt + T)输入:cd ~/catkin_ws/src
- 输入:catkin_create_pkg smartcar_description urdf (indigo版)
二、智能车尺寸数据
三、建立urdf文件
- 在smartcar_description文件夹下创建urdf文件:先定位到smartcar_description(cd ~/catkin_ws/src/smartcar_description),然后输入:mkdir urdf //创建urdf文件夹
- 定位到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的更多相关文章
- Robot Operating System (ROS)学习笔记2---使用smartcar进行仿真
搭建环境:XMWare Ubuntu14.04 ROS(indigo) 转载自古月居 转载连接:http://www.guyuehome.com/248 一.模型完善 文件夹urdf下,创建ga ...
- Robot Operating System (ROS)学习笔记3---键盘控制
搭建环境:XMWare Ubuntu14.04 ROS(indigo) 转载自古月居 转载连接:http://www.guyuehome.com/253 一.创建控制包 catkin_creat ...
- Robot Operating System (ROS)学习笔记4---语音控制
搭建环境:XMWare Ubuntu14.04 ROS(indigo) 转载自古月居 转载连接:http://www.guyuehome.com/260 一.语音识别包 1.安装 ...
- ROS探索总结(五)——创建简单的机器人模型smartcar
前面我们使用的是已有的机器人模型进行仿真,这一节我们将建立一个简单的智能车机器人smartcar,为后面建立复杂机器人打下基础. 一.创建硬件描述包 roscreat-pkg smartcar_de ...
- 创建简单的机器人模型smartcar
前面我们使用的是已有的机器人模型进行仿真,这一节我们将建立一个简单的智能车机器人 smartcar,为后面建立复杂机器人打下基础. 一.创建硬件描述包. cd ~/catkin_ws/srcroscr ...
- 【kinetic】操作系统探索总结(五)创建简单的机器人模型smartcar
p { margin-bottom: 0.1in; direction: ltr; line-height: 120%; text-align: justify } a:link { color: r ...
- ROS学习记录(一)————创建简单的机器人模型smartcar
这是我在古月居上找的(http://www.guyuehome.com/243),但直接运行的话,没办法跑起来,我也是查了好多博客和日志,才实现最后的功能的,所以,记录下来,以备后用吧,也欢迎其他和我 ...
- Melodic 使用URDF创建简单的机器人模型
本人Linux版本:Ubuntu 18.04LTS ROS版本:Melodic URDF代码 <?xml version="1.0" ?> <robot name ...
- 快速了解 Robot Operating System(ROS) 机器人操作系统
http://www.ros.org/ 关于ROS About ROS http://www.ros.org/about-ros/ 机器人操作系统(ROS)是用于编写机器人软件的灵活框架.目的在简化 ...
随机推荐
- B.A.T.M.A.N
参考: http://wiki.openwrt.org/doc/howto/mesh.batman?s[]=batmand The Better Approach To Mobile Adhoc Ne ...
- Vivado HLS初识---阅读《vivado design suite tutorial-high-level synthesis》(3)
Vivado HLS初识---阅读<vivado design suite tutorial-high-level synthesis>(3) 优化lab1 1.创建工程,开启HLS 运行 ...
- C#发布程序添加其他程序文件
注:程序发布文件,默认只发布自身程序直接引用的相关文件(A程序). 如果需要添加其他程序(不同的应用程序B)文件,操作方法如下: 第一步:将B程序文件复制到A程序 第二步:将B程序文件右键--> ...
- VS2017 远程调试linux(centos).net core
第一步建立链接 Tools > Options > Cross Platform > Connection Manage 工具>选项>跨平台>连接管理器 第二步骤 ...
- Dubbo的原理以及详细原理、配置
Dubbo的背景 随着互联网的发展,网站应用的规模不断扩大,常规的垂直应用架构已无法应对,分布式服务架构以及流动计算架构势在必行,亟需一个治理系统确保架构有条不紊的演进. Dubbo的应用 用于大规模 ...
- Scala传名参数(By-Name)
1.=> 在了解Scala的By-Name参数之前,先了解下“=>”在Scala中有几种用法: 1.对于值,“=>”相当于lambda表达式.如: scala> List(,, ...
- Java学习——包及可见性
1.在同一个类中:创建的对象,不管成员的可见修饰符可以直接调用. package studentpackage; public class Student { public long id; prot ...
- Ajax的课外了解
Ajax传入的数据的话,只能是字符串或数字,字段,其他形式的传参都不可以: Ajax只是跟后台交互也有同源策略的限制: 不是当前服务器叫跨域: Ajax也有同源策略的限制想做跨域处理,只能通过scri ...
- centos6.9发送邮件功能
centos6.9发送邮件功能 第一个里程碑 测试发邮件的功能 系统环境centos 6.9 #配置发邮件 /etc/mail.rc中追加 set bsdcompat set fr ...
- PG cannot execute UPDATE in a read-only transaction | How to add column if not exists on PostgreSQL
PG cannot execute UPDATE in a read-only transaction出现这种情况时,说明SQL语句可能是运行在一个PG集群中的非master节点上.查看data/pg ...