Add collission geometry to prismatic joint

4 次查看(过去 30 天)
Hey all,
I need to add collision meshes to my robot which has one prismatic degree of freedom.
Is there any possibility to add a colission Mesh to the Body that "expands" with the prismatic joint. If I add one to the corresponding body it cannot cover the whole arm when it is extended.
Any Ideas or workarounds are welcome, thanks in advance!!
Yours,
Lukas
  2 个评论
Karsh Tharyani
Karsh Tharyani 2022-5-2
Hi Lukas,
Correct me if I am wrong, but are you looking for a deformable collision geometry on a rigid body?
Karsh
Lukas Schroth
Lukas Schroth 2022-5-2
Hi Karsh,
Yes exactly, or another possibility to use colission checking in case of an prismatic joint.

请先登录,再进行评论。

回答(1 个)

Karsh Tharyani
Karsh Tharyani 2022-5-2
编辑:Karsh Tharyani 2022-5-2
Hi Lukas,
A rigid body, by definition, can't deform, hence it doesn't have a deformable collision geometry. A prismatic joint (specified via a "rigidBodyJoint") defines a constraint on the relative motion between two bodies, and doesn't actually hold a collision geometry.
You can add a collision geometry on a body, and self-collisions will be ignored between bodies on adjacent indices. Please refer to the following example which demonstrates planning for a rigid body tree with a prismatic and a revolute joint using "manipulatorRRT".
%% An example rigid body tree
rbt=twoJointRigidBodyTree("row");
body2=getBody(rbt,"body2");
prismaticjnt=rigidBodyJoint("j1","prismatic");
prismaticjnt.JointAxis=[1,0,0];
setFixedTransform(prismaticjnt,trvec2tform([0.5,0,0]));
replaceJoint(rbt,"body2",prismaticjnt);
addCollision(body2,"cylinder",[0.01,0.5],trvec2tform([0.25,0,0])*eul2tform([0,pi/2,0]));
body1=getBody(rbt,"body1");
addCollision(body1,"cylinder",[0.01,0.5],trvec2tform([0.25,0,0])*eul2tform([0,pi/2,0]));
show(rbt,"Collisions","on");
%% Add an obstacle to the environment
sphere=collisionSphere(0.1);
sphere.Pose=trvec2tform([0.7,0.7,0.1]);
env={sphere};
%% Plan between two joint configurations
planner=manipulatorRRT(rbt,env);
plannedpath=plan(planner,[0,0],[pi/2,-0.5]);
interpolatedPlan=interpolate(planner,plannedpath);
%% Visualize planned path
hold on;
show(env{1});
view([0,90])
for i = 1:size(interpolatedPlan,1)
show(rbt,interpolatedPlan(i,:),"Collisions","on","FastUpdate",true,"PreservePlot",false);
drawnow;
end
hold off;
I hope the above answers your query.
If you have a specific use case where deformable collision geometries are required, please don't hesitate to reach Technical Support and share your use case.
Best,
Karsh

类别

Help CenterFile Exchange 中查找有关 Assembly 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by