필터 지우기
필터 지우기

Add collission geometry to prismatic joint

조회 수: 3 (최근 30일)
Lukas Schroth
Lukas Schroth 2022년 5월 1일
댓글: Lukas Schroth 2022년 5월 25일
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