热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

CS545:IntroductiontoRobotics

CS545:IntroductiontoRoboticsFall2019HW3:InverseKinematicsInthisassignment,youwillcomputenu


CS 545: Introduction to Robotics Fall 2019
HW 3: Inverse Kinematics
In this assignment, you will compute numerically the inverse kinematics of a planar
robot with n = 3 rotational joints. Specifically, our goal is to compute the joint-positions
that bring the end-effector to a desired position pd. In this exercise we will ignore
the orientation of the end-effector. We will formulate the problem as an optimization
program as follows:
minimize qkFK(q) − pdk2
subject to li ≤ qi ≤ ui, i = {1, . . . , n}.
The objective is to find the values of the joints q that minimize the difference between
the actual position of the end-effector computed using the forward kinematics FK(q),
and the desired position pd, subject to the joint limits li, ui.
1. First, implement the forward kinematics function in the file fk.py. The function
should receive the joint values q and the lengths of the 3 links L, and it should
return the position of the robot’s end-effector. Report the results for the following
values:
(a) q = [0.0, 0.0, 0.0], L = [1.0, 1.0, 1.0]
(b) q = [0.3, 0.4, 0.8], L = [0.8, 0.5, 1.0]
(c) q = [1.0, 0.0, 0.0], L = [3.0, 1.0, 1.0]
Hint: Express the pose of the first link relative to the reference frame using a rigid
transform with an elementary rotation about the z-axis, then the pose of the second
link relative to the first link and so on up to the end-effector.
2. For the inverse kinematics computation, you will use the scipy.optimize package.1
We will numerically compute a solution through the following function call:
solution = minimize(objective, q0, method=‘SLSQP’, bounds=bnds)
CS 545: Introduction to Robotics Fall 2019
objective refers to the objective function that the optimizer attempts to minimize.
q0 is the initial vector of values and bounds specify the range of allowable values.
The scipy.minimize function has problems handling type promotion, so make
sure all your numerical values are of type np.float64.
We specify the following parameters for the IK problem:
pd = [0.1, 1.33, 0.0], L = [0.7, 1.0, 1.0], q0 = [0, 0, 1.86],(li
, ui) = (−π, π) ∀i
We provide the file ik-a.py, which includes also code for plotting. The initial con-
figuration of the robot should show up as follows, with the base of robot in red
and the desired end-effector position in green. To compute the inverse kinematics,
fill in the objective function. Visualize the result with the given plotting function,
and save as ik-a solution.png.
Figure 1: Example visualization. A solution state should result
in the arm touching the green sphere.
3. You will now add an obstacle that the robot should avoid. You will approximate the
obstacle with a sphere, with circle c = (cx, cy, cz) and radius r. To detect whether
the robot collides with the obstacle, the easiest way is to implement a line-sphere
2
CS 545: Introduction to Robotics Fall 2019
intersection algorithm2
. If there is no real solution, then there is no intersection
between a line and the sphere. In the provided file collision.py, fill in the function
line sphere intersection. It should implement the algorithm and return the
value under the square-root (the discriminant).
4. To ensure that the robot does not collide with the obstacle, we will add three obstacle
CS 545作业代写、代做Robotics留学生作业

collision constraints, one for each robot link. The constraints are provided
as input to the optimization algorithm, as shown in the provided file ik-b.py. Fill
in the code for the constraints, using the collision detection algorithm from the
previous exercise. The parameters for the collision sphere are as follows:
c = (0.6, 0.5, 0),r = 0.2
Note that if the constraints are satisfied, they should return a non-negative value.
Using the following parameters for the obstacle, solve and visualize the solution.
Save your visualization as ik-b solution.png.
5. Try increasing the radius of the obstacle r. What do you observe? Also experiment
with different starting configurations q0. Discuss the results in a file named
answers.pdf.

因为专业,所以值得信赖。如有需要,请加QQ99515681 或邮箱:99515681@qq.com 

微信:codehelp

CS 545: Introduction to Robotics


推荐阅读
  • IjustinheritedsomewebpageswhichusesMooTools.IneverusedMooTools.NowIneedtoaddsomef ... [详细]
  • 本文介绍了如何使用n3-charts绘制以日期为x轴的数据,并提供了相应的代码示例。通过设置x轴的类型为日期,可以实现对日期数据的正确显示和处理。同时,还介绍了如何设置y轴的类型和其他相关参数。通过本文的学习,读者可以掌握使用n3-charts绘制日期数据的方法。 ... [详细]
  • Introduction(简介)Forbeingapowerfulobject-orientedprogramminglanguage,Cisuseda ... [详细]
  • 本文讨论了在openwrt-17.01版本中,mt7628设备上初始化启动时eth0的mac地址总是随机生成的问题。每次随机生成的eth0的mac地址都会写到/sys/class/net/eth0/address目录下,而openwrt-17.01原版的SDK会根据随机生成的eth0的mac地址再生成eth0.1、eth0.2等,生成后的mac地址会保存在/etc/config/network下。 ... [详细]
  • Whatsthedifferencebetweento_aandto_ary?to_a和to_ary有什么区别? ... [详细]
  • HashMap的相关问题及其底层数据结构和操作流程
    本文介绍了关于HashMap的相关问题,包括其底层数据结构、JDK1.7和JDK1.8的差异、红黑树的使用、扩容和树化的条件、退化为链表的情况、索引的计算方法、hashcode和hash()方法的作用、数组容量的选择、Put方法的流程以及并发问题下的操作。文章还提到了扩容死链和数据错乱的问题,并探讨了key的设计要求。对于对Java面试中的HashMap问题感兴趣的读者,本文将为您提供一些有用的技术和经验。 ... [详细]
  • 本文总结和分析了JDK核心源码(2)中lang包下的基础知识,包括常用的对象类型包和异常类型包。在对象类型包中,介绍了Object类、String类、StringBuilder类、StringBuffer类和基本元素的包装类。在异常类型包中,介绍了Throwable类、Error类型和Exception类型。这些基础知识对于理解和使用JDK核心源码具有重要意义。 ... [详细]
  • 深入理解Java虚拟机的并发编程与性能优化
    本文主要介绍了Java内存模型与线程的相关概念,探讨了并发编程在服务端应用中的重要性。同时,介绍了Java语言和虚拟机提供的工具,帮助开发人员处理并发方面的问题,提高程序的并发能力和性能优化。文章指出,充分利用计算机处理器的能力和协调线程之间的并发操作是提高服务端程序性能的关键。 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • 本文分享了一个关于在C#中使用异步代码的问题,作者在控制台中运行时代码正常工作,但在Windows窗体中却无法正常工作。作者尝试搜索局域网上的主机,但在窗体中计数器没有减少。文章提供了相关的代码和解决思路。 ... [详细]
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • Webpack5内置处理图片资源的配置方法
    本文介绍了在Webpack5中处理图片资源的配置方法。在Webpack4中,我们需要使用file-loader和url-loader来处理图片资源,但是在Webpack5中,这两个Loader的功能已经被内置到Webpack中,我们只需要简单配置即可实现图片资源的处理。本文还介绍了一些常用的配置方法,如匹配不同类型的图片文件、设置输出路径等。通过本文的学习,读者可以快速掌握Webpack5处理图片资源的方法。 ... [详细]
  • 开发笔记:加密&json&StringIO模块&BytesIO模块
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了加密&json&StringIO模块&BytesIO模块相关的知识,希望对你有一定的参考价值。一、加密加密 ... [详细]
  • 本文讨论了微软的STL容器类是否线程安全。根据MSDN的回答,STL容器类包括vector、deque、list、queue、stack、priority_queue、valarray、map、hash_map、multimap、hash_multimap、set、hash_set、multiset、hash_multiset、basic_string和bitset。对于单个对象来说,多个线程同时读取是安全的。但如果一个线程正在写入一个对象,那么所有的读写操作都需要进行同步。 ... [详细]
  • 本文介绍了Python语言程序设计中文件和数据格式化的操作,包括使用np.savetext保存文本文件,对文本文件和二进制文件进行统一的操作步骤,以及使用Numpy模块进行数据可视化编程的指南。同时还提供了一些关于Python的测试题。 ... [详细]
author-avatar
手机用户2502887971_699
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有