码迷,mamicode.com
首页 > 其他好文 > 详细

ROS-URDF-Gazebo

时间:2019-01-30 00:13:43      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:.com   world   生成   Nging   文件的   cat   mod   ram   value   

前言:在gazebo里运行urdf文件

一、安装教程包

cd ~/catkin_test/src
git clone https://github.com/ros/urdf_sim_tutorial.git

编译

二、运行launch文件

roslaunch urdf_sim_tutorial gazebo.launch 

-----------------------------------------------

解析:

<launch>

  <!-- these are the arguments you can pass this launch file, for example paused:=true 
这些是你能设定的launch文件的参数 -->
  <arg name="paused" default="false"/>
  <arg name="use_sim_time" default="true"/>
  <arg name="gui" default="true"/>
  <arg name="headless" default="false"/>
  <arg name="debug" default="false"/>
  <arg name="model" default="$(find urdf_tutorial)/urdf/08-macroed.urdf.xacro"/>

  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched
我们设定了launch文件的逻辑,只改变了被运行的世界
--> <include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="debug" value="$(arg debug)" /> <arg name="gui" value="$(arg gui)" /> <arg name="paused" value="$(arg paused)"/> <arg name="use_sim_time" value="$(arg use_sim_time)"/> <arg name="headless" value="$(arg headless)"/> </include> <param name="robot_description" command="$(find xacro)/xacro.py $(arg model)" /> <!-- push robot_description to factory and spawn robot in gazebo
加载urdf文件,并且在gazebo里生成机器人
--> <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" args="-z 1.0 -unpause -urdf -model robot -param robot_description" respawn="false" output="screen" /> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"> <param name="publish_frequency" type="double" value="30.0" /> </node> </launch>

---------------------------

未启动,未完待续。

 

 

 

 

-END-

ROS-URDF-Gazebo

标签:.com   world   生成   Nging   文件的   cat   mod   ram   value   

原文地址:https://www.cnblogs.com/chendeqiang/p/10336299.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!