当前位置:文档之家› Vehicle Motion Planning with Time-Varying Constraints

Vehicle Motion Planning with Time-Varying Constraints

Vehicle Motion Planning with Time-Varying Constraints W.Todd Cerven1,Francesco Bullo2,and Victoria L.Coverstone3

University of Illinois at Urbana-Champaign

Introduction

With the growing emphasis on vehicle autonomy,the problem of planning a trajectory in an environment with obstacles has become increasingly important.This task has been of particular interest to roboticists and computer scientists,whose primary focus is on kine-matic motion planning[1].Typical kinematic planning methods fall into two main categories, roadmap methods and incremental search methods,both of which?nd collision-free paths in the state space.Roadmap methods generate and traverse a graph of collision-free connect-ing paths spanning the state space,while incremental search methods,including dynamic programming[2]and potential?eld methods[3],perform an iterative search to connect the initial and goal states.For the purely geometric path planning problem,deterministic algo-rithms have been created that are complete,i.e.,they will?nd a solution if and only if one exists.Unfortunately,these su?er from high computational costs which are exponential in system degrees of freedom.This cost has motivated the development of iterative randomized path planning algorithms that are probabilistically complete,i.e.,if a feasible path exists,the probability of?nding a path from the initial to?nal conditions converges to one as the num-ber of iterations goes to in?nity.The introduction of the Rapidly-exploring Random Trees (RRTs)of LaValle and Ku?ner[4]allowed both for computationally e?cient exploration of a complicated space as well as incorporation of system dynamics.The RRT grows a tree of feasible trajectories from the initial condition,or root node.Each node,or waypoint,on the tree represents a system state and has possible trajectories branching from it.Through use of an embedded planning routine,the tree incrementally builds itself in random direc-1Senior Member of Technical Sta?,currently at The Aerospace Corporation,15049Conference Center Drive,Suite1029,Chantilly,VA20151,Member AIAA

2Assistant Professor,Coordinated Sciences Laboratory,1308West Main Street,Urbana,IL61801 3Associate Professor,Department of Aerospace Engineering,104South Wright Street,Urbana,IL61801, Associate Fellow AIAA

tions,node by node,until the?nal conditions are met(within accuracy bounds).Frazzoli[5] demonstrated that a hybrid systems representation of vehicle dynamics,when coupled with the RRT,could be used to address moving obstacles and time-invariant?nal conditions in a real-time environment.This paper presents a similar approach which provides probabilistic completeness in the presence of both time-varying obstacles and?nal conditions while using a simpler algorithmic procedure.In addition,a novel approach to provide error mitigation of the embedded planner in a hybrid system-based RRT is presented.An example is then given in which the proposed algorithm is applied to the landing of a spacecraft on an idealized asteroid.

An RRT-based Approach

Background

The idea of this method is to incrementally build a tree of feasible trajectories to e?ciently explore a reachable space,where a tree is a directed graph in which all nodes(excepting the root)have one parent node and an unspeci?ed number of child nodes.The basic RRT algorithm[4]can be seen in Figure1(a).

The original RRT algorithm,shown to be probabilistically complete,extended the tree by picking the closest(Euclidean metricρ)node on the tree to the random point and choos-ing the best constant input from a?nite predetermined set.For this simplistic embedded planner,the system equations of motion are propagated according to the input for a prede-termined time.If no collisions are found,a new child node is added to the tree corresponding to the propagated state.

Frazzoli adapted this method for control of autonomous vehicles where motion is repre-sented by a concatenation of motion primitives[5].He rede?ned the metricρas the cost-to-go function of an optimal control problem[2]and replaced the constant input set with an online planning algorithm that found solutions for the obstacle-free planning https://www.doczj.com/doc/a89892905.html,ing the Extend routine in Figure1(b),he was able to address moving obstacles by looping through successively close nodes on the tree until one was found which allowed an acceptable trajec-

tory.If a collision free trajectory was found,the routine would grow the tree and then try to connect to the?nal state.A completeness proof of this approach is in[5].A limitation on this method lies in its inability to address time-varying?nal conditions.

A New Approach

We use a primitive-based hybrid system model that expands upon that in[5],where the dynamics of the system,commonly described using an ordinary di?erential equation, are instead modeled by computed state?ows in response to di?ering inputs.These can be separated into two types of primitives,reference trajectories and maneuvers,where refer-ence trajectories are precomputed trajectories with a variable time duration within a given interval and maneuvers are?xed time primitives connecting reference trajectories.This is a hybrid system in that the state space is de?ned by the?nite set of trajectory primitives,the continuous space over which each primitive can be applied(i.e.,where the dynamics of the system are invariant),and time.The control variables then consist of the reference trajec-tory time durations and the parameters de?ning each maneuver.Initial and?nal conditions are assumed to lie on reference trajectories.A more detailed description of this system is found in[6].Furthermore,we assume that there exists an embedded planner guaranteed to ?nd motion planning solutions in an obstacle-free environment subject to time-varying?nal constraints and an upper time limit.The RRT-based algorithm for this approach follows the general loop in Figure1(a),calling the Extend routine in Figure1(c)to try to connect the trajectories represented by the tree to a state de?ned by the function RandomState.Once again,the metric is de?ned as the cost-to-go function,but the state variable x now includes time as well.This addition both accommodates a time-dependent?nal condition and allevi-ates the need for cycling through the nodes in the tree to address time-varying obstacles.In this Extend routine,NearestNeighbor merely?nds the closest node in the tree to x instead of sorting the tree nodes and cycling through them.InputFound then calls the embedded planner to?nd a feasible trajectory from the nearest node state to x and NoCollision incre-mentally checks the resulting trajectory for collisions.Provided a collision-free trajectory is

found,the tree is extended by AddChildren.Unlike the approach of Frazzoli,this allows for the addition of single or multiple nested child nodes along the reference trajectories.Extend will repeat this process with the last created node until x is reached or a collision-free tra-jectory cannot be obtained.Once Extend exits,BuildRRT keeps looping until a solution is found.Probabilistic completeness for this algorithm can then be shown as follows: Lemma Assuming no two RRT milestones lie within a speci?ed >0of one another for the given metric,this method is probabilistically complete.

Proof:Noting that the appropriate input is always generated by the online planning algorithm if it exists and is assigned a speci?c nonzero execution time,it follows from Theorem3of[4]that this method is probabilistically complete.

Embedded Planner Error Mitigation

The embedded planner naturally has a prescribed accuracy and,as a result,an error that can be propagated as trajectories are concatenated together.Although this e?ect could be troublesome,the framework of the RRT also allows for correction of errors from the underlying planning algorithm.For the initial incarnation of the RRT[4],a constant input was chosen from a?nite set and was highly unlikely to control the system to the intended ?nal state.As a result,the actual?nal state(as found by integrating the system under the input)is that which is stored as the new node state rather than the targeted state.Thus, replanning from that node takes into account the error correction.When addressing the hybrid system,the characteristics of these errors become important,as replanning can only occur from nodes on reference trajectories.Thus,when integrating along the trajectory, nodes would only be added to the tree where the state matched the trajectory primitive within an acceptable error.While this methodology is useful in practice,it is not a complete error correction,as the correction is only the projection of the total error onto the trajectory primitive.It is notable that,although limitations of handling the error in this manner were not quanti?ed,this method was shown to be consistently e?ective for the example problem.

Asteroid Landing Example

The example described here is that of a spacecraft landing on a celestial body similar to the asteroid Ida.We made simplifying assumptions by geometrically modeling the asteroid as a60km long cylinder with radius12km and modeling the gravity as a Newtonian point source.While it is known that the gravity?eld about a non-spherical body is more complicated than the point source model,it is used here for simplicity.The algorithm could then be extended to other gravity models when needed.The setup of the problem is seen in Figure2,where the initial position of the spacecraft is18km above the surface of the asteroid with the?nal condition of“landing”at a point just o?the surface on the other side of the asteroid.Although this problem could have been cast in a rotating reference frame,an inertial reference frame was chosen to show algorithm performance in relation to time-varying obstacles and?nal conditions.Additionally,arti?cial constraints are imposed to limit motion to Ida’s plane of rotation and an annulus with radii between19.1and38.3 km of the center of mass.An upper bound of46hours was placed on the transfer time.The embedded planner used in the InputFound routine was based on a dynamic programming approach and can be found in[6].Note that,rather than sample the reachable set,which is computationally impractical to de?ne,the sampling in the function RandomState was done over free hybrid state space.Here,the reference trajectories in the hybrid system are de?ned as the set of all circular orbits and the maneuvers are de?ned through an online local planning algorithm.From a start point at[x T,v T]T=[0,30,0,?0.0062,0,0]T(km,km/s), the randomized algorithm grows a tree as seen in Figure2,the result of11randomized planner iterations.The results of these iterations are given in Table1.

The“Greedy Loops”column in the table refers to the fact that the error correction men-tioned in Section can cause a loop in the Extend routine.This occurred in step11,where the Extend algorithm looped an extra time to reach the inertial?nal state.The overall solution was computed in64.2seconds,with a?nal state of[?26.2,?12,0,0.0026,?0.0057,0]T(km, km/s)at12.3hours.This is an error of.03percent in position and.2percent in velocity

from the?nal condition.

Of course,this is a planner based on randomized methods,and,as such,every solution to this algorithm will be slightly di?erent with di?erent run times.A batch of50runs of the aforementioned example were completed and yielded a median run time was95.9seconds (on an850MHz Pentium III computer)with78%of the cases taking less than200seconds. The median number of randomized planner iterations was11,with90%taking less than40 iterations.In every case tested,the algorithm successfully converged to a solution.

Conclusion

This paper presented a new variant of the Rapidly-exploring Random Tree(RRT)for use with a motion primitive-based planner.By including time as a state it is able to accommodate time-varying obstacles and?nal conditions.This method is shown to be probabilistically complete,?nding a solution with a probability of one as the number of iterations goes to in?nity.This method was then applied to the example of a spacecraft landing on an idealized asteroid,for which analysis of a batch of runs was completed.This method showed itself to be reliable with typical run times of less than3minutes.While the randomized method shown is not optimal,there exist methods to re?ne the tree to increase optimality. Acknowledgments

This research is supported in part by the U.S.Army Research O?ce under grant DAAD 190110716,and by NSF grant IIS-0118146.The authors also gratefully acknowledge Pro-fessor Emilio Frazzoli as well as Professor Steven LaValle and his research group,whose comments were bene?cial in the development of this paper.

References

1Latombe,J.-C.,“Motion Planning:A Journey of Robots,Molecules,Digital Actors, and Other Artifacts,”International Journal of Robotics Research,Vol.18,No.11,1999, pp.1119–1128.

2Bertsekas,D.P.,Dynamic Programming and Optimal Control,Vol.1,Athena Scienti?c, Belmont,MA,2nd ed.,2001,Chap.1,pp.18–34.

3Sundar,S.and Shiller,Z.,“Optimal Obstacle Avoidance Based on the Hamilton-Jacobi-Bellman Equation,”IEEE Transactions on Automatic Control,Vol.13,No.2,1997, pp.305–310.

4LaValle,S.M.and Ku?ner,J.J.,“Randomized Kinodynamic Planning,”International Journal of Robotics Research,Vol.20,No.5,2001,pp.378–400.

5Frazzoli,E.,Daleh,M.A.,and Feron,E.,“Real-time motion planning for agile autonomous vehicles,”AIAA Journal of Guidance,Control,and Dynamics,Vol.25,No.1,2002, pp.116–129.

6Cerven,W.T.,E?cient Hierarchical Global Motion Planning for Autonomous Vehicles, Ph.D.thesis,University of Illinois at Urbana-Champaign,Urbana,IL,Oct.2003.

List of Table Captions Table1:Randomized Planner Iterations:Extend Results

Iteration End Condition Greedy Loops 0Collision0

1Not Reachable0

2Not Reachable0

3Collision0

4Not Reachable0

5Not Reachable0

6Collision1

7Collision1

8Not Reachable0

9Not Reachable0

10Collision1

11Connected2

List of Figure Captions

Figure1:Algorithm Pseudocode,(a)(top)Basic RRT loop,(b)(left)Fraz-zoli Extend routine,and(c)(right)Proposed Extend routine;ρis a prede?ned metric.

Figure2:Ida Landing,setup and relative target location(left),tree and?nal path in rotating reference frame(right)

BuildRRT(x start,x final)

1:tree.Initialize(x start)

2:for iterations=1to maxiterations

3:x rand←RandomState()

4:Extend(tree,x rand,x final)

5:ifρ(x rand,x final)< break loop

6:return tree

Extend(tree,x,x final)Extend(tree,x,x final)

1:for all x near in SortedNodeList(tree,x)1:x near←NearestNeighbor(tree,x)

2:if InputFound(x near,x,u)2:if InputFound(x near,x,u)

and NoCollision(x near,x,u)and NoCollision(x near,x,u)

3:tree.AddChild(x near,x,u)3:tree.AddChildren(x near,x,u)

4:ifρ(x,x final)< return success4:ifρ(x,x final)< return connected

5:else let x near=x,x=x final and goto2:5:else let x near=x,x=x final and goto2: 6:return failure6:return not reachable or collision

表单建模中接口文档

仅限阅读请勿传播 当您阅读本方案时,即表示您 同意不传播本方案的所有内容 泛微协同办公应用平台表单建模接口文档

版本

目录 版本 (2) 第一部分流程转数据 (4) 功能说明 (4) 配置方法 (4) 实施注意 (7) 第二部分数据审批 (8) 功能说明 (8) 配置方法 (8) 实施注意 (10) 第三部分页面扩展中的接口动作 (10) 功能说明 (10) 配置方法 (11) 实施注意 (13)

第一部分流程转数据 功能说明 该功能主要用于在流程在离开或者到达某个节点的时候,将流程表单上的数据插入到模块关联的表单中。 此功能暂不支持,流程关联的明细表单触发模块数据。 配置方法 1、在菜单【设置】→【设置中心】→【外部接口设置】→【配置接口动作】页面中如下图 说明: ?WorkflowToMode这个action的作用是把流程数据转换为模块卡片数据,所以需要检查 WorkflowToMode此接口动作标识是否存在如果不存在则自己添加此action。 ?接口动作标识:WorkflowToMode ?接口动作类文件:weaver.formmode.interfaces.action.WorkflowT oMode 2、在【设置】→【设置中心】→【表单建模】→点击具体的模块—>接口设置—>流程转数据页面

右键“新建”按钮页面如下图 说明: 流程类型:选择要触发模块的流程。比如通过内部留言流程触发生成此模块的数据则“流程类型” 选择内部留言流程。 模块名称:此模块的具体名称 在上图页面上选择具体的流程之后,右键点击“保存”按钮页面如下图

KIS专业版插件开发接口说明

KISBillTransfer组件使用参考 客户化开发工具包参考手册目录 目录 (1) 概述 (1) 属性 (2) 方法 (2) 事件 (4) 中间层事件 (8) 应用示例 (9) 概述 单据二次开发是针对现目前单据的一些功能无法满足一些客户的特殊要求,同时分公司又有能力进行二次开发而提出的,这样既可以在现有的系统不做变动的情况下面满足用户的需求,同时也增强了系统的稳定性。 注意:本篇所介绍所用到的动态连接库名为:KISBillTransfer.dll 通过该说明文档,你可以了解到 1.如何通过KISBillTransfer组件在录单过程中对单据上各项目加以控制。 2.如何通过KISBillTransfer组件实现自定义功能菜单。 3.如何通过KISBillTransfer组件控制数据的保存。 4.应用示例。 该文档阅读的适用对象 需要在KIS专业版进销存和生产委外业务单据上进行二次开发的开发者。

属性 1.Property Cnnstring As String 当前数据库的MMTS.PropsString连接串。 2.Property SystemName As String 当前系统名称。 3.Property LastInfo As String 最后一次系统返回的错误信息 4.Property BillForm As Object 整个单据窗体对象。可通过该对象访问单据上的任何一个对象,包括控件,菜单。 共有的方法有:InsertRow(),在Grid的当前行追加一行,它没有参数。 5.Property BillFunc as Object 代表单据对象。目前没什么用途。 6.Property Head As Object 单据表头控件,是一个KDText控件数组 7.Property Grid As Object 单据分录控件,为FpSpread控件 8.Property SumGrid As Object 单据分录合计控件,为FpSpread控件 9.Property HeadCtl As Variant 对应表头控件数组,记录每个表头项目各属性的数组 如果要改变HeadCtl中的某个属性值,需先对HeadCtl做一个备份,然后修改此备份的相应属性值,再将此备份赋值给HeadCtl。 10.Property EntryCtl As Variant 对应分录各列,记录每个分录列各属性的数组 如果要改变EntryCtl中的某个属性值,需先对EntryCtl做一个备份,然后修改此备份的相应属性值,再将此备份赋值给EntryCtl。 11.Property SaveVect As KFO.Vector 二次开发外部数据存取接口。在录单过程中,用户可将某些数据保存在此Vector中,在单据保存时,再通过二次开发中间层组件,将此Vector中的数据保存到指定位置。 SaveVect.Item(1) 为一个KFO.Dictionary对象 该对象包含以下四个系统数据 SaveVect.Item(1).Value("FInterID"):单据内码 SaveVect.Item(1).Value("FTransType") :单据事务类型 SaveVect.Item(1).Value("ISRedBill") :是否红字单据 SaveVect.Item(1).Value("BillChecked") :是否审核。 方法 1.Function AddUserMenuItem(ByVal Caption As String, [ByVal RootMenuCaption As String = ""])

微信公众平台底部菜单以及功能分析

微信公众平台底部菜单以及功能分析 (一)功能概述 一、微信公众平台需结合网站的内容统一化,实现会员等级的分化 二、通过带参数的二维码实现用户关注山美特微信工作号后注册即成为山美特会员, 三、可通过发送关键字等自动推送相关内容内容; 四、可设置自动回复和自定义回复; 五、可自定义菜单; 六、可融合第三方接口实现相关功能; 七、可实现会员的现场互动、分享、投稿功能; 八、具有后台管理功能,可添加删除管理员;管理员可管理平台内容、管理会员、和会员 互动聊天、管理微信公众号; (二)微信会员功能 一、通过带参数的二维码实现用户关注山美特微信工作号后注册即成为山美特会员,并实现区分等级;会员页面自动获取浏览者微信基本信息并核对保存; 1、培训顾问会员功能与权限: A、建立业务需求信息单(包含客户名称、培训日期、地点、预定主带教练),并发布 向对应的带参数二维码,供客户添加关注后自动分组 B、统计报名人数,导出表格 C、活动现场互动管理 D、发布乘车信息,活动当天天气信息

2、企业团体会员功能与权限: A、活动报名,提交姓名身份证信息以供购买保险 B、查看已报名列表 C、查看户外活动注意事项、告学员书、 D、查询天气、查询大巴车牌颜色停放位置以及车牌号(由相关营销顾问在出发日提 前提供) E、参与活动现场互动(上传活动图片、视频、文字、点赞、转发、抽奖等) F、下载活动照片与电子相册 G、发表培训心得感想(通过分享达到一定数目送出山美特奖品) H、评估反馈调查 I、团队负责人管理报名表、导出报名表 3、青少年会员功能与权限 A、任务课程查询 B、任务课程报名 C、积分(奖章)记录 D、查询天气 E、参与活动现场互动 F、下载活动照片与电子相册 G、发表心得感想(通过分享达到一定数目送出山美特奖品) H、评估反馈调查

微信公众平台:功能强大的自定义菜单

微信公众平台:功能强大的自定义菜单 最近,有部分公众账号发现,微信官方已经通过了一周前申请的自定义界面接口内测,可利用接口,在公众账号对话界面底部实现自定义菜单。如果说之前微信公众账号的自定义回复的互动让它向 App 迈进一步,现在借助自定义界面,公众账号已然是一个微信端的轻量级应用。 AD: 目前自定义菜单已经停止接受申请,但将来肯定会开放,微信公众平台后台的帮助文档里对自定义菜单的描述也很完善,所以现在我们先来看看它是什么样子,为未来准备一下。 自定义界面让公众账号大幅提高了交互属性,公众帐号从而可以直接在页面上显示内容分类,用户也只需要轻松点击菜单获取内容,无需输入指令。 先一起来体验一下自定义菜单。 它的入口在高级功能=》编辑模式=》自定义菜单-设置。 在公众账号微杂志后台(微信号:weixinzazhi),可以看到新增加的设置选项。首先进入高级功能的页面后,底部有一个自定义菜单栏。 点击设置后,进入下一级页面 设置好栏目后,可以发布相应内容。目前,美中不足的是,最多可以创建三个一级菜单,每个一级菜单下可以创建最多五个二级菜单,远远满足不了微杂志如此多内容的需求。不过,总算是向前迈了一小步。 设置好后,可以点击预览,会出来一个手机界面看到设置效果。然后点击发布,24小时内,所有用户就都可以看到菜单式的微杂志了。点击选项中的二级菜单,便可打开对应的微信消息。 需要说明的是,公众号调整并发布自定义菜单之后,旧订阅用户将在 24 小时生效。而对于新订阅的用户,将即时生效。 目前,普通用户可以通过先开启编辑模式中的自定义菜单功能,然后按需设置菜单和菜单项对应的动作;具备开发能力和服务器资源的开发者,更可以通过开发模式中的自定义菜单开发接口,来更灵活地实现该功能。 如果说之前微信公众账号的自定义回复的互动让它向 App 迈进一步,现在借助自定义界面,公众账号已然是一个微信端高山美人茶 https://www.doczj.com/doc/a89892905.html,的轻量级应用。不过,微杂志至今已推出了197期书影音,53节微信小说连载,以及下一站旅行也推出了几十期。目前自定义界面只支持两级菜单,对于微杂志来说,在设置上还远远满足不了需求。 设想一下,经过测试之后,微信官方可能逐步放开栏目设置,并打通微支付环节。有多个栏目的微杂志,俨然会成为一个精美的微信杂志,有的栏目可以作为免费栏目吸引人气,有的栏目,比如原创的微信小说,可以作为收费栏玛瑙 https://www.doczj.com/doc/a89892905.html,目。还可以增加多个作家的专栏,由于已聚集了25万文艺青年,每天收到4、5万条回复是家常便饭,所以在用户群、互动以及习惯上,基本上不存在太多问题。每天通过内容推送,直达粉丝手机桌面,这比目前的众多阅读类APP要更接近用户,其实基本就相当于一个轻量级的APP了。 笔者有理由相信,虽然目前微信自定义菜单还很初级。但随着微信的进一步进化,它将有可能颠覆现有的阅读类APP。基于微信的阅读类轻量级APP,将会如春笋般冒出来。 【编辑推荐】 征服Python—语言基础与典型应用

2019-微信自定义菜单word版本 (3页)

本文部分内容来自网络整理,本司不为其真实性负责,如有异议或侵权请及时联系,本司将立即删除! == 本文为word格式,下载后可方便编辑和修改! == 微信自定义菜单 篇一:微信自定义菜单错误代码解决方法 公众号每次调用接口时,可能获得正确或错误的返回码,开发者可以根据返回 码信息调试接口,排查错误。 全局返回码说明如下 篇二:微信公众平台:功能强大的自定义菜单 微信公众平台:功能强大的自定义菜单 最近,有部分公众账号发现,微信官方已经通过了一周前申请的自定义界面接 口内测,可利用接口,在公众账号对话界面底部实现自定义菜单。如果说之前 微信公众账号的自定义回复的互动让它向 App 迈进一步,现在借助自定义界面,公众账号已然是一个微信端的轻量级应用。 AD: 目前自定义菜单已经停止接受申请,但将来肯定会开放,微信公众平台后台的 帮助文档里对自定义菜单的描述也很完善,所以现在我们先来看看它是什么样子,为未来准备一下。自定义界面让公众账号大幅提高了交互属性,公众帐号从而可以直接在页面上显示内容分类,用户也只需要轻松点击菜单获取内容, 无需输入指令。 先一起来体验一下自定义菜单。 它的入口在高级功能=》编辑模式=》自定义菜单-设置。 在公众账号微杂志后台(微信号:weixinzazhi),可以看到新增加的设置选项。首先进入高级功能的页面后,底部有一个自定义菜单栏。 点击设置后,进入下一级页面 设置好栏目后,可以发布相应内容。目前,美中不足的是,最多可以创建三个 一级菜单,每个一级菜单下可以创建最多五个二级菜单,远远满足不了微杂志 如此多内容的需求。不过,总算是向前迈了一小步。

创建组件的基本步骤

在这个论题中,你将学会怎样创建一个可以插入到ArcGIS Desktop application的组件。重点是在特定的语言中如何编写代码或怎样解决一个特定的ArcObjects问题。这部分还提供怎样包装component的解决方案以及应用于ArcGIS。 下列步骤用来创建一个组件。 1.创建一个新的工程。 2.添加引用。 3.创建一个新类。 4.实现接口。 5.导入命名空间。 6.编写实现代码。 7.将组件插入ArcGIS Desktop中。 8.将组件编译为DLL。 9.测试/调试/重新编译。 Step 1:创建一个新的工程 设计一个新的ArcGIS桌面组件,你要创建一个新的类库(DLL)。 为工程和每个类提供有意义的名字。工程的名字将是默认的DLL的名字。当然你也可以在工程属性页上重命名。 为了在ArcGIS Desktop应用程序中使用.Net组件,要在Assembly Information 对话框中设置COM可见。 下一步是在开发时使ArcGIS桌面软件可以使用组件,在Visual Studio中编译时通过COM注册程序集。属性页的Build(C#)或Compile(https://www.doczj.com/doc/a89892905.html,)选项卡中可以设置COM Interop。 一个简单的DLL文件可以包含若干类或组件。因此为每个组件创建一个新的类库是不必要的。需要的话,可以将许多按钮、工具条和其他组件放置在一个程序集中。 ArcGIS Visual Studio IDE集成框架中的ArcGIS工程模板可以为Dektop组件自动设置工程属性。 Step 2:引用ArcObject组件 在ArcGIS桌面应用程序中使用VBA编程时,不需要明确的引用ArcObjects类库,因为大部分已经添加了引用。在独立开发环境,如Visual Studio 2005中则不同。.NET 开发时将COM对象库导入到.NET程序集中便可引用任何对象。除了标准的.Net framework assemblies外,代码中引用的任何程序集都要明确的导入到工程中。

微信接口开发教程-微信接口开发教程

微信接口开发教程-微信接口开发教 程 微信公众帐号开发教程第3篇-开发模式启用及接口配置 微信公众帐号开发教程第3篇-开发模式启用及接口配置来源:柳峰的专栏时间:2016-09-09 16:07:04 编辑模式与开发模式微信公众帐号申请成功后,要想接收处理用户的请求,就必须要在高级功能里进行配置,点击高级功能,将看到如下界面:从上图中可以看到,高级功能包含两种模式:编辑模式和开发模式,并且这两种 编辑模式与开发模式 微信公众帐号申请成功后,要想接收处理用户的请求,就必须要在“高级功

能”里进行配置,点击“高级功能”,将看到如下界面: 从上图中可以看到,高级功能包含两种模式:编辑模式和开发模式,并且这两种模式是互斥关系,即两种模式不能同时开启。那两种模式有什么区别呢?作为开发人员到底要开启哪一种呢?编辑模式:主要针对非编程人员及信息发布类公众帐号使用。开启该模式后,可以方便地通过界面配置“自定义菜单”和“自动回复的消息”。 开发模式:主要针对具备开发能力的人使用。开启该模式后,能够使用微信公众平台开放的接口,通过编程方式实现自定义菜单的创建、用户消息的接收/处理/响应。这种模式更加灵活,建议有开发能力的公司或个人都采用该模式。 启用开发模式 微信公众帐号注册完成后,默认开启的是编辑模式。那么该如何开启开发模式呢?操作步骤如下:

1)点击进入编辑模式,将右上角的编辑模式开关由“开启”切换到“关闭”,如下图所示: 2)点击高级功能进入到开发模式,将右上角的开发模式开关由“关闭”切换到“开启”,但在切换时会遇到如下提示:提示需要我们先成为开发者,才能开启开发模式。那就先点击下图所示的“成为开发者”按钮:如果提示资料不全,那就先补齐资料再回来继续操作。需要补全的资料有公众帐号头像、描述和运营地区。 待资料补全后,再次点击“成为开发者”,这时将看到接口配置信息界面,如下图所示: 这里需要填写URL和Token两个值。URL指的是能够接收处理微信服务器发送的GET/POST请求的地址,并且是已经存在的,现在就能够在浏览器访问到的地址,这就要求我们先把公众帐号后台处理程序开发好并部署在公网服务器上。Token后面会详细说明。

微信自定义菜单错误代码解决方法

公众号每次调用接口时,可能获得正确或错误的返回码,开发者可以根据返回码信息调试接口,排查错误。 全局返回码说明如下 返回码说明 -1 系统繁忙 0 请求成功 40001 获取access_token时AppSecret错误,或者access_token无效(可以重置试试)40002 不合法的凭证类型 40003 不合法的OpenID 40004 不合法的媒体文件类型 40005 不合法的文件类型 40006 不合法的文件大小 40007 不合法的媒体文件id 40008 不合法的消息类型 40009 不合法的图片文件大小 40010 不合法的语音文件大小 40011 不合法的视频文件大小 40012 不合法的缩略图文件大小 40013 不合法的APPID 40014 不合法的access_token

40016 不合法的按钮个数 40017 不合法的按钮个数 40018 不合法的按钮名字长度 40019 不合法的按钮KEY长度 40020 不合法的按钮URL长度 40021 不合法的菜单版本号 40022 不合法的子菜单级数 40023 不合法的子菜单按钮个数 40024 不合法的子菜单按钮类型 40025 不合法的子菜单按钮名字长度 40026 不合法的子菜单按钮KEY长度 40027 不合法的子菜单按钮URL长度 40028 不合法的自定义菜单使用用户 40029 不合法的oauth_code 40030 不合法的refresh_token 40031 不合法的openid列表 40032 不合法的openid列表长度 40033 不合法的请求字符,不能包含uxxxx格式的字符40035 不合法的参数 40038 不合法的请求格式

微信自定义菜单开发教程

自定义菜单开发模式详解 一、如何获取凭证(token) 话说微信的接口指南一直做得不咋地,这边鼓励大家都转服务号,这边给的说明文档除了码农真没几个能看明白的,一点也不考虑大量的小白运营者,干脆叫指北算了。 牢骚完毕先说下开发自定义菜单第一步要做的就是获取凭证,即access_token,这步非常重要,微信接下来会开放更多的开发接口,开发者要操作接口都要通过这个access_token,而这个凭证是需要通过接口来生成的,并且是有失效时间的。 生成凭证需要两个第三方的固定ID和秘钥,进入开发模式的页面,已经获取到自定义菜单接口权限的朋友会看到下图: 除了原来接口通讯url和自己设置的token多了两个新字段即Appid和AppSecret,也就是第三方的固定ID和秘钥,有了这个就能通过接口程序获取到临时的凭证。将这两个id放到代码如下图位置:

这段代码主要是初始化了memcache和curl类,分别是缓存和抓取用的,同时将ID和秘钥也赋值了。接下来就是通过接口获取token,代码如下图: 这是一个获取接口的函数,函数运行时首先是监测缓存中是否已经有token,如果有则直接从缓存中取,要知道官方限制每天只能获取100次token,所以做个

缓存很有必要。 如果缓存中没有token或者缓存时间过期,那么就使用curl这个类发送Appid 和AppSecret到接口获取token,curl_setopt是定义抓取属性的,curl_exec是运行抓取,想了解相关的可以百度一下。 获取的到是一个json格式数据,使用json_decode转化为数组,然后判断是否获取到,如果没有则输出错误信息,获取成功则将该token保存到缓存中,同时函数返回token退出。这样我们就很方便的拿到了凭证。 二、自定义菜单创建、查询和删除 拿到access_token以后我们就可以开始进行自定义菜单操作了,首先是创建自定义菜单,官方说明很简单“通过POST一个特定结构体,实现在微信客户端创建自定义菜单。”然后有一个特定结构体的示例,如下图:

微信订阅号开通自定义菜单流程

微信订阅号开通自定义菜单流程 大家都知道微信自定义菜单的好处,微信导航的功能极大的方便的各类营销活动。而订阅号每天可以发送消息,也起到了很好的推广作用。那么,订阅号如何获得自定义菜单功能呢?专业微信营销机构杰客科技指出,企业、政府、媒体、个体、个人、工作室、网站的订阅号均可帮忙开通自定义菜单接口,以下是详细流程。 ?订阅号菜单的形式 可创建最多3个一级菜单,每个一级菜单下可创建最多5个二级菜单。并且可设置订阅者点击菜单后,公众号做出的相应动作。如发送信息、跳转到网页(商品购买页面)。 ?订阅号如何开通菜单 企业、政府、媒体、个体、个人、工作室、网站的订阅号均开通自定义菜单接口,需要的资料为微信账号信息、身份证、手机、邮箱、联系地址等。将以上资料整理好发给杰客科技在线客服人员,即可帮忙开通自定义菜单功能。所需时间为3工作日左右,要求提供的照片清晰、信息准确。 ?自定义菜单设置方法 自定义菜单能够帮助公众号丰富界面,让用户更好更快地理解公众号的功能。开启自定义菜单后,公众号界面如图所示: 目前自定义菜单最多包括3个一级菜单,每个一级菜单最多包含5个二级菜单。一级菜单最多4个汉字,二级菜单最多7个汉字,多出来的部分将会以“...”代替。请注意,创建自定义菜单后,由于微信客户端缓存,需要24小时微信客户端才会展现出来。建议测试时可以尝试取消关注公众账号后再次关注,则可以看到创建后的效果。 ?菜单功能按钮 目前自定义菜单接口可实现两种类型按钮,如下: click: 用户点击click类型按钮后,微信服务器会通过消息接口推送消息类型为event的结构给开发者(参考消息接口指南),并且带上按钮中开发者填写的key值,开发者可以通过自定义的key值与用户进行交互; view:

ExcelVBA自定义菜单和菜单栏

ExcelVBA自定义菜单和菜单栏 以下是为大家整理的excelVbA自定义菜单和菜单栏的相关范文,本文关键词为excel,VbA,自定义,菜单,excel,自定义,菜单,,您可以从右上方搜索框检索更多相关文章,如果您觉得有用,请继续关注我们并推荐给您的好友,您可以在综合文库中查看更多范文。 excel自定义菜单和菜单栏excelVbA自定义菜单和菜单栏(江羽收集整理)【目录】前言................................................................................................................. ............................................................3一、简

介................................................................................................................. ...................................................3二、命令栏................................................................................................................. ..............................................4三、控件常量................................................................................................................. ..........................................4四、菜单栏................................................................................................................. ..............................................64.1ADD方法应用于commAnDbARs对象............................................................................................................64. 2返回命令栏控件的ID.................................................................................................................. .............74.3确定活动菜单栏的名称................................................................................................................. ............74.4保存(内置或自定义菜单栏的)活动状态.........................................................................................84.5创建自定义命令栏................................................................................................................. .....................84.6显示自定义命令栏................................................................................................................. .....................84.7删除自定义命令栏................................................................................................................. .....................94.8隐藏命令

微信公众号创建自定义菜单之前的准备工作

微信公众号创建自定义菜单之前的准备工作 微信公众号现在还没菜单,所以首页给我们的微信公众号创建几个菜单出来。想做出菜单,当然是通过代码来做,通过阅读微信文档发现,我们通过代码访问微信API时,会经常用到一个access_token,可以说accees_token就是我们访问API的钥匙。access_token是公众号的全局唯一票据,公众号调用各种接口时都需要使用access_token。开发者需要进行妥善保存。access_token的存储至少要保留512个 字符空间。access_token的有效期目前为2个小时,需定时刷新,重复获取将导致上次获取的access_token失效。所 以我们首先解决的问题是,如何统一地来管理我们应用中的access_token,而不是每次需要时去生成一次,因为这样会非常低效。我们提供的解决方法就是使用缓存,第一次获取到access_token后将它放到缓存里并且设置缓存的过期时 间是2个小时,然后每次需要access_token时直接去缓存 获取,如果获取不到了说明过期了,我们就重新生成一次再丢入缓存,这样基本上只需要每隔2个小时左右生成一次access_token,而且因为大部分情况下我们都是直接从缓存中获取access_token的,所以效率很高。一般的PHP框架都提供了缓存的实现,我们只要知道怎么使用就好了,因为Think-php是目前国内使用最多的PHP框架,我们打算也随

大流,使用Thinkphp来作为我们的框架。(1)在官方下载3.2.3的完整版本。(2)将解压后的文件拷贝到edu83cn项目目录下。(3)在Eclipse里面刷新项目根目录,我们就可以看到所有被复制进来的文件。(4)重启WAMP服务器, 访问edu83cn项目地址,这样在我们的application目录下 就会自动生成Common和Home目录结构,如图所示。我 们将把access_token令牌管理类放在Application下面的Home/common目录下。我们在该目录下创建一个TokenUtil.class.php的类,其命名空间就是Home\Controller。增加一个静态方法fetchToken(),其目的就是判断缓存中 是否存在token,存在则返回,不存在则先获取保存到缓存中。ThinkPHP默认的缓存是文件缓存,默认情况下缓存数 据永不失效。在配置文件convention.php里面可以查看到,如图所示。我们来看看fetchToken()的实现代码,如图 所示。 代码很少但是完成的功能却很多,这也是PHP的一个优点。上面的代码中,我们省略了具体的获取最新Token的代码部分,因为它需要调用微信API来做,而调用微信API也需要做一个封装,所以放到后面统一来说。我们分析一下后台代码和微信平台之间的所有关联,发现有2种类型的交互:第1种就是当用户在手机端点击微信公众号而触发的各种动作,这种类型的交互是由用户发起,经过微信平台转发给我们的

微信公众平台创建自定义菜单

微信公众平台如何创建自定义菜单? 方法/步骤 1 1. 登录【微信公众平台】,选择【功能】菜单下面的【高级功能】,进入【开发模式】。 2 2. 由于小编的微信公众平台还没通过认证,下面用【申请测试账户】为大家演示。

3 3. 微信公众平台接口测试帐号申请,无需公众帐号、快速申请接口测试号,直接体验和测试公众平台所有高级接口,直接用微信扫描左边的二维码。 4. 手机扫描后弹出【应用登录】,即将登录公众平台测试账户系统,确认即可。

5. 微信公众平台跳转到【管理测试号】页面,测试号有效期一年,这里有2个比较有用的信息,appID和appsecret,等一下调试接口需要用到。 6. 【管理测试号】页面往中间部分,有个【测试号二维码】,找用直接的个人微信扫描二维码就可以关注我们的测试平台了。

7. 【管理测试号】页面最后部分,是不是看到我们想要的接口了,那就是【会话界面自定义菜单】。 8. 点击进入【公众平台开发者文档】下的【自定义菜单创建接口】,当然这个文档我看了很多遍,都是没明白怎么弄。 9. 回到文档的最底部,有一个【使用网页调试工具调试该接口】链接,直接进去。

10. 进入【微信公众平台接口调试工具】,一接口类型:自定义菜单;二接口列表:自定义菜单创建接口/menu/create,三参数列表里面有2个带红色星号值是要我们必须填写的,即access_token和body。 11. 获取access_token(调用接口凭证),也是在本页【微信公众平台接口调试工具】获取,一接口类型:基础支持;二接口列表:获取access_token接口/token;三参数列表:grant_type不用管,appid和secret就是功能申请测试号叫大家记下的,也可以去管理测试号复制,填写好,按【检查问题】,请求成功,橙色字母就是我们想要的access_token。

配置自定义菜单必看

配置自定义菜单必看 微信自定义菜单就是在微信公众帐号上的一个强大的功能,并且只有微信公众服务号和订阅号才有的功能。 什么是微信自定义菜单 微信自定义菜单其实就是和网站的导航一个意思,可以快速通过自定义菜单的链接找到你想要了解或者查询的信息。 微信服务号在申请成功之后就可以直接拥有微信自定义菜单,可以在微信公众平台的“编辑模式”或“开发模式”进行开启。 自定义菜单的作用 我们知道了自定义菜单是微信公众号的强大功能了,可是它究竟在微信营销中发挥了怎样的作用呢?要开微信公众号的朋友们要不要做好这个微信自定义菜单呢?以赛风微赢微信营销平台的经验来讲,微信自定义菜单接口可实现两种类型按钮: 1、Click(点击事件)

2、View(浏览网页,第一期功能只开放了 Click 事件) 用户点击 View 类型按钮后,即可浏览网页。微信自定义菜单”功能实现以后,使用户有更加便捷的方式与企业进行“简单的对话式”交互。增加了微信自 定义菜单后,原有的公众账号瞬间变身一个完整的APP。这不但是从功能上如此定义,从实际的操作体验上,真的就像是在操作一个独立APP,只不过这个APP在外层嵌套着微信的一个壳。这已可算出超出用户的体验期待了。 如何创建自定义菜单 知道了这么多,我们还没了解自定义菜单应该怎么配置呢,有一定技术和时间的老板都可以自己内部完成,而如果你没有这种精力,也可以找赛风微赢等的第三方帮忙配置。下面用赛风微赢测试账户为大家演示。 首先,登录微信公众平台,选择功能菜单下面的高级功能,进入开发模式。 微信公众平台接口测试帐号申请,无需公众帐号、快速申请接口测试号,直接体验和测试公众平台所有高级接口,直接用微信扫描左边的二维码。 然后,手机扫描后弹出应用登录,即将登录公众平台测试账户系统,确认即可。 微信公众平台跳转到管理测试号页面,测试号有效期一年,这里有2个比较有 用的信息,appID和appsecret,等一下调试接口需要用到。

公众号调用接口限制

公众号调用接口并不是无限制的。为了防止公众号的程序错误而引发微信服务器负载异常,默认情况下,每个公众号调用接口都不能超过一定限制,当超过一定限制时,调用对应接口会收到如下错误返回码: {"errcode":45009,"errmsg":"api freq out of limit"} 各接口调用频率限制如下: 接口每日限额 获取access_token 2000 自定义菜单创建1000 自定义菜单查询10000 自定义菜单删除1000 创建分组1000 获取分组1000 修改分组名1000 移动用户分组100000 上传多媒体文件5000 下载多媒体文件10000 发送客服消息500000

高级群发接口100 上传图文消息接口10 删除图文消息接口10 获取带参数的二维码100000 获取关注者列表500 获取用户基本信息5000000 获取网页授权access_token 无 刷新网页授权access_token 无 网页授权获取用户信息无 设置用户备注名10000 请注意,在测试号申请页中申请的测试号,接口调用频率限制如下: 接口每日限额获取access_token 200 自定义菜单创建100 自定义菜单查询1000 自定义菜单删除100 创建分组100

获取分组100 修改分组名100 移动用户分组1000 素材管理-临时素材上传500 素材管理-临时素材下载1000 发送客服消息50000 获取带参数的二维码10000 获取关注者列表100 获取用户基本信息500000 获取网页授权access_token 无 刷新网页授权access_token 无 网页授权获取用户信息无

微信开发模式api接口文档简介

微信开发模式api接口文档简介 微信公众平台分为订阅号和服务号,服务号提供9大接口,需要通过微信认证后才能使用这些接口。认证费用300元。下面是接口的大致介绍: 1. 语音识别:通过语音识别接口,用户发送的语音,将会同时给出语音识别出的文本内容。 2. 客服接口:通过客服接口,公众号可以在用户发送过消息的24小时内,向用户回复消息。 3. OAuth2.0网页授权:通过网页授权接口,公众号可以请求用户授权。 4. 生成带参数二维码:通过该接口,公众号可以获得一系列携带不同参数的二维码,在用户扫描关注公众号后,公众号可以根据参数分析各二维码的效果。 5. 获取用户地理位置:通过该接口,公众号能够获得用户进入公众号会话时的地理位置(需要用户同意)。 6. 获取用户基本信息:通过该接口,公众号可以根据加密后的用户OpenID,获取用户的基础信息,包括头像、昵称、性别、地区。 7. 获取关注者列表:通过该接口,公众号可以获取所有关注者的OpenID。 8. 用户分组接口:通过分组接口,公众号可以在后台为用户移动分组,或创建、修改分组。 9. 上传下载多媒体文件:通过该接口,公众号可以在需要时在微信服务器上传下载多媒体文件。 微信公众平台开发模式对于很多人来说还是很难理解,毕竟是代码问题,这份资料,面对的主要也是有编程经验的。对于只会编辑模式的人来说。阅读会有点困难。我们现在就一起来了解一下吧! 1?文本类型息 接口获取到的消息格式: 这类信息是微信公众平台接收到的最多的消息。即用户向微信公众帐号发送文本信息。消息格式为: 文本消息的数据字段: ToUserName:开发者微信号(公众账号ID) FromUserName:发送方帐号(微信用户的OPENID,每个微信用户与每个公众账号是唯一的,不同公众账号同个用户OPENID是不同的) CreateTime:消息创建时间 MsgType:消息类型(文本消息为text) Content:消息内容 MsgId:消息的ID号 2?图文类型 用户使用图片上传发送消息 接口获取到的消息格式: 图片消息与文本消息数据不同: MsgType:消息类型为image PicUrl:图片链接,该图片保存在微信的服务器上,可以通过远程抓取图片程序保存到本地。3??LBS,用户发送地理位置功能,常用在饮食类等本地的微信公众帐号 接口获取到的消息格式: 地理位置消息与文本消息数据不同:

微信公众平台开发接口

微信公众平台开发接口 一、消息接口 二、通用接口 三、自定义菜单接口 四、使用限制 五、返回码说明

消息接口指南 返回 出自开放平台 跳转到:导航, 搜索 目录 [隐藏] ? 1 简介 ? 2 申请消息接口 ? 3 网址接入 ? 4 消息推送 o 4.1 文本消息 o 4.2 图片消息 o 4.3 地理位置消息 o 4.4 链接消息 o 4.5 事件推送 ? 5 消息回复 o 5.1 回复文本消息 o 5.2 回复音乐消息 o 5.3 回复图文消息 ? 6 注意事项 ?7 示例代码 简介 公众平台消息接口为开发者提供了一种新的消息处理方式。 申请消息接口 点击申请,填写网址url和token,其中token可由开发者可以任意填写,用作生成签名。

网址接入 公众平台用户提交信息后,微信服务器将发送GET请求到填写的URL上,并且带上四个参数: 开发者通过检验signature对请求进行校验(下面有校验方式)。若确认此次GET请求来自微信服务器,请原样返回echostr参数内容,则接入生效,否则接入失败。 signature结合了开发者填写的token参数和请求中的timestamp参数、nonce 参数。

加密/校验流程: 1. 将token、timestamp、nonce三个参数进行字典序排序 2. 将三个参数字符串拼接成一个字符串进行sha1加密 3. 开发者获得加密后的字符串可与signature对比,标识该请求来源于微信 消息推送 当普通微信用户向公众账号发消息时,微信服务器将POST该消息到填写的URL 上。结构如下: 文本消息 1348831860 1234567890123456 图片消息 1348831860

使用公众平台接口进行开发

使用公众平台接口进行开发 使用公众平台的开发接口,公众号可在自身服务器上接收用户的微信消息,并可按需回复。此外,我们还提供了更多更高级的功能和体验,如会话界面的自定义菜单、获取更多类型的消息等。 消息接口指南 返回 出自开放平台 跳转到:导航, 搜索 目录 [隐藏] ? 1 简介 ? 2 申请消息接口 ? 3 网址接入 ? 4 消息推送 o 4.1 文本消息 o 4.2 图片消息 o 4.3 地理位置消息 o 4.4 链接消息 o 4.5 事件推送 ? 5 消息回复 o 5.1 回复文本消息 o 5.2 回复音乐消息 o 5.3 回复图文消息 ? 6 注意事项 ?7 示例代码 简介

公众平台消息接口为开发者提供了一种新的消息处理方式。 申请消息接口 点击申请,填写网址url和token,其中token可由开发者可以任意填写,用作生成签名。 网址接入 公众平台用户提交信息后,微信服务器将发送GET请求到填写的URL上,并且带上四个参数:

开发者通过检验signature对请求进行校验(下面有校验方式)。若确认此次GET请求来自微信服务器,请原样返回echostr参数内容,则接入生效,否则接入失败。 signature结合了开发者填写的token参数和请求中的timestamp参数、nonce 参数。 加密/校验流程: 1. 将token、timestamp、nonce三个参数进行字典序排序 2. 将三个参数字符串拼接成一个字符串进行sha1加密 3. 开发者获得加密后的字符串可与signature对比,标识该请求来源于微信 消息推送 当普通微信用户向公众账号发消息时,微信服务器将POST该消息到填写的URL 上。结构如下: 文本消息 1348831860 1234567890123456

相关主题
相关文档 最新文档