【Coppeliasim+Python】Python RRT 路径规划与Coppeliasim加载仿真


目录

  1. UI-xml设计

  2. Python:基于采样的运动规划算法RRT路径规划主程序

  3. Lua脚本注释


 291e77fc62835337427b27ba9abcb55e.png仿真界面

Coppeliasim加载RRT路径规划结果

9ddb50ff7fda44017ac23b1f5c944424.png交互UI

1. UI-xml设计

xml = [[<ui closeable="false" on-close="closeEventHandler" resizable="true">
     <tabs>
       <tab title="CSV Playback">
     <group layout="vbox">
       <label text="<big> Enter the folder path, ending with a slash/backslash:</big>" id="1000" wordwrap="false" style="font-weight: bold;"/>
       <group layout="hbox">
       <edit value="" id="1001" />
       <button text="Open Files" on-click="parseCSVFile" id="2000" /> 
       </group>
       <label text="<big> Controls</big>" id="1005" wordwrap="false" style="font-weight: bold;"/>
       <group layout="grid">
       <button text="Play" on-click="playPressed" />
       <button text="Pause" on-click="pausePressed" />
       <button text="Stop" on-click="stopPressed" />
       <button text="Step" on-click="stepPressed" />
       <br/>
       <label text="Time Multiplier" />
       <button text="Increase" on-click="increaseSpeed" />
       <button text="Decrease" on-click="decreaseSpeed" />
       <edit id="1006" value="0.1" oneditingfinished="parseEnteredSpeed" />
       </group>
       <label text="Time" />
       <hslider id="4000" tick-position="below" tick-interval="500" minimum="0" maximum="10000" on-change="timeSliderChange"/>
       <label text="<big> Messages:</big>" id="1002" wordwrap="false" style="font-weight: bold;"/>
       <group layout="vbox">
        <label value="" id="1003" wordwrap="true" />
      </group>
      </group>
         <stretch />
     </tab>
     </tabs>
   </ui>]]
   ui=simUI.create(xml)--创建UI

2. Python:基于采样的运动规划算法RRT路径规划主程序 

45c3b3a1b82547718cc72f153e34f0b2.pngRRT算法伪代码

Python主程序注释:

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值