function dobsdot = findDerDobs(robo)
dobsdot = [0;0];
global world; % world with obstacles
noOfObs = size(world,1);
% find der. to bounding sphere
% position of the bounding sphere
xBnd = world(1,1);
yBnd = world(1,2);
for i=1:noOfObs
xObs = world(i,1);
yObs = world(i,2);
dx = 1;
dy = 1;
if (i == 1)
xTop = -2 * ( robo(1) - xObs);
yTop = -2 * ( robo(2) - yObs);
for j=1:noOfObs
xObs = world(j,1);
yObs = world(j,2);
rObs = world(j,3);
if ( j ~= i)
if ( j == 1) % bounding sphere
dx = dx * (-1 * (findSqDistance(robo,[xObs yObs]))^2) + rObs^2;
dy = dy * (-1 * (findSqDistance(robo,[xObs yObs]))^2) + rObs^2;
else % other obstacles
dx = dx * ((findSqDistance(robo, [xObs yObs]))^2 - rObs^2);
dy = dy * ((findSqDistance(robo, [xObs yObs]))^2 - rObs^2);
end
end
end
else
xTop = 2 * ( robo(1) - xObs);
yTop = 2 * ( robo(2) - yObs);
for j=1:noOfObs
xObs = world(j,1);
yObs = world(j,2);
rObs = world(j,3);
if ( j ~= i)
if ( j == 1) % bounding sphere
dx = dx * (-1 * (findSqDistance(robo,[xObs yObs]))^2) + rObs^2;
dy = dy * (-1 * (findSqDistance(robo,[xObs yObs]))^2) + rObs^2;
else % other obstacles
dx = dx * ((findSqDistance(robo, [xObs yObs]))^2 - rObs^2);
dy = dy * ((findSqDistance(robo, [xObs yObs]))^2 - rObs^2);
end
end
end
end
xTop = xTop * dx;
yTop = yTop * dy;
dobsdot(1) = dobsdot(1) + xTop;
dobsdot(2) = dobsdot(2) + yTop;
end
end
没有合适的资源?快使用搜索试试~ 我知道了~
potentials.zip_pageik1_巡航_群机器人
共15个文件
m:15个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 131 浏览量
2022-07-14
05:07:52
上传
评论
收藏 7KB ZIP 举报
温馨提示
群机器人相关算法,巡航,边界,距离,壁障等相关程序。
资源详情
资源评论
资源推荐
收起资源包目录
potentials.zip (15个子文件)
findObsDistance.m 527B
findSqDistance.m 107B
potEventFunc.m 377B
navPotField.m 362B
plotNavigation.m 463B
navigationFunc.m 1KB
navGrad.m 1KB
navEventFunc.m 323B
potPotField.m 1KB
findDerDobs.m 2KB
checkObstacle.m 358B
checkBoundary.m 260B
plotPotential.m 462B
potGrad.m 2KB
potentialFunc.m 1KB
共 15 条
- 1
小贝德罗
- 粉丝: 71
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0