drake - 如何防止重力加速地平面?
问题描述
sdf
我目前有一个带有以下标签的格式定义的地平面
<static>true</static>
<gravity>false</gravity>
在我的源文件中,我指定
plant.AddForceElement<UniformGravityFieldElement>();
问题:
<static>
和<gravity>
标签是否受到尊重?还是这GravityFieldElement
会影响一切?- 如果标签不被尊重,我如何防止
GravityFieldElement
加速我的地平面?
解决方案
添加地平面的一种方法是
Vector3<double> normal_W(0, 0, 1);
Vector3<double> point_W(0, 0, 0);
const CoulombFriction<double> surface_friction(
0.8 /* static friction */, 0.3 /* dynamic friction */);
// A half-space for the ground geometry.
plant.RegisterCollisionGeometry(
plant.world_body(), HalfSpace::MakePose(normal_W, point_W),
HalfSpace(), "collision", surface_friction);
// Add visual for the ground.
plant.RegisterVisualGeometry(
plant.world_body(), HalfSpace::MakePose(normal_W, point_W),
HalfSpace(), "visual");
之后plant.Finalize()
plant.set_penetration_allowance(0.001);
虽然我非常想知道是否有办法通过sdf
推荐阅读
- spring - HazelCast 我无法从缓存中获取数据
- d3.js - 与D3的数据关系图
- boto3 - 尝试使用 aws-cdk 向 s3 日志交付组授予完整权限
- r - 如何在 R 中合并多个 netcdf 文件并打开它 Arc Map?
- vue.js - 如何将数据“加载”到 Vue 组件中?
- python - 在 Telebot @bot.message_handler() 中运行,即使它保存在 if 语句中
- android - React Native 应用程序在前台方面滞后
- python-3.x - 如何在 AWS Elastic Beanstalk 上设置 Ray(分布式编程框架)和 Flask 应用程序?
- python - 无法使用 __str__ 显示数据
- python - 在线程中处理不同的任务