1 Star 0 Fork 0

焦建军/robotarium-matlab-simulator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
simulation_skeleton.m 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
pglotfel 提交于 2018-11-21 14:07 . Updated simulator skeleton
%% Simulator Skeleton File
% Paul Glotfelter
% 10/04/2016
% This file provides the bare-bones requirements for interacting with the
% Robotarium. Note that this code won't actually run. You'll have to
% insert your own algorithm! If you want to see some working code, check
% out the 'examples' folder.
%% Get Robotarium object used to communicate with the robots/simulator
N = 12;
r = Robotarium('NumberOfRobots', N, 'ShowFigure', true);
% Select the number of iterations for the experiment. This value is
% arbitrary
iterations = 1000;
% Iterate for the previously specified number of iterations
for t = 1:iterations
% Retrieve the most recent poses from the Robotarium. The time delay is
% approximately 0.033 seconds
x = r.get_poses();
%% Insert your code here!
% dxu = algorithm(x);
%% Send velocities to agents
% Set velocities of agents 1,...,N
r.set_velocities(1:N, dxu);
% Send the previously set velocities to the agents. This function must be called!
r.step();
end
% We should call r.call_at_scripts_end() after our experiment is over!
r.debug();
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jiaojianjun-com/robotarium-matlab-simulator.git
git@gitee.com:jiaojianjun-com/robotarium-matlab-simulator.git
jiaojianjun-com
robotarium-matlab-simulator
robotarium-matlab-simulator
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385