ROS_Kinetic_29 kamtoa simulation学习与示例分析(一)

前端之家收集整理的这篇文章主要介绍了ROS_Kinetic_29 kamtoa simulation学习与示例分析(一)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

致谢源代码网址:https://github.com/Tutorgaming/kamtoa-simulation

kamtoa simulation学习与示例分析(一)





源码学习与分析是学习ROS,包括RVIZ和Gazebo等必须的过程,大量代码的阅读能够提高加快理解熟练使用ROS Kinetic。

首先,先看文件组织:


一般README中有详细的使用说明,包括安装,使用和示例教程。

CMakeLists.txt:

  1. # toplevel CMakeLists.txt for a catkin workspace
  2. # catkin/cmake/toplevel.cmake
  3.  
  4. cmake_minimum_required(VERSION 2.8.3)
  5.  
  6. set(CATKIN_TOPLEVEL TRUE)
  7.  
  8. # search for catkin within the workspace
  9. set(_cmd "catkin_find_pkg" "catkin" "${CMAKE_SOURCE_DIR}")
  10. execute_process(COMMAND ${_cmd}
  11. RESULT_VARIABLE _res
  12. OUTPUT_VARIABLE _out
  13. ERROR_VARIABLE _err
  14. OUTPUT_STRIP_TRAILING_WHITESPACE
  15. ERROR_STRIP_TRAILING_WHITESPACE
  16. )
  17. if(NOT _res EQUAL 0 AND NOT _res EQUAL 2)
  18. # searching fot catkin resulted in an error
  19. string(REPLACE ";" " " _cmd_str "${_cmd}")
  20. message(FATAL_ERROR "Search for 'catkin' in workspace Failed (${_cmd_str}): ${_err}")
  21. endif()
  22.  
  23. # include catkin from workspace or via find_package()
  24. if(_res EQUAL 0)
  25. set(catkin_EXTRAS_DIR "${CMAKE_SOURCE_DIR}/${_out}/cmake")
  26. # include all.cmake without add_subdirectory to let it operate in same scope
  27. include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE)
  28. add_subdirectory("${_out}")
  29.  
  30. else()
  31. # use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument
  32. # or CMAKE_PREFIX_PATH from the environment
  33. if(NOT DEFINED CMAKE_PREFIX_PATH)
  34. if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "")
  35. string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
  36. endif()
  37. endif()
  38.  
  39. # list of catkin workspaces
  40. set(catkin_search_path "")
  41. foreach(path ${CMAKE_PREFIX_PATH})
  42. if(EXISTS "${path}/.catkin")
  43. list(FIND catkin_search_path ${path} _index)
  44. if(_index EQUAL -1)
  45. list(APPEND catkin_search_path ${path})
  46. endif()
  47. endif()
  48. endforeach()
  49.  
  50. # search for catkin in all workspaces
  51. set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE)
  52. find_package(catkin QUIET
  53. NO_POLICY_SCOPE
  54. PATHS ${catkin_search_path}
  55. NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
  56. unset(CATKIN_TOPLEVEL_FIND_PACKAGE)
  57.  
  58. if(NOT catkin_FOUND)
  59. message(FATAL_ERROR "find_package(catkin) Failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.")
  60. endif()
  61. endif()
  62.  
  63. catkin_workspace()

这里,先看kamtoa_gazebo文件夹下:


CMakeLists.txt中包含需要的功能包,如下截取部分代码片段:

  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(kamtoa_gazebo)
  3.  
  4. ## Find catkin macros and libraries
  5. ## if COMPONENTS list like find_package(catkin required COMPONENTS xyz)
  6. ## is used,also find other catkin packages
  7. find_package(catkin required COMPONENTS
  8. gazebo_msgs
  9. gazebo_plugins
  10. gazebo_ros
  11. gazebo_ros_control
  12. kamtoa_description
  13. )
  14.  
  15. ## System dependencies are found with CMake's conventions
  16. # find_package(Boost required COMPONENTS system)
  17.  
需要的功能如果不全,可以使用sudo apt-get install ros-kinetic-gazebo-msgs,以类似方式安装(catkin)。当然编译需要对应的功能包,运行也需要,这里缺一不可,请看package.xml:

  1. <?xml version="1.0"?>
  2. <package>
  3. <name>kamtoa_gazebo</name>
  4. <version>0.0.0</version>
  5. <description>The kamtoa_gazebo package</description>
  6.  
  7. <!-- One maintainer tag required,multiple allowed,one person per tag -->
  8. <!-- Example: -->
  9. <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
  10. <maintainer email="c3mx@todo.todo">c3mx</maintainer>
  11.  
  12.  
  13. <!-- One license tag required,one license per tag -->
  14. <!-- Commonly used license strings: -->
  15. <!-- BSD,MIT,Boost Software License,GPLv2,GPLv3,LGPLv2.1,LGPLv3 -->
  16. <license>TODO</license>
  17.  
  18.  
  19. <!-- Url tags are optional,but mutiple are allowed,one per tag -->
  20. <!-- Optional attribute type can be: website,bugtracker,or repository -->
  21. <!-- Example: -->
  22. <!-- <url type="website">http://wiki.ros.org/kamtoa_gazebo</url> -->
  23.  
  24.  
  25. <!-- Author tags are optional,mutiple are allowed,one per tag -->
  26. <!-- Authors do not have to be maintianers,but could be -->
  27. <!-- Example: -->
  28. <!-- <author email="jane.doe@example.com">Jane Doe</author> -->
  29.  
  30.  
  31. <!-- The *_depend tags are used to specify dependencies -->
  32. <!-- Dependencies can be catkin packages or system dependencies -->
  33. <!-- Examples: -->
  34. <!-- Use build_depend for packages you need at compile time: -->
  35. <!-- <build_depend>message_generation</build_depend> -->
  36. <!-- Use buildtool_depend for build tool packages: -->
  37. <!-- <buildtool_depend>catkin</buildtool_depend> -->
  38. <!-- Use run_depend for packages you need at runtime: -->
  39. <!-- <run_depend>message_runtime</run_depend> -->
  40. <!-- Use test_depend for packages you need only for testing: -->
  41. <!-- <test_depend>gtest</test_depend> -->
  42. <buildtool_depend>catkin</buildtool_depend>
  43. <build_depend>gazebo_msgs</build_depend>
  44. <build_depend>gazebo_plugins</build_depend>
  45. <build_depend>gazebo_ros</build_depend>
  46. <build_depend>gazebo_ros_control</build_depend>
  47. <build_depend>kamtoa_description</build_depend>
  48. <run_depend>gazebo_msgs</run_depend>
  49. <run_depend>gazebo_plugins</run_depend>
  50. <run_depend>gazebo_ros</run_depend>
  51. <run_depend>gazebo_ros_control</run_depend>
  52. <run_depend>kamtoa_description</run_depend>
  53.  
  54.  
  55. <!-- The export tag contains other,unspecified,tags -->
  56. <export>
  57. <!-- Other tools can request additional information be placed here -->
  58.  
  59. </export>
  60. </package>

注意这里的<build_depend>和<run_depend>,分别对应编译和运行, 有时编译没有问题,运行却报错,请务必注意。

world文件夹下存放gazebo模型,打开可以看到:


building1.world和whiz_ex.world,具体解析可以参考博客中GazeboSim内容,具体的模型文件为sdf 1.6对应Gazebo7,以whiz_ex_window为例,分为model.config和model.sdf如下:

model.sdf:

  1. <?xml version='1.0'?>
  2. <sdf version='1.6'>
  3. <model name='whiz_ex_window'>
  4. <pose frame=''>0.232213 1.38881 0 0 -0 0</pose>
  5. <link name='Door_6'>
  6. <collision name='Door_6_Collision'>
  7. <geometry>
  8. <Box>
  9. <size>0.9 0.17 2</size>
  10. </Box>
  11. </geometry>
  12. <pose frame=''>0 0 1 0 -0 0</pose>
  13. </collision>
  14. <visual name='Door_6_Visual'>
  15. <pose frame=''>0 0 1 0 -0 0</pose>
  16. <geometry>
  17. <Box>
  18. <size>0.9 0.17 2</size>
  19. </Box>
  20. </geometry>
  21. <material>
  22. <script>
  23. <uri>file://media/materials/scripts/gazebo.material</uri>
  24. <name>Gazebo/Grey</name>
  25. </script>
  26. </material>
  27. </visual>
  28. <pose frame=''>0.29567 1.0429 0 0 0 -3.12055</pose>
  29. </link>
  30. <link name='Door_7'>
  31. <collision name='Door_7_Collision'>
  32. <geometry>
  33. <Box>
  34. <size>0.949838 0.2 2</size>
  35. </Box>
  36. </geometry>
  37. <pose frame=''>0 0 1 0 -0 0</pose>
  38. </collision>
  39. <visual name='Door_7_Visual'>
  40. <pose frame=''>0 0 1 0 -0 0</pose>
  41. <geometry>
  42. <Box>
  43. <size>0.949838 0.2 2</size>
  44. </Box>
  45. </geometry>
  46. <material>
  47. <script>
  48. <uri>file://media/materials/scripts/gazebo.material</uri>
  49. <name>Gazebo/Grey</name>
  50. </script>
  51. </material>
  52. </visual>
  53. <pose frame=''>-0.776238 1.0429 0 0 -0 3.14159</pose>
  54. </link>
  55. <link name='Door_8'>
  56. <collision name='Door_8_Collision'>
  57. <geometry>
  58. <Box>
  59. <size>0.9 0.17 2</size>
  60. </Box>
  61. </geometry>
  62. <pose frame=''>0 0 1 0 -0 0</pose>
  63. </collision>
  64. <visual name='Door_8_Visual'>
  65. <pose frame=''>0 0 1 0 -0 0</pose>
  66. <geometry>
  67. <Box>
  68. <size>0.9 0.17 2</size>
  69. </Box>
  70. </geometry>
  71. <material>
  72. <script>
  73. <uri>file://media/materials/scripts/gazebo.material</uri>
  74. <name>Gazebo/Grey</name>
  75. </script>
  76. </material>
  77. </visual>
  78. <pose frame=''>-4.14363 1.09228 0 0 -0 0</pose>
  79. </link>
  80. <link name='Door_9'>
  81. <collision name='Door_9_Collision'>
  82. <geometry>
  83. <Box>
  84. <size>0.9 0.17 2</size>
  85. </Box>
  86. </geometry>
  87. <pose frame=''>0 0 1 0 -0 0</pose>
  88. </collision>
  89. <visual name='Door_9_Visual'>
  90. <pose frame=''>0 0 1 0 -0 0</pose>
  91. <geometry>
  92. <Box>
  93. <size>0.9 0.17 2</size>
  94. </Box>
  95. </geometry>
  96. <material>
  97. <script>
  98. <uri>file://media/materials/scripts/gazebo.material</uri>
  99. <name>Gazebo/Grey</name>
  100. </script>
  101. </material>
  102. </visual>
  103. <pose frame=''>-1.75347 -0.819856 0 0 0 -3.12358</pose>
  104. </link>
  105. <link name='Wall_0'>
  106. <pose frame=''>-1.6817 -3.67821 0 0 -0 0</pose>
  107. <visual name='Wall_0_Visual_0'>
  108. <pose frame=''>-1.17971 0 1.25 0 -0 0</pose>
  109. <geometry>
  110. <Box>
  111. <size>5.89059 0.15 2.5</size>
  112. </Box>
  113. </geometry>
  114. <material>
  115. <script>
  116. <uri>file://media/materials/scripts/gazebo.material</uri>
  117. <name>Gazebo/Grey</name>
  118. </script>
  119. <ambient>1 1 1 1</ambient>
  120. </material>
  121. </visual>
  122. <collision name='Wall_0_Collision_0'>
  123. <geometry>
  124. <Box>
  125. <size>5.89059 0.15 2.5</size>
  126. </Box>
  127. </geometry>
  128. <pose frame=''>-1.17971 0 1.25 0 -0 0</pose>
  129. </collision>
  130. <visual name='Wall_0_Visual_1'>
  131. <pose frame=''>3.9453 0 1.25 0 -0 0</pose>
  132. <geometry>
  133. <Box>
  134. <size>0.35941 0.15 2.5</size>
  135. </Box>
  136. </geometry>
  137. <material>
  138. <script>
  139. <uri>file://media/materials/scripts/gazebo.material</uri>
  140. <name>Gazebo/Grey</name>
  141. </script>
  142. <ambient>1 1 1 1</ambient>
  143. </material>
  144. </visual>
  145. <collision name='Wall_0_Collision_1'>
  146. <geometry>
  147. <Box>
  148. <size>0.35941 0.15 2.5</size>
  149. </Box>
  150. </geometry>
  151. <pose frame=''>3.9453 0 1.25 0 -0 0</pose>
  152. </collision>
  153. <visual name='Wall_0_Visual_2'>
  154. <pose frame=''>2.76559 0 0 0 -0 0</pose>
  155. <geometry>
  156. <Box>
  157. <size>2 0.15 0</size>
  158. </Box>
  159. </geometry>
  160. <material>
  161. <script>
  162. <uri>file://media/materials/scripts/gazebo.material</uri>
  163. <name>Gazebo/Grey</name>
  164. </script>
  165. <ambient>1 1 1 1</ambient>
  166. </material>
  167. </visual>
  168. <collision name='Wall_0_Collision_2'>
  169. <geometry>
  170. <Box>
  171. <size>2 0.15 0</size>
  172. </Box>
  173. </geometry>
  174. <pose frame=''>2.76559 0 0 0 -0 0</pose>
  175. </collision>
  176. <visual name='Wall_0_Visual_3'>
  177. <pose frame=''>2.76559 0 2.45 0 -0 0</pose>
  178. <geometry>
  179. <Box>
  180. <size>2 0.15 0.1</size>
  181. </Box>
  182. </geometry>
  183. <material>
  184. <script>
  185. <uri>file://media/materials/scripts/gazebo.material</uri>
  186. <name>Gazebo/Grey</name>
  187. </script>
  188. <ambient>1 1 1 1</ambient>
  189. </material>
  190. </visual>
  191. <collision name='Wall_0_Collision_3'>
  192. <geometry>
  193. <Box>
  194. <size>2 0.15 0.1</size>
  195. </Box>
  196. </geometry>
  197. <pose frame=''>2.76559 0 2.45 0 -0 0</pose>
  198. </collision>
  199. </link>
  200. <link name='Wall_1'>
  201. <collision name='Wall_1_Collision'>
  202. <geometry>
  203. <Box>
  204. <size>3.75 0.15 2.5</size>
  205. </Box>
  206. </geometry>
  207. <pose frame=''>0 0 1.25 0 -0 0</pose>
  208. </collision>
  209. <visual name='Wall_1_Visual'>
  210. <pose frame=''>0 0 1.25 0 -0 0</pose>
  211. <geometry>
  212. <Box>
  213. <size>3.75 0.15 2.5</size>
  214. </Box>
  215. </geometry>
  216. <material>
  217. <script>
  218. <uri>file://media/materials/scripts/gazebo.material</uri>
  219. <name>Gazebo/Grey</name>
  220. </script>
  221. <ambient>1 1 1 1</ambient>
  222. </material>
  223. </visual>
  224. <pose frame=''>2.3683 -1.87821 0 0 -0 1.5708</pose>
  225. </link>
  226. <link name='Wall_13'>
  227. <collision name='Wall_13_Collision'>
  228. <geometry>
  229. <Box>
  230. <size>9.25 0.15 2.5</size>
  231. </Box>
  232. </geometry>
  233. <pose frame=''>0 0 1.25 0 -0 0</pose>
  234. </collision>
  235. <visual name='Wall_13_Visual'>
  236. <pose frame=''>0 0 1.25 0 -0 0</pose>
  237. <geometry>
  238. <Box>
  239. <size>9.25 0.15 2.5</size>
  240. </Box>
  241. </geometry>
  242. <material>
  243. <script>
  244. <uri>file://media/materials/scripts/gazebo.material</uri>
  245. <name>Gazebo/Grey</name>
  246. </script>
  247. <ambient>1 1 1 1</ambient>
  248. </material>
  249. </visual>
  250. <pose frame=''>-1.19255 3.74668 0 0 -0 3.14159</pose>
  251. </link>
  252. <link name='Wall_15'>
  253. <pose frame=''>-4.65794 2.07148 0 0 0 -1.5708</pose>
  254. <visual name='Wall_15_Visual_0'>
  255. <pose frame=''>-1.67569 0 1.25 0 -0 0</pose>
  256. <geometry>
  257. <Box>
  258. <size>0.148611 0.15 2.5</size>
  259. </Box>
  260. </geometry>
  261. <material>
  262. <script>
  263. <uri>file://media/materials/scripts/gazebo.material</uri>
  264. <name>Gazebo/Grey</name>
  265. </script>
  266. <ambient>1 1 1 1</ambient>
  267. </material>
  268. </visual>
  269. <collision name='Wall_15_Collision_0'>
  270. <geometry>
  271. <Box>
  272. <size>0.148611 0.15 2.5</size>
  273. </Box>
  274. </geometry>
  275. <pose frame=''>-1.67569 0 1.25 0 -0 0</pose>
  276. </collision>
  277. <visual name='Wall_15_Visual_1'>
  278. <pose frame=''>1.07431 0 1.25 0 -0 0</pose>
  279. <geometry>
  280. <Box>
  281. <size>1.35139 0.15 2.5</size>
  282. </Box>
  283. </geometry>
  284. <material>
  285. <script>
  286. <uri>file://media/materials/scripts/gazebo.material</uri>
  287. <name>Gazebo/Grey</name>
  288. </script>
  289. <ambient>1 1 1 1</ambient>
  290. </material>
  291. </visual>
  292. <collision name='Wall_15_Collision_1'>
  293. <geometry>
  294. <Box>
  295. <size>1.35139 0.15 2.5</size>
  296. </Box>
  297. </geometry>
  298. <pose frame=''>1.07431 0 1.25 0 -0 0</pose>
  299. </collision>
  300. <visual name='Wall_15_Visual_2'>
  301. <pose frame=''>-0.601389 0 2.4 0 -0 0</pose>
  302. <geometry>
  303. <Box>
  304. <size>2 0.15 0.2</size>
  305. </Box>
  306. </geometry>
  307. <material>
  308. <script>
  309. <uri>file://media/materials/scripts/gazebo.material</uri>
  310. <name>Gazebo/Grey</name>
  311. </script>
  312. <ambient>1 1 1 1</ambient>
  313. </material>
  314. </visual>
  315. <collision name='Wall_15_Collision_2'>
  316. <geometry>
  317. <Box>
  318. <size>2 0.15 0.2</size>
  319. </Box>
  320. </geometry>
  321. <pose frame=''>-0.601389 0 2.4 0 -0 0</pose>
  322. </collision>
  323. </link>
  324. <link name='Wall_16'>
  325. <collision name='Wall_16_Collision'>
  326. <geometry>
  327. <Box>
  328. <size>1.25 0.15 2.5</size>
  329. </Box>
  330. </geometry>
  331. <pose frame=''>0 0 1.25 0 -0 0</pose>
  332. </collision>
  333. <visual name='Wall_16_Visual'>
  334. <pose frame=''>0 0 1.25 0 -0 0</pose>
  335. <geometry>
  336. <Box>
  337. <size>1.25 0.15 2.5</size>
  338. </Box>
  339. </geometry>
  340. <material>
  341. <script>
  342. <uri>file://media/materials/scripts/gazebo.material</uri>
  343. <name>Gazebo/Grey</name>
  344. </script>
  345. <ambient>1 1 1 1</ambient>
  346. </material>
  347. </visual>
  348. <pose frame=''>-5.20794 0.396477 0 0 -0 3.14159</pose>
  349. </link>
  350. <link name='Wall_17'>
  351. <pose frame=''>-5.75794 -1.65352 0 0 0 -1.5708</pose>
  352. <visual name='Wall_17_Visual_0'>
  353. <pose frame=''>-1.07794 0 1.25 0 -0 0</pose>
  354. <geometry>
  355. <Box>
  356. <size>2.09412 0.15 2.5</size>
  357. </Box>
  358. </geometry>
  359. <material>
  360. <script>
  361. <uri>file://media/materials/scripts/gazebo.material</uri>
  362. <name>Gazebo/Grey</name>
  363. </script>
  364. <ambient>1 1 1 1</ambient>
  365. </material>
  366. </visual>
  367. <collision name='Wall_17_Collision_0'>
  368. <geometry>
  369. <Box>
  370. <size>2.09412 0.15 2.5</size>
  371. </Box>
  372. </geometry>
  373. <pose frame=''>-1.07794 0 1.25 0 -0 0</pose>
  374. </collision>
  375. <visual name='Wall_17_Visual_1'>
  376. <pose frame=''>1.04706 0 0.25 0 -0 0</pose>
  377. <geometry>
  378. <Box>
  379. <size>2.15588 0.15 0.5</size>
  380. </Box>
  381. </geometry>
  382. <material>
  383. <script>
  384. <uri>file://media/materials/scripts/gazebo.material</uri>
  385. <name>Gazebo/Grey</name>
  386. </script>
  387. <ambient>1 1 1 1</ambient>
  388. </material>
  389. </visual>
  390. <collision name='Wall_17_Collision_1'>
  391. <geometry>
  392. <Box>
  393. <size>2.15588 0.15 0.5</size>
  394. </Box>
  395. </geometry>
  396. <pose frame=''>1.04706 0 0.25 0 -0 0</pose>
  397. </collision>
  398. <visual name='Wall_17_Visual_2'>
  399. <pose frame=''>2.01762 0 1.5 0 -0 0</pose>
  400. <geometry>
  401. <Box>
  402. <size>0.214766 0.15 2</size>
  403. </Box>
  404. </geometry>
  405. <material>
  406. <script>
  407. <uri>file://media/materials/scripts/gazebo.material</uri>
  408. <name>Gazebo/Grey</name>
  409. </script>
  410. <ambient>1 1 1 1</ambient>
  411. </material>
  412. </visual>
  413. <collision name='Wall_17_Collision_2'>
  414. <geometry>
  415. <Box>
  416. <size>0.214766 0.15 2</size>
  417. </Box>
  418. </geometry>
  419. <pose frame=''>2.01762 0 1.5 0 -0 0</pose>
  420. </collision>
  421. <visual name='Wall_17_Visual_3'>
  422. <pose frame=''>0.939679 0 1.9 0 -0 0</pose>
  423. <geometry>
  424. <Box>
  425. <size>1.94111 0.15 1.2</size>
  426. </Box>
  427. </geometry>
  428. <material>
  429. <script>
  430. <uri>file://media/materials/scripts/gazebo.material</uri>
  431. <name>Gazebo/Grey</name>
  432. </script>
  433. <ambient>1 1 1 1</ambient>
  434. </material>
  435. </visual>
  436. <collision name='Wall_17_Collision_3'>
  437. <geometry>
  438. <Box>
  439. <size>1.94111 0.15 1.2</size>
  440. </Box>
  441. </geometry>
  442. <pose frame=''>0.939679 0 1.9 0 -0 0</pose>
  443. </collision>
  444. </link>
  445. <link name='Wall_19'>
  446. <collision name='Wall_19_Collision'>
  447. <geometry>
  448. <Box>
  449. <size>2.5 0.15 2.5</size>
  450. </Box>
  451. </geometry>
  452. <pose frame=''>0 0 1.25 0 -0 0</pose>
  453. </collision>
  454. <visual name='Wall_19_Visual'>
  455. <pose frame=''>0 0 1.25 0 -0 0</pose>
  456. <geometry>
  457. <Box>
  458. <size>2.5 0.15 2.5</size>
  459. </Box>
  460. </geometry>
  461. <material>
  462. <script>
  463. <uri>file://media/materials/scripts/gazebo.material</uri>
  464. <name>Gazebo/Grey</name>
  465. </script>
  466. <ambient>1 1 1 1</ambient>
  467. </material>
  468. </visual>
  469. <pose frame=''>-2.53404 1.06604 0 0 -0 0</pose>
  470. </link>
  471. <link name='Wall_20'>
  472. <collision name='Wall_20_Collision'>
  473. <geometry>
  474. <Box>
  475. <size>2 0.15 2.5</size>
  476. </Box>
  477. </geometry>
  478. <pose frame=''>0 0 1.25 0 -0 0</pose>
  479. </collision>
  480. <visual name='Wall_20_Visual'>
  481. <pose frame=''>0 0 1.25 0 -0 0</pose>
  482. <geometry>
  483. <Box>
  484. <size>2 0.15 2.5</size>
  485. </Box>
  486. </geometry>
  487. <material>
  488. <script>
  489. <uri>file://media/materials/scripts/gazebo.material</uri>
  490. <name>Gazebo/Grey</name>
  491. </script>
  492. <ambient>1 1 1 1</ambient>
  493. </material>
  494. </visual>
  495. <pose frame=''>-1.35904 0.141035 0 0 0 -1.5708</pose>
  496. </link>
  497. <link name='Wall_21'>
  498. <collision name='Wall_21_Collision'>
  499. <geometry>
  500. <Box>
  501. <size>0.25 0.15 2.5</size>
  502. </Box>
  503. </geometry>
  504. <pose frame=''>0 0 1.25 0 -0 0</pose>
  505. </collision>
  506. <visual name='Wall_21_Visual'>
  507. <pose frame=''>0 0 1.25 0 -0 0</pose>
  508. <geometry>
  509. <Box>
  510. <size>0.25 0.15 2.5</size>
  511. </Box>
  512. </geometry>
  513. <material>
  514. <script>
  515. <uri>file://media/materials/scripts/gazebo.material</uri>
  516. <name>Gazebo/Grey</name>
  517. </script>
  518. <ambient>1 1 1 1</ambient>
  519. </material>
  520. </visual>
  521. <pose frame=''>-1.40904 -0.783965 0 0 -0 3.14159</pose>
  522. </link>
  523. <link name='Wall_23'>
  524. <collision name='Wall_23_Collision'>
  525. <geometry>
  526. <Box>
  527. <size>3.5 0.15 2.5</size>
  528. </Box>
  529. </geometry>
  530. <pose frame=''>0 0 1.25 0 -0 0</pose>
  531. </collision>
  532. <visual name='Wall_23_Visual'>
  533. <pose frame=''>0 0 1.25 0 -0 0</pose>
  534. <geometry>
  535. <Box>
  536. <size>3.5 0.15 2.5</size>
  537. </Box>
  538. </geometry>
  539. <material>
  540. <script>
  541. <uri>file://media/materials/scripts/gazebo.material</uri>
  542. <name>Gazebo/Grey</name>
  543. </script>
  544. <ambient>1 1 1 1</ambient>
  545. </material>
  546. </visual>
  547. <pose frame=''>-3.91607 -0.818528 0 0 -0 3.14159</pose>
  548. </link>
  549. <link name='Wall_24'>
  550. <collision name='Wall_24_Collision'>
  551. <geometry>
  552. <Box>
  553. <size>0.25 0.15 2.5</size>
  554. </Box>
  555. </geometry>
  556. <pose frame=''>0 0 1.25 0 -0 0</pose>
  557. </collision>
  558. <visual name='Wall_24_Visual'>
  559. <pose frame=''>0 0 1.25 0 -0 0</pose>
  560. <geometry>
  561. <Box>
  562. <size>0.25 0.15 2.5</size>
  563. </Box>
  564. </geometry>
  565. <material>
  566. <script>
  567. <uri>file://media/materials/scripts/gazebo.material</uri>
  568. <name>Gazebo/Grey</name>
  569. </script>
  570. <ambient>1 1 1 1</ambient>
  571. </material>
  572. </visual>
  573. <pose frame=''>-5.64107 -0.818528 0 0 -0 3.14159</pose>
  574. </link>
  575. <link name='Wall_26'>
  576. <collision name='Wall_26_Collision'>
  577. <geometry>
  578. <Box>
  579. <size>2 0.15 2.5</size>
  580. </Box>
  581. </geometry>
  582. <pose frame=''>0 0 1.25 0 -0 0</pose>
  583. </collision>
  584. <visual name='Wall_26_Visual'>
  585. <pose frame=''>0 0 1.25 0 -0 0</pose>
  586. <geometry>
  587. <Box>
  588. <size>2 0.15 2.5</size>
  589. </Box>
  590. </geometry>
  591. <material>
  592. <script>
  593. <uri>file://media/materials/scripts/gazebo.material</uri>
  594. <name>Gazebo/Grey</name>
  595. </script>
  596. <ambient>1 1 1 1</ambient>
  597. </material>
  598. </visual>
  599. <pose frame=''>-3.31229 0.121197 0 0 0 -1.5708</pose>
  600. </link>
  601. <link name='Wall_28'>
  602. <collision name='Wall_28_Collision'>
  603. <geometry>
  604. <Box>
  605. <size>1.75 0.15 2.5</size>
  606. </Box>
  607. </geometry>
  608. <pose frame=''>0 0 1.25 0 -0 0</pose>
  609. </collision>
  610. <visual name='Wall_28_Visual'>
  611. <pose frame=''>0 0 1.25 0 -0 0</pose>
  612. <geometry>
  613. <Box>
  614. <size>1.75 0.15 2.5</size>
  615. </Box>
  616. </geometry>
  617. <material>
  618. <script>
  619. <uri>file://media/materials/scripts/gazebo.material</uri>
  620. <name>Gazebo/Grey</name>
  621. </script>
  622. <ambient>1 1 1 1</ambient>
  623. </material>
  624. </visual>
  625. <pose frame=''>-1.86043 2.95447 0 0 0 -1.5708</pose>
  626. </link>
  627. <link name='Wall_30'>
  628. <collision name='Wall_30_Collision'>
  629. <geometry>
  630. <Box>
  631. <size>0.75 0.15 2.5</size>
  632. </Box>
  633. </geometry>
  634. <pose frame=''>0 0 1.25 0 -0 0</pose>
  635. </collision>
  636. <visual name='Wall_30_Visual'>
  637. <pose frame=''>0 0 1.25 0 -0 0</pose>
  638. <geometry>
  639. <Box>
  640. <size>0.75 0.15 2.5</size>
  641. </Box>
  642. </geometry>
  643. <material>
  644. <script>
  645. <uri>file://media/materials/scripts/gazebo.material</uri>
  646. <name>Gazebo/Grey</name>
  647. </script>
  648. <ambient>1 1 1 1</ambient>
  649. </material>
  650. </visual>
  651. <pose frame=''>-1.56043 2.15447 0 0 -0 0</pose>
  652. </link>
  653. <link name='Wall_32'>
  654. <collision name='Wall_32_Collision'>
  655. <geometry>
  656. <Box>
  657. <size>2.75 0.15 2.5</size>
  658. </Box>
  659. </geometry>
  660. <pose frame=''>0 0 1.25 0 -0 0</pose>
  661. </collision>
  662. <visual name='Wall_32_Visual'>
  663. <pose frame=''>0 0 1.25 0 -0 0</pose>
  664. <geometry>
  665. <Box>
  666. <size>2.75 0.15 2.5</size>
  667. </Box>
  668. </geometry>
  669. <material>
  670. <script>
  671. <uri>file://media/materials/scripts/gazebo.material</uri>
  672. <name>Gazebo/Grey</name>
  673. </script>
  674. <ambient>1 1 1 1</ambient>
  675. </material>
  676. </visual>
  677. <pose frame=''>-0.228595 2.39065 0 0 0 -1.5708</pose>
  678. </link>
  679. <link name='Wall_35'>
  680. <collision name='Wall_35_Collision'>
  681. <geometry>
  682. <Box>
  683. <size>2.75 0.15 2.5</size>
  684. </Box>
  685. </geometry>
  686. <pose frame=''>0 0 1.25 0 -0 0</pose>
  687. </collision>
  688. <visual name='Wall_35_Visual'>
  689. <pose frame=''>0 0 1.25 0 -0 0</pose>
  690. <geometry>
  691. <Box>
  692. <size>2.75 0.15 2.5</size>
  693. </Box>
  694. </geometry>
  695. <material>
  696. <script>
  697. <uri>file://media/materials/scripts/gazebo.material</uri>
  698. <name>Gazebo/Grey</name>
  699. </script>
  700. <ambient>1 1 1 1</ambient>
  701. </material>
  702. </visual>
  703. <pose frame=''>1.29304 2.34692 0 0 0 -1.5708</pose>
  704. </link>
  705. <link name='Wall_37'>
  706. <collision name='Wall_37_Collision'>
  707. <geometry>
  708. <Box>
  709. <size>1.5 0.15 2.5</size>
  710. </Box>
  711. </geometry>
  712. <pose frame=''>0 0 1.25 0 -0 0</pose>
  713. </collision>
  714. <visual name='Wall_37_Visual'>
  715. <pose frame=''>0 0 1.25 0 -0 0</pose>
  716. <geometry>
  717. <Box>
  718. <size>1.5 0.15 2.5</size>
  719. </Box>
  720. </geometry>
  721. <material>
  722. <script>
  723. <uri>file://media/materials/scripts/gazebo.material</uri>
  724. <name>Gazebo/Grey</name>
  725. </script>
  726. <ambient>1 1 1 1</ambient>
  727. </material>
  728. </visual>
  729. <pose frame=''>1.36463 1.03216 0 0 -0 0</pose>
  730. </link>
  731. <link name='Wall_4'>
  732. <pose frame=''>4.05869 -2.66379 0 0 -0 0</pose>
  733. <visual name='Wall_4_Visual_0'>
  734. <pose frame=''>-1.38368 0 1.25 0 -0 0</pose>
  735. <geometry>
  736. <Box>
  737. <size>0.732645 0.15 2.5</size>
  738. </Box>
  739. </geometry>
  740. <material>
  741. <script>
  742. <uri>file://media/materials/scripts/gazebo.material</uri>
  743. <name>Gazebo/Grey</name>
  744. </script>
  745. <ambient>1 1 1 1</ambient>
  746. </material>
  747. </visual>
  748. <collision name='Wall_4_Collision_0'>
  749. <geometry>
  750. <Box>
  751. <size>0.732645 0.15 2.5</size>
  752. </Box>
  753. </geometry>
  754. <pose frame=''>-1.38368 0 1.25 0 -0 0</pose>
  755. </collision>
  756. <visual name='Wall_4_Visual_1'>
  757. <pose frame=''>1.61632 0 1.25 0 -0 0</pose>
  758. <geometry>
  759. <Box>
  760. <size>0.267355 0.15 2.5</size>
  761. </Box>
  762. </geometry>
  763. <material>
  764. <script>
  765. <uri>file://media/materials/scripts/gazebo.material</uri>
  766. <name>Gazebo/Grey</name>
  767. </script>
  768. <ambient>1 1 1 1</ambient>
  769. </material>
  770. </visual>
  771. <collision name='Wall_4_Collision_1'>
  772. <geometry>
  773. <Box>
  774. <size>0.267355 0.15 2.5</size>
  775. </Box>
  776. </geometry>
  777. <pose frame=''>1.61632 0 1.25 0 -0 0</pose>
  778. </collision>
  779. <visual name='Wall_4_Visual_2'>
  780. <pose frame=''>0.232645 0 2.45 0 -0 0</pose>
  781. <geometry>
  782. <Box>
  783. <size>2.5 0.15 0.1</size>
  784. </Box>
  785. </geometry>
  786. <material>
  787. <script>
  788. <uri>file://media/materials/scripts/gazebo.material</uri>
  789. <name>Gazebo/Grey</name>
  790. </script>
  791. <ambient>1 1 1 1</ambient>
  792. </material>
  793. </visual>
  794. <collision name='Wall_4_Collision_2'>
  795. <geometry>
  796. <Box>
  797. <size>2.5 0.15 0.1</size>
  798. </Box>
  799. </geometry>
  800. <pose frame=''>0.232645 0 2.45 0 -0 0</pose>
  801. </collision>
  802. </link>
  803. <link name='Wall_41'>
  804. <collision name='Wall_41_Collision'>
  805. <geometry>
  806. <Box>
  807. <size>0.25 0.15 2.5</size>
  808. </Box>
  809. </geometry>
  810. <pose frame=''>0 0 1.25 0 -0 0</pose>
  811. </collision>
  812. <visual name='Wall_41_Visual'>
  813. <pose frame=''>0 0 1.25 0 -0 0</pose>
  814. <geometry>
  815. <Box>
  816. <size>0.25 0.15 2.5</size>
  817. </Box>
  818. </geometry>
  819. <material>
  820. <script>
  821. <uri>file://media/materials/scripts/gazebo.material</uri>
  822. <name>Gazebo/Grey</name>
  823. </script>
  824. <ambient>1 1 1 1</ambient>
  825. </material>
  826. </visual>
  827. <pose frame=''>-0.228595 1.04065 0 0 0 -1.5708</pose>
  828. </link>
  829. <link name='Wall_44'>
  830. <collision name='Wall_44_Collision'>
  831. <geometry>
  832. <Box>
  833. <size>3.75 0.15 2.5</size>
  834. </Box>
  835. </geometry>
  836. <pose frame=''>0 0 1.25 0 -0 0</pose>
  837. </collision>
  838. <visual name='Wall_44_Visual'>
  839. <pose frame=''>0 0 1.25 0 -0 0</pose>
  840. <geometry>
  841. <Box>
  842. <size>3.75 0.15 2.5</size>
  843. </Box>
  844. </geometry>
  845. <material>
  846. <script>
  847. <uri>file://media/materials/scripts/gazebo.material</uri>
  848. <name>Gazebo/Grey</name>
  849. </script>
  850. <ambient>1 1 1 1</ambient>
  851. </material>
  852. </visual>
  853. <pose frame=''>-0.233629 -1.95772 0 0 0 -1.5708</pose>
  854. </link>
  855. <link name='Wall_50'>
  856. <pose frame=''>5.74567 0.386841 0 0 0 -1.57472</pose>
  857. <visual name='Wall_50_Visual_0'>
  858. <pose frame=''>-2.83254 0 1.25 0 -0 0</pose>
  859. <geometry>
  860. <Box>
  861. <size>0.586231 0.15 2.5</size>
  862. </Box>
  863. </geometry>
  864. <material>
  865. <script>
  866. <uri>file://media/materials/scripts/gazebo.material</uri>
  867. <name>Gazebo/Grey</name>
  868. </script>
  869. <ambient>1 1 1 1</ambient>
  870. </material>
  871. </visual>
  872. <collision name='Wall_50_Collision_0'>
  873. <geometry>
  874. <Box>
  875. <size>0.586231 0.15 2.5</size>
  876. </Box>
  877. </geometry>
  878. <pose frame=''>-2.83254 0 1.25 0 -0 0</pose>
  879. </collision>
  880. <visual name='Wall_50_Visual_1'>
  881. <pose frame=''>1.30211 0 1.25 0 -0 0</pose>
  882. <geometry>
  883. <Box>
  884. <size>3.64708 0.15 2.5</size>
  885. </Box>
  886. </geometry>
  887. <material>
  888. <script>
  889. <uri>file://media/materials/scripts/gazebo.material</uri>
  890. <name>Gazebo/Grey</name>
  891. </script>
  892. <ambient>1 1 1 1</ambient>
  893. </material>
  894. </visual>
  895. <collision name='Wall_50_Collision_1'>
  896. <geometry>
  897. <Box>
  898. <size>3.64708 0.15 2.5</size>
  899. </Box>
  900. </geometry>
  901. <pose frame=''>1.30211 0 1.25 0 -0 0</pose>
  902. </collision>
  903. <visual name='Wall_50_Visual_2'>
  904. <pose frame=''>-1.53042 0 2.4 0 -0 0</pose>
  905. <geometry>
  906. <Box>
  907. <size>2.018 0.15 0.2</size>
  908. </Box>
  909. </geometry>
  910. <material>
  911. <script>
  912. <uri>file://media/materials/scripts/gazebo.material</uri>
  913. <name>Gazebo/Grey</name>
  914. </script>
  915. <ambient>1 1 1 1</ambient>
  916. </material>
  917. </visual>
  918. <collision name='Wall_50_Collision_2'>
  919. <geometry>
  920. <Box>
  921. <size>2.018 0.15 0.2</size>
  922. </Box>
  923. </geometry>
  924. <pose frame=''>-1.53042 0 2.4 0 -0 0</pose>
  925. </collision>
  926. </link>
  927. <link name='Wall_52'>
  928. <pose frame=''>4.58265 3.43747 0 0 -0 3.14159</pose>
  929. <visual name='Wall_52_Visual_0'>
  930. <pose frame=''>-0.530284 0 1.25 0 -0 0</pose>
  931. <geometry>
  932. <Box>
  933. <size>1.43943 0.15 2.5</size>
  934. </Box>
  935. </geometry>
  936. <material>
  937. <script>
  938. <uri>file://media/materials/scripts/gazebo.material</uri>
  939. <name>Gazebo/Grey</name>
  940. </script>
  941. <ambient>1 1 1 1</ambient>
  942. </material>
  943. </visual>
  944. <collision name='Wall_52_Collision_0'>
  945. <geometry>
  946. <Box>
  947. <size>1.43943 0.15 2.5</size>
  948. </Box>
  949. </geometry>
  950. <pose frame=''>-0.530284 0 1.25 0 -0 0</pose>
  951. </collision>
  952. <visual name='Wall_52_Visual_1'>
  953. <pose frame=''>1.16972 0 1.25 0 -0 0</pose>
  954. <geometry>
  955. <Box>
  956. <size>0.160568 0.15 2.5</size>
  957. </Box>
  958. </geometry>
  959. <material>
  960. <script>
  961. <uri>file://media/materials/scripts/gazebo.material</uri>
  962. <name>Gazebo/Grey</name>
  963. </script>
  964. <ambient>1 1 1 1</ambient>
  965. </material>
  966. </visual>
  967. <collision name='Wall_52_Collision_1'>
  968. <geometry>
  969. <Box>
  970. <size>0.160568 0.15 2.5</size>
  971. </Box>
  972. </geometry>
  973. <pose frame=''>1.16972 0 1.25 0 -0 0</pose>
  974. </collision>
  975. <visual name='Wall_52_Visual_2'>
  976. <pose frame=''>0.639432 0 2.25 0 -0 0</pose>
  977. <geometry>
  978. <Box>
  979. <size>0.9 0.15 0.5</size>
  980. </Box>
  981. </geometry>
  982. <material>
  983. <script>
  984. <uri>file://media/materials/scripts/gazebo.material</uri>
  985. <name>Gazebo/Grey</name>
  986. </script>
  987. <ambient>1 1 1 1</ambient>
  988. </material>
  989. </visual>
  990. <collision name='Wall_52_Collision_2'>
  991. <geometry>
  992. <Box>
  993. <size>0.9 0.15 0.5</size>
  994. </Box>
  995. </geometry>
  996. <pose frame=''>0.639432 0 2.25 0 -0 0</pose>
  997. </collision>
  998. </link>
  999. <link name='Wall_53'>
  1000. <collision name='Wall_53_Collision'>
  1001. <geometry>
  1002. <Box>
  1003. <size>0.463251 0.15 2.5</size>
  1004. </Box>
  1005. </geometry>
  1006. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1007. </collision>
  1008. <visual name='Wall_53_Visual'>
  1009. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1010. <geometry>
  1011. <Box>
  1012. <size>0.463251 0.15 2.5</size>
  1013. </Box>
  1014. </geometry>
  1015. <material>
  1016. <script>
  1017. <uri>file://media/materials/scripts/gazebo.material</uri>
  1018. <name>Gazebo/Grey</name>
  1019. </script>
  1020. <ambient>1 1 1 1</ambient>
  1021. </material>
  1022. </visual>
  1023. <pose frame=''>3.38255 3.59207 0 0 -0 1.73174</pose>
  1024. </link>
  1025. <link name='Wall_55'>
  1026. <pose frame=''>1.06733 -0.11797 0 0 -0 0.030549</pose>
  1027. <visual name='Wall_55_Visual_0'>
  1028. <pose frame=''>-1.28558 0 1.25 0 -0 0</pose>
  1029. <geometry>
  1030. <Box>
  1031. <size>0.181978 0.15 2.5</size>
  1032. </Box>
  1033. </geometry>
  1034. <material>
  1035. <script>
  1036. <uri>file://media/materials/scripts/gazebo.material</uri>
  1037. <name>Gazebo/Grey</name>
  1038. </script>
  1039. <ambient>1 1 1 1</ambient>
  1040. </material>
  1041. </visual>
  1042. <collision name='Wall_55_Collision_0'>
  1043. <geometry>
  1044. <Box>
  1045. <size>0.181978 0.15 2.5</size>
  1046. </Box>
  1047. </geometry>
  1048. <pose frame=''>-1.28558 0 1.25 0 -0 0</pose>
  1049. </collision>
  1050. <visual name='Wall_55_Visual_1'>
  1051. <pose frame=''>0.540989 0 1.25 0 -0 0</pose>
  1052. <geometry>
  1053. <Box>
  1054. <size>1.67116 0.15 2.5</size>
  1055. </Box>
  1056. </geometry>
  1057. <material>
  1058. <script>
  1059. <uri>file://media/materials/scripts/gazebo.material</uri>
  1060. <name>Gazebo/Grey</name>
  1061. </script>
  1062. <ambient>1 1 1 1</ambient>
  1063. </material>
  1064. </visual>
  1065. <collision name='Wall_55_Collision_1'>
  1066. <geometry>
  1067. <Box>
  1068. <size>1.67116 0.15 2.5</size>
  1069. </Box>
  1070. </geometry>
  1071. <pose frame=''>0.540989 0 1.25 0 -0 0</pose>
  1072. </collision>
  1073. <visual name='Wall_55_Visual_2'>
  1074. <pose frame=''>-0.744593 0 2.25 0 -0 0</pose>
  1075. <geometry>
  1076. <Box>
  1077. <size>0.9 0.15 0.5</size>
  1078. </Box>
  1079. </geometry>
  1080. <material>
  1081. <script>
  1082. <uri>file://media/materials/scripts/gazebo.material</uri>
  1083. <name>Gazebo/Grey</name>
  1084. </script>
  1085. <ambient>1 1 1 1</ambient>
  1086. </material>
  1087. </visual>
  1088. <collision name='Wall_55_Collision_2'>
  1089. <geometry>
  1090. <Box>
  1091. <size>0.9 0.15 0.5</size>
  1092. </Box>
  1093. </geometry>
  1094. <pose frame=''>-0.744593 0 2.25 0 -0 0</pose>
  1095. </collision>
  1096. </link>
  1097. <link name='Wall_57'>
  1098. <pose frame=''>-0.766361 -0.161298 0 0 -0 0.006708</pose>
  1099. <visual name='Wall_57_Visual_0'>
  1100. <pose frame=''>-0.534301 0 1.25 0 -0 0</pose>
  1101. <geometry>
  1102. <Box>
  1103. <size>0.146885 0.15 2.5</size>
  1104. </Box>
  1105. </geometry>
  1106. <material>
  1107. <script>
  1108. <uri>file://media/materials/scripts/gazebo.material</uri>
  1109. <name>Gazebo/Grey</name>
  1110. </script>
  1111. <ambient>1 1 1 1</ambient>
  1112. </material>
  1113. </visual>
  1114. <collision name='Wall_57_Collision_0'>
  1115. <geometry>
  1116. <Box>
  1117. <size>0.146885 0.15 2.5</size>
  1118. </Box>
  1119. </geometry>
  1120. <pose frame=''>-0.534301 0 1.25 0 -0 0</pose>
  1121. </collision>
  1122. <visual name='Wall_57_Visual_1'>
  1123. <pose frame=''>0.511599 0 1.25 0 -0 0</pose>
  1124. <geometry>
  1125. <Box>
  1126. <size>0.19229 0.15 2.5</size>
  1127. </Box>
  1128. </geometry>
  1129. <material>
  1130. <script>
  1131. <uri>file://media/materials/scripts/gazebo.material</uri>
  1132. <name>Gazebo/Grey</name>
  1133. </script>
  1134. <ambient>1 1 1 1</ambient>
  1135. </material>
  1136. </visual>
  1137. <collision name='Wall_57_Collision_1'>
  1138. <geometry>
  1139. <Box>
  1140. <size>0.19229 0.15 2.5</size>
  1141. </Box>
  1142. </geometry>
  1143. <pose frame=''>0.511599 0 1.25 0 -0 0</pose>
  1144. </collision>
  1145. <visual name='Wall_57_Visual_2'>
  1146. <pose frame=''>-0.022702 0 2.25 0 -0 0</pose>
  1147. <geometry>
  1148. <Box>
  1149. <size>0.876312 0.15 0.5</size>
  1150. </Box>
  1151. </geometry>
  1152. <material>
  1153. <script>
  1154. <uri>file://media/materials/scripts/gazebo.material</uri>
  1155. <name>Gazebo/Grey</name>
  1156. </script>
  1157. <ambient>1 1 1 1</ambient>
  1158. </material>
  1159. </visual>
  1160. <collision name='Wall_57_Collision_2'>
  1161. <geometry>
  1162. <Box>
  1163. <size>0.876312 0.15 0.5</size>
  1164. </Box>
  1165. </geometry>
  1166. <pose frame=''>-0.022702 0 2.25 0 -0 0</pose>
  1167. </collision>
  1168. </link>
  1169. <static>1</static>
  1170. </model>
  1171. </sdf>

主要是Gazebo仿真场景中各类物体的具体属性参数。

model.config:

  1. <?xml version="1.0" ?>
  2. <model>
  3. <name>whiz_ex_window</name>
  4. <version>1.0</version>
  5. <sdf version="1.6">model.sdf</sdf>
  6. <author>
  7. <name></name>
  8. <email></email>
  9. </author>
  10. <description></description>
  11. </model>

可以做一些署名,邮箱,说明等。

launch:


以gazebo_kamtoa.launch为例,具体说明:

  1. <?xml version="1.0"?>
  2. <!--
  3. ENTRY FILE FOR LAUNCHING FULL SIMULATION
  4. Company : Obodroid Corporation
  5. Author : Theppasith N. <theppasith@gmail.com>
  6. -->
  7.  
  8. <launch>
  9.  
  10. <!-- Parameters by Console Arguments -->
  11. <arg name="model_name" default="kamtoa_robot"/>
  12. <arg name="urdf_path" default="$(find kamtoa_description)/urdf/kamtoa_prototype/$(arg model_name).xacro"/>
  13. <arg name="world_name" default="building1.world"/>
  14.  
  15. <!-- ROBOT Description file for RVIZ and Gazebo [Globally Set]-->
  16. <param name ="robot_description" command="$(find xacro)/xacro --inorder $(arg urdf_path)" />
  17.  
  18. <!-- Initialize RVIZ for visualize sensing system -->
  19. <!-- use model from robot_description param-->
  20. <include file="$(find som_o_description)/launch/rviz_gui.launch" />
  21.  
  22. <!-- Initialize Gazebo World -->
  23. <include file="$(find kamtoa_gazebo)/launch/world.launch">
  24. <arg name="world_name" value="$(arg world_name)"/>
  25. </include>
  26.  
  27. <!-- Spawn URDF in the gazebo world -->
  28. <!-- use model from robot_description param-->
  29. <include file="$(find kamtoa_gazebo)/launch/spawner.launch">
  30. <arg name="model_name" value="$(arg model_name)"/>
  31. <!-- Param name robot_description (global) -->
  32. </include>
  33.  
  34. </launch>

分为基本参数,机器人描述(RVIZ和Gazebo),RVIZ初始化,Gazebo初始化等。这时,如果在终端运行:

  1. ~$ roslaunch kamtoa_gazebo gazebo_kamtoa.launch

可以启动roscore,rviz和gazebo如下:

  1. relaybotBox@relaybotBox-desktop:~$ roslaunch kamtoa_gazebo gazebo_kamtoa.launch ... logging to /home/relaybotBox/.ros/log/e9deba26-9786-11e6-be4d-00e0b4159b08/roslaunch-relaybotBox-desktop-5005.log
  2. Checking log directory for disk usage. This may take awhile.
  3. Press Ctrl-C to interrupt
  4. Done checking log file disk usage. Usage is <1GB.
  5.  
  6. started roslaunch server http://relaybotBox-desktop:41694/
  7.  
  8. SUMMARY
  9. ========
  10.  
  11. PARAMETERS
  12. * /robot_description: <?xml version="1....
  13. * /rosdistro: kinetic
  14. * /rosversion: 1.12.5
  15. * /use_gui: True
  16. * /use_sim_time: True
  17.  
  18. NODES
  19. /
  20. gazebo (gazebo_ros/gazebo)
  21. joint_state_publisher (joint_state_publisher/joint_state_publisher)
  22. robot_state_publisher (robot_state_publisher/state_publisher)
  23. rviz (rviz/rviz)
  24. urdf_spawner (gazebo_ros/spawn_model)
  25.  
  26. auto-starting new master
  27. process[master]: started with pid [5019]
  28. ROS_MASTER_URI=http://localhost:11311
  29.  
  30. setting /run_id to e9deba26-9786-11e6-be4d-00e0b4159b08
  31. process[rosout-1]: started with pid [5033]
  32. started core service [/rosout]
  33. process[joint_state_publisher-2]: started with pid [5046]
  34. process[robot_state_publisher-3]: started with pid [5054]
  35. process[rviz-4]: started with pid [5059]
  36. process[gazebo-5]: started with pid [5066]
  37. process[urdf_spawner-6]: started with pid [5090]
  38. spawn_model script started
  39. [INFO] [WallTime: 1477051642.645687] [0.000000] Loading model xml from ros parameter
  40. [INFO] [WallTime: 1477051642.655133] [0.000000] Waiting for service /gazebo/spawn_urdf_model
  41. [ INFO] [1477051642.933367561]: Finished loading Gazebo ROS API Plugin.
  42. [ INFO] [1477051642.935174498]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised,waiting...
  43. [INFO] [WallTime: 1477051643.878953] [0.000000] Calling service /gazebo/spawn_urdf_model
  44. [INFO] [WallTime: 1477051643.975877] [1288.802000] Spawn status: SpawnModel: Model pushed to spawn queue,but spawn service timed out waiting for model to appear in simulation under the name kamtoa_robot
  45. Warning [parser.cc:778] XML Element[visualize],child of element[link] not defined in SDF. Ignoring[visualize]. You may have an incorrect SDF file,or an sdformat version that doesn't support this element.
  46. [urdf_spawner-6] process has finished cleanly
  47. log file: /home/relaybotBox/.ros/log/e9deba26-9786-11e6-be4d-00e0b4159b08/urdf_spawner-6*.log
  48. [ INFO] [1477051645.070944164,1288.802000000]: Camera Plugin (robotNamespace = /),Info: Using the 'robotNamespace' param: '/'
  49. [ INFO] [1477051645.096626172,1288.802000000]: Camera Plugin (ns = /) <tf_prefix_>,set to ""
  50. [ INFO] [1477051645.459096731,1288.802000000]: Laser Plugin (robotNamespace = /),Info: Using the 'robotNamespace' param: '/'
  51. [ INFO] [1477051645.459748522,1288.802000000]: Starting Laser Plugin (ns = /)!
  52. [ INFO] [1477051645.476788533,1288.802000000]: Laser Plugin (ns = /) <tf_prefix_>,set to ""
  53. [ INFO] [1477051645.565133751,1288.802000000]: Starting plugin DiffDrive(ns = //)!
  54. [ INFO] [1477051645.565451828,1288.802000000]: DiffDrive(ns = //): <rosDebugLevel> = Debug
  55. [ INFO] [1477051645.568106826,1288.802000000]: DiffDrive(ns = //): <tf_prefix> =
  56. [DEBUG] [1477051645.568619326,1288.802000000]: DiffDrive(ns = //): <commandTopic> = cmd_vel
  57. [DEBUG] [1477051645.568724979,1288.802000000]: DiffDrive(ns = //): <odometryTopic> = odom
  58. [DEBUG] [1477051645.568867307,1288.802000000]: DiffDrive(ns = //): <odometryFrame> = odom
  59. [DEBUG] [1477051645.568927646,1288.802000000]: DiffDrive(ns = //): <robotBaseFrame> = base_footprint
  60. [DEBUG] [1477051645.569256884,1288.802000000]: DiffDrive(ns = //): <publishWheelTF> = false
  61. [DEBUG] [1477051645.569338164,1288.802000000]: DiffDrive(ns = //): <publishWheelJointState> = false
  62. [DEBUG] [1477051645.569393655,1288.802000000]: DiffDrive(ns = //): <legacyMode> = ture
  63. [DEBUG] [1477051645.569843607,1288.802000000]: DiffDrive(ns = //): <wheelSeparation> = 0.29999999999999999
  64. [DEBUG] [1477051645.569951337,1288.802000000]: DiffDrive(ns = //): <wheelDiameter> = 0.082000000000000003
  65. [DEBUG] [1477051645.570012696,1288.802000000]: DiffDrive(ns = //): <wheelAcceleration> = 1.8
  66. [DEBUG] [1477051645.570077175,1288.802000000]: DiffDrive(ns = //): <wheelTorque> = 30
  67. [DEBUG] [1477051645.570139351,1288.802000000]: DiffDrive(ns = //): <updateRate> = 100
  68. [ WARN] [1477051645.570811579,1288.802000000]: DiffDrive(ns = //): <odometrySource> no matching key to 1
  69. [DEBUG] [1477051645.571414503,1288.802000000]: DiffDrive(ns = //): <odometrySource> = default := 1
  70. [DEBUG] [1477051645.572053861,1288.802000000]: DiffDrive(ns = //): <leftJoint> = front_left_wheel_joint
  71. [DEBUG] [1477051645.572185748,1288.802000000]: DiffDrive(ns = //): <rightJoint> = front_right_wheel_joint
  72. [ INFO] [1477051645.576771098,1288.802000000]: DiffDrive(ns = //): Try to subscribe to cmd_vel!
  73. [ INFO] [1477051645.593900394,1288.802000000]: DiffDrive(ns = //): Subscribe to cmd_vel!
  74. [ INFO] [1477051645.597711053,1288.802000000]: DiffDrive(ns = //): Advertise odom on odom !
  75. [ INFO] [1477051645.648506913,1288.825000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
  76. [ INFO] [1477051645.836105586,1288.862000000]: Physics dynamic reconfigure ready.





可以用如下工具进行分析:

  1. rqt_action rqt_logger_level rqt_robot_monitor
  2. rqt_bag rqt_moveit rqt_robot_steering
  3. rqt_bag_plugins rqt_msg rqt_runtime_monitor
  4. rqt_console rqt_nav_view rqt_rviz
  5. rqt_dep rqt_plot rqt_service_caller
  6. rqt_graph rqt_pose_view rqt_shell
  7. rqt_gui rqt_publisher rqt_srv
  8. rqt_gui_cpp rqt_py_common rqt_tf_tree
  9. rqt_gui_py rqt_py_console rqt_top
  10. rqt_image_view rqt_reconfigure rqt_topic
  11. rqt_launch rqt_robot_dashboard rqt_web

以rqt_topic为例,可以参看全部主题

  1. ~$ rosrun rqt_topic rqt_topic

如果需要查看camera_rgb,可以运行如下命令:

  1. ~$ rosrun rqt_image_view rqt_image_view


运行rosrun rqt_graph rqt_graph


此时,gazebo与其他节点并无通信,然后启动如下命令:

  1. ~$ roslaunch kamtoa_teleop teleop_keyboard.launch


  1. <launch>
  2. <node pkg="kamtoa_teleop" type="kamtoa_keyboard.py" name="kamtoa_keyboard" output="screen" />
  3. </launch>


这时,就可以使用键盘通过/cmd_vel控制gazebo中的机器人在环境中运动,当然键盘控制还有其他一些功能,请看如下源码。

  1. #!/usr/bin/env python
  2.  
  3. # Copyright (c) 2011,Willow Garage,Inc.
  4. # All rights reserved.
  5. #
  6. # Redistribution and use in source and binary forms,with or without
  7. # modification,are permitted provided that the following conditions are met:
  8. #
  9. # * Redistributions of source code must retain the above copyright
  10. # notice,this list of conditions and the following disclaimer.
  11. # * Redistributions in binary form must reproduce the above copyright
  12. # notice,this list of conditions and the following disclaimer in the
  13. # documentation and/or other materials provided with the distribution.
  14. # * Neither the name of the Willow Garage,Inc. nor the names of its
  15. # contributors may be used to endorse or promote products derived from
  16. # this software without specific prior written permission.
  17. #
  18. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  19. # AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,BUT NOT LIMITED TO,THE
  20. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21. # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  22. # LIABLE FOR ANY DIRECT,INDIRECT,INCIDENTAL,SPECIAL,EXEMPLARY,OR
  23. # CONSEQUENTIAL DAMAGES (INCLUDING,PROCUREMENT OF
  24. # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA,OR PROFITS; OR BUSINESS
  25. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,WHETHER IN
  26. # CONTRACT,STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  27. # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,EVEN IF ADVISED OF THE
  28. # POSSIBILITY OF SUCH DAMAGE.
  29.  
  30. import rospy
  31.  
  32. from geometry_msgs.msg import Twist
  33.  
  34. import sys,select,termios,tty
  35.  
  36. msg = """
  37. Control Your Turtlebot!
  38. ---------------------------
  39. Moving around:
  40. u i o
  41. j k l
  42. m,.
  43. q/z : increase/decrease max speeds by 10%
  44. w/x : increase/decrease only linear speed by 10%
  45. e/c : increase/decrease only angular speed by 10%
  46. space key,k : force stop
  47. anything else : stop smoothly
  48. CTRL-C to quit
  49. """
  50. lightSwitches = {
  51. '1':'light0','2':'light1','3':'light2','4':'light3','5':'light4'
  52. }
  53.  
  54. moveBindings = {
  55. 'i':(1,0),'o':(1,-1),'j':(0,1),'l':(0,'u':(1,',':(-1,'.':(-1,'m':(-1,}
  56.  
  57. speedBindings={
  58. 'q':(1.1,1.1),'z':(.9,.9),'w':(1.1,'x':(.9,'e':(1,'c':(1,}
  59.  
  60. def getKey():
  61. tty.setraw(sys.stdin.fileno())
  62. rlist,_,_ = select.select([sys.stdin],[],0.1)
  63. if rlist:
  64. key = sys.stdin.read(1)
  65. else:
  66. key = ''
  67.  
  68. termios.tcsetattr(sys.stdin,termios.TCSADRAIN,settings)
  69. return key
  70.  
  71. speed = .2
  72. turn = 1
  73.  
  74. def vels(speed,turn):
  75. return "currently:\tspeed %s\tturn %s " % (speed,turn)
  76.  
  77. if __name__=="__main__":
  78. settings = termios.tcgetattr(sys.stdin)
  79.  
  80. rospy.init_node('Kamtoa_teleop_keyboard')
  81. pub = rospy.Publisher('cmd_vel',Twist,queue_size=5)
  82.  
  83. light_select = ''
  84. x = 0
  85. th = 0
  86. status = 0
  87. count = 0
  88. acc = 0.1
  89. target_speed = 0
  90. target_turn = 0
  91. control_speed = 0
  92. control_turn = 0
  93. try:
  94. print msg
  95. print vels(speed,turn)
  96. while(1):
  97. key = getKey()
  98. if key in moveBindings.keys():
  99. x = moveBindings[key][0]
  100. th = moveBindings[key][1]
  101. count = 0
  102. elif key in speedBindings.keys():
  103. speed = speed * speedBindings[key][0]
  104. turn = turn * speedBindings[key][1]
  105. count = 0
  106.  
  107. print vels(speed,turn)
  108. if (status == 14):
  109. print msg
  110. status = (status + 1) % 15
  111. elif key == ' ' or key == 'k' :
  112. x = 0
  113. th = 0
  114. control_speed = 0
  115. control_turn = 0
  116. elif key in lightSwitches.keys():
  117. print "lightSwitch pressed!"
  118.  
  119. else:
  120. count = count + 1
  121. if count > 4:
  122. x = 0
  123. th = 0
  124. if (key == '\x03'):
  125. break
  126.  
  127. target_speed = speed * x
  128. target_turn = turn * th
  129.  
  130. if target_speed > control_speed:
  131. control_speed = min( target_speed,control_speed + 0.02 )
  132. elif target_speed < control_speed:
  133. control_speed = max( target_speed,control_speed - 0.02 )
  134. else:
  135. control_speed = target_speed
  136.  
  137. if target_turn > control_turn:
  138. control_turn = min( target_turn,control_turn + 0.1 )
  139. elif target_turn < control_turn:
  140. control_turn = max( target_turn,control_turn - 0.1 )
  141. else:
  142. control_turn = target_turn
  143.  
  144. twist = Twist()
  145. twist.linear.x = control_speed; twist.linear.y = 0; twist.linear.z = 0
  146. twist.angular.x = 0; twist.angular.y = 0; twist.angular.z = control_turn
  147. pub.publish(twist)
  148.  
  149. except:
  150. print e
  151.  
  152. finally:
  153. twist = Twist()
  154. twist.linear.x = 0; twist.linear.y = 0; twist.linear.z = 0
  155. twist.angular.x = 0; twist.angular.y = 0; twist.angular.z = 0
  156. pub.publish(twist)
  157.  
  158. termios.tcsetattr(sys.stdin,settings)


使用手机控制机器人运动也很方便,先查询一下地址:

  1. relaybotBox@relaybotBox-desktop:~$ ifconfig -a
  2. enp3s0 Link encap:以太网 硬件地址 00:e0:b4:15:9b:08
  3. inet 地址:192.168.3.23 广播:192.168.3.255 掩码:255.255.255.0
  4. inet6 地址: fe80::3805:e5fe:19f0:19e2/64 Scope:Link
  5. UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
  6. 接收数据包:32257 错误:0 丢弃:0 过载:0 帧数:0
  7. 发送数据包:41654 错误:0 丢弃:0 过载:0 载波:0
  8. 碰撞:0 发送队列长度:1000
  9. 接收字节:23057526 (23.0 MB) 发送字节:17828352 (17.8 MB)
  10.  
  11. enp4s0 Link encap:以太网 硬件地址 00:e0:b4:15:9b:09
  12. UP BROADCAST MULTICAST MTU:1500 跃点数:1
  13. 接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0
  14. 发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
  15. 碰撞:0 发送队列长度:1000
  16. 接收字节:0 (0.0 B) 发送字节:0 (0.0 B)
  17.  
  18. lo Link encap:本地环回
  19. inet 地址:127.0.0.1 掩码:255.0.0.0
  20. inet6 地址: ::1/128 Scope:Host
  21. UP LOOPBACK RUNNING MTU:65536 跃点数:1
  22. 接收数据包:8314866 错误:0 丢弃:0 过载:0 帧数:0
  23. 发送数据包:8314866 错误:0 丢弃:0 过载:0 载波:0
  24. 碰撞:0 发送队列长度:1
  25. 接收字节:671600054 (671.6 MB) 发送字节:671600054 (671.6 MB)

在手机设置IP:192.168.3.23。连接成功后可以看到:


如何让机器人在环境中进行导航呢?运行下面命令:

  1. ~$ roslaunch kamtoa_navigation kamtoa_navigation.launch

其中代码如下:

  1. <?xml version="1.0"?>
  2. <!-- Fully Autonomous Navigation Launch file-->
  3. <launch>
  4.  
  5. <!-- Map server -->
  6. <arg name="map" default="sim_world"/>
  7. <node name="map_server" pkg="map_server" type="map_server" args="$(find kamtoa_navigation)/maps/$(arg map).yaml"/>
  8.  
  9.  
  10. <!-- Initial pose for the Localizer -->
  11. <arg name="initial_pose_x" default="0.0"/>
  12. <arg name="initial_pose_y" default="0.0"/>
  13. <arg name="initial_pose_a" default="0.0"/>
  14.  
  15. <!-- Localizaer : AMCL -->
  16. <include file="$(find kamtoa_navigation)/launch/modules/amcl.launch.xml">
  17. <arg name="initial_pose_x" value="$(arg initial_pose_x)"/>
  18. <arg name="initial_pose_y" value="$(arg initial_pose_y)"/>
  19. <arg name="initial_pose_a" value="$(arg initial_pose_a)"/>
  20. </include>
  21.  
  22. <!-- Velocity Smoother -->
  23. <include file="$(find kamtoa_navigation)/launch/modules/velocity_smoother.launch.xml"/>
  24.  
  25. <!-- Navigation Stack (move_base's path planner,costmaps & obstacles manager) -->
  26. <include file="$(find kamtoa_navigation)/launch/modules/move_base.launch.xml"/>
  27.  
  28.  
  29. </launch>

是不是有很多眼熟的内容,导入Map,机器人位置初值,AMCL,速度平滑,导航等。


这是再看下rqt_graph:


各个节点之间联系清晰可见。


路径规划效果如下:



其他内容后续补充。

猜你在找的Ubuntu相关文章