英文:
Fixing certain positions in a MultiBodyPlant in Drake
问题
我有一个包含6自由度机器人和一个静止的2自由度障碍物的MultibodyPlant
。该植物的位置向量是8维的[object_x_offset, object_y_offset, robot_joint_1, ..., robot_joint_6]
。
对于像IrisInConfigurationSpace
这样的任务来说,这非常方便,因为我现在可以在障碍物周围生成无碰撞区域,而其姿态可以在运行时确定。当我定位障碍物时,我可以简单地通过在已知的[object_x, object_y]
坐标处对每个8维凸区域进行6维切片来减少维度。
然而,对于使用Drake的轨迹规划算法来说,这是不方便的,因为它们会假设[object_x, object_y]
坐标可以被控制。我发现自己需要手动添加线性约束到MathematicalProgram
中以固定这些坐标。
相反,我想要一种方法来创建一个相关的MultibodyPlant
,其.num_positions() == 6
,并将前两个坐标固定为我选择的某些数字。有没有简单的方法可以实现这个?
英文:
I have a MultibodyPlant
containing a 6-dof robot, and a stationary 2-dof obstacle. The plant's positions vector is 8-dimensional [object_x_offset, object_y_offset, robot_joint_1, ..., robot_joint_6]
.
This is very convenient for something like IrisInConfigurationSpace
where I can now generate collision free regions around an obstacle, whose pose I can leave undetermined until runtime. When I localize the obstacle, I can simply take each 8-dimensional convex region down 6-dimensions by slicing it at the known [object_x, object_y]
coordinates.
However, this is inconvenient for using Drake's trajectory planning algorithms, which will assume that the [object_x, object_y]
coordinates can be controlled. I find myself manually adding linear constraints into the MathematicalProgram
to fix these coordinates.
Instead, I would like a way to create a related MultibodyPlant
, whose .num_positions() == 6
that calls down to my original plant with the first two coordinates fixed to some numbers of my choosing.
Is there an easy way to do this?
答案1
得分: 1
我们已经讨论了很长时间关于给MultibodyPlant
添加更多实质性的“重建”功能。参见此问题以获取更多信息。
但是,我今天推荐的工作流程是对模型进行两次解析——一次包括操纵物(用于IRIS等),第二次只用于trajopt。这也是一种常见的控制工作流程...例如,ManipulationStation示例是这样工作的。
在我看来,拥有多个世界模型是非常合理的...物理引擎有一个模型,而机器人控制器/规划器有一个不同的模型。我认为重新建模现有的MultibodyPlants会更加人性化,但只需通过解析器单独加载每个模型也不太困难。
英文:
We've had discussions for a long time about adding more substantial "remodeling" capabilities to MultibodyPlant
. See this issue, for some reading.
But the workflow I would recommend today would be to parse the model twice -- once including the manipuland (for IRIS, etc), and a second time for just the trajopt. That's a common workflow for control, too... for instance, the ManipulationStation examples work this way.
In my view, it is very reasonable to have multiple models of the world... the physics engine has one model and the robot controller / planner has a different model. I do think it would be more ergonomic to be able to remodel existing MultibodyPlants, but don't think it's too hard to just load each one separately through the parser.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论