机器人碰撞检测——检测碰撞状态

最后一步,检测到两个碰撞。可视化这些配置以进一步研究。

使用exampleHelperHighlightCollisionBodies函数来基于索引突出显示主体。

可以看到一个碰撞发生在球体和桌子上。

collidingIdx1 = find(inCollision,1);
collidingIdx2 = find(inCollision,1,"last");

% Identify the colliding rigid bodies.
collidingBodies1 = worldCollisionPairIdx{collidingIdx1}*[1 0]';
collidingBodies2 = worldCollisionPairIdx{collidingIdx2}*[1 0]';

% Visualize the environment.
ax = exampleHelperVisualizeCollisionEnvironment(worldCollisionArray);

% Add the robotconfigurations & highlight the colliding bodies.
show(robot,q(:,collidingIdx1),"Parent",ax,"PreservePlot",false);
exampleHelperHighlightCollisionBodies(robot,collidingBodies1 + 1,ax);
show(robot,q(:,collidingIdx2),"Parent"',ax);
exampleHelperHighlightCollisionBodies(robot,collidingBodies2 + 1,ax);

机器人碰撞检测——检测碰撞状态

 

上一篇:/opt/ros/kinetic/lib/moveit_ros_move_group/move_group: error while loading share libraries:XX.so.x.x


下一篇:Day4.(每日一题)B. Buggy Robot(C语言)