我目前正在与OpenModelica合作,以实现机器人系统的动态模型,并且由于一些物理限制,我希望实现关节限制。我有点迷路了,因为我没有找到一个合适的解决方案:假设我有两个链接连接到一个旋转关节(例如,MSL中的DoublePendulum示例),关节的无限旋转将导致链接的碰撞。我如何模拟一些关节限制,以便限制转速关节的角度,使其保持在-pi/2和+pi/2之间?
此外,有没有办法将碰撞属性实现到我的模型的组件上?到目前为止,我所看到的大多数多主体示例模型都让主体相互渗透。
发布于 2021-11-10 15:16:29
Modelica.Mechanics.MultiBody中没有冲突检测功能,因此添加它并不简单。
对于特殊情况,是否可以选择使用Modelica.Mechanics.Rotational.Components.ElastoBacklash作为角度限制?这显然会变得更加困难,即使“只”有一个双摆,但使用Modelica.Mechanics.Translational.Components.ElastoGap也应该有一个平移限制。
一个示例(从MSL的双摆修改而来),它将摆的运动限制为y轴上的负值:
model LimitedPendulum
extends Modelica.Icons.Example;
inner Modelica.Mechanics.MultiBody.World world annotation (Placement(
transformation(extent={{-100,-10},{-80,10}})));
Modelica.Mechanics.MultiBody.Joints.Revolute revolute1(useAxisFlange=true,
phi(fixed=true, start=-1.5707963267949),
w(fixed=true, start=10))
annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
Modelica.Mechanics.Rotational.Components.ElastoBacklash elastoBacklash(
c=1e6,
d=10,
b=3.1415926535898,
phi_rel0=-1.5707963267949)
annotation (Placement(transformation(extent={{-60,30},{-40,50}})));
Modelica.Mechanics.MultiBody.Parts.BodyBox boxBody1(r={0.5,0,0}, width=0.06)
annotation (Placement(transformation(extent={{-20,-10},{0,10}})));
equation
connect(elastoBacklash.flange_b, revolute1.axis) annotation (Line(points={{-40,40},{-40,20},{-50,20},{-50,10}}));
connect(revolute1.support, elastoBacklash.flange_a) annotation (Line(points={{-56,10},{-56,20},{-60,20},{-60,40}}));
connect(revolute1.frame_b, boxBody1.frame_a)
annotation (Line(
points={{-40,0},{-20,0}},
color={95,95,95},
thickness=0.5));
connect(world.frame_b, revolute1.frame_a)
annotation (Line(
points={{-80,0},{-60,0}},
color={95,95,95},
thickness=0.5));
annotation (
experiment(StopTime=3),
uses(Modelica(version="4.0.0")));
end LimitedPendulum;https://stackoverflow.com/questions/69915491
复制相似问题