简体   繁体   English

如何在其中包含自由体对象的上下文中使用 KinematicTrajectoryOptimization?

[英]How to use KinematicTrajectoryOptimization in a context which has free body objects in it?

We are trying to use KinematicTrajectoryOptimization to optimize our trajectory for basic pick and place.我们正在尝试使用 KinematicTrajectoryOptimization 来优化基本拾取和放置的轨迹。 We are using 8th notebook provided by Russ Tedrake as a reference Deepnote .我们使用 Russ Tedrake 提供的第 8 笔记本作为参考Deepnote Normally, they do not have a free body object in the examples.通常,它们在示例中没有自由体 object。 But, we need an object on the space as well.但是,我们还需要空间上的 object。 Hence, we added an urdf model to use as a brick.因此,我们添加了一个 urdf model 用作砖块。 However, after adding that box to the plant, obviously, the context dimensions change.然而,在将该框添加到工厂之后,显然,上下文维度发生了变化。 With that change, it raises the following exception:通过该更改,它引发了以下异常:

SystemExit: Failure at systems/trajectory_optimization/kinematic_trajectory_optimization.cc:351 in AddVelocityBounds(): condition 'lb.size() == num_positions()' failed.


/shared-libs/python3.8/py-core/lib/python3.8/site-packages/IPython/core/interactiveshell.py:3386: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.


warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)

Is there a solution for that problem?这个问题有解决方案吗? It is probably because of additional quarternion.这可能是因为额外的四分之一。

Thanks in advance.提前致谢。

I agree with your analysis;我同意你的分析; if you have the extra body that num_positions() will increase by 7 (for x,y,z + quaternion).如果你有额外的身体,num_positions() 将增加 7(对于 x、y、z + 四元数)。 You can adjust add elements to your lower and upper bounds accordingly when calling Add*Bounds() -- infinite limits are fine.您可以在调用 Add*Bounds() 时相应地调整添加元素到您的下限和上限——无限限制很好。

As the documentation says, the velocities in the optimization (eg for AddVelocityBounds) will correspond to qdot, not v. The multibodyplant, on the other hand will use angular velocity in the state in place of qdot for the quaternion.正如文档所说,优化中的速度(例如,对于 AddVelocityBounds)将对应于 qdot,而不是 v。另一方面,多体植物将使用 angular 速度在 state 中代替四元数的 qdot。 You'll have to map between them yourself (eg using MapVelocityToQdot ).您必须自己在它们之间使用 map(例如使用MapVelocityToQdot )。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 哪种编程语言在其正式规范中具有非常短的无上下文语法? - Which programming language has very short context-free Grammar in its formal specification? 大家好,如何将单元格值从 1excel 文件复制到 excel 文件,该文件受密码保护并且有一些单元格不受保护且可免费使用 - Hi All, how to copy cells value from 1excel file to an excel file which is Password protected and has some cells which are unprotected & free to use 如何获取带有 .eml 附件的邮件正文? - How to Get Mail Body which has .eml attachment? 如何在处理数千封电子邮件时内存不足的 Outlook 中释放 COM 对象的内存? - How to free memory of COM objects in Outlook, which runs out of memory when processing several thousand emails? 如何设置一个有选择的字符域 django 或使用哪个小部件? - How to style a charfield which has choices in it django or which widget to use? 如何解析上下文无关语法中的特殊字符? - How to parse the special character in Context Free Grammar? 哪个python网络框架可轻松进行开发和部署? - Which python web framework has hassle-free development and deployment? 如何破坏Python对象并释放内存 - How to destroy Python objects and free up memory 如何删除对象以增加python中的可用内存? - How to delete objects to increase free memory in python? 有分页的web页面如何使用playwright和beautifulsoup? - How to use playwright and beautifulsoup on web page which has pagination?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM