我正在尝试在一个带有浮动基座的手臂上使用德雷克的逆向动力控制器,基于this discussion,似乎最直接的方法是使用两个独立的设备,因为控制器只支持完全驱动的系统。
在Python bindings error when adding two plants to a scene graph in pyDrake之后,我尝试使用以下代码创建两个工厂:
def register_plant_with_scene_graph(scene_graph, plant):
plant.RegsterAsSourceForSceneGraph(scene_graph)
builder.Connect(
plant.get_geometry_poses_output_port(),
scene_graph.get_source_pose_port(plant.get_source_id()),
)
builder.Connect(
scene_graph.get_query_output_port(),
plant.get_geometry_query_input_port(),
)
builder = DiagramBuilder()
scene_graph = builder.AddSystem(SceneGraph())
plant_1 = builder.AddSystem(MultibodyPlant(time_step=0.0))
register_plant_with_scene_graph(scene_graph, plant_1)
plant_2 = builder.AddSystem(MultibodyPlant(time_step=0.0))
register_plant_with_scene_graph(scene_graph, plant_2)
它产生了这个错误
AttributeError: 'MultibodyPlant_[float]' object has no attribute 'RegsterAsSourceForSceneGraph'
这似乎很奇怪,因为根据文档,the function should exist。
此函数在drake的python绑定中可用吗?此外,更广泛地说,这是在自由浮动机械手上使用逆动力学控制器的正确方法吗?
发布于 2021-12-01 10:17:44
逆动力学采用所需的位置、速度和加速度,并计算所需的力矩。如果你的机器人有一个浮动的基座,那么你就不能接受任意的加速命令。例如,机器人的总质心将根据重力下降;任何不满足这一要求的加速度都不会有逆动力学的可行解。我认为关于你的问题表述,我们一定还需要了解更多的东西。
通常,当人们问这个问题时,他们想到的是一个机器人,它除了广义力/扭矩之外,还依靠接触力来实现所要求的加速度。在这种情况下,问题也需要包括这些接触力作为决策变量。由于接触力具有单边约束(例如,脚不能在地面上拉动)和摩擦锥体约束,因此此动力学逆问题几乎总是以二次规划的形式表示。例如,在this paper中。我们目前没有在Drake中提供QP公式,但是在MathematicalProgram
接口上编写它并不难。我们确实有一些从Drake中删除的旧代码(因为它不是积极开发的),如果有帮助,我们可以向您指出。
https://stackoverflow.com/questions/70188461
复制