argos3-simulator
如何修改控制器:
CVector2:
class CVector2 { friend class CRotationMatrix2;
friend class CTransformationMatrix2; public: /** The <em>x</em> axis */
static const CVector2 X; /** The <em>y</em> axis */
static const CVector2 Y; /**
* Class constructor.
* It initializes the vector to (0,0).
* @see ZERO
*/
CVector2() :
m_fX(0.0),
m_fY(0.0) {
} /**
* Class constructor.
* It initializes the vector from Cartesian coordinates.
* @param f_x The <em>x</em> coordinate.
* @param f_y The <em>y</em> coordinate.
* @see Set()
*/
CVector2(Real f_x,
Real f_y) :
m_fX(f_x),
m_fY(f_y) {
}
/**
* Sums the passed vector to this vector.
* @param c_vector2 The other vector.
* @returns A reference to this vector.
*/
inline CVector2& operator+=(const CVector2& c_vector2) {
m_fX += c_vector2.m_fX;
m_fY += c_vector2.m_fY;
return *this;
}
......
};
struct SReading {
CRadians Angle;
Real Distance; // in cm from the center of the robot (about 10cm from the border) SReading() :
Angle(0.0f),
Distance(0.0f) {} SReading(const CRadians& c_angle,
Real f_distance) :
Angle(c_angle),
Distance(f_distance) {
}
};
typedef std::vector<SReading> TReadings;
参考:https://git.mistlab.ca/isvogor/e-pucky/tree/260fc947afde2a04132b71c79d4204629419b576/swarms/controllers/cpp/collision_avoidance
锁定修改文件:footbot_diffusion_reference.cpp
读懂每个文件的函数意义:
Swarmanoid hardware
Foot-bots
The foot-bot is a particular configuration of modules based on the marXbot robotic platform. The foot-bot configuration includes a top CPU and vision module, a distance scnaner, a range and bearing module, a self-assembling module and a basic (mobility & battery) module.
Foot-bot Features:
- Compact size: 直径17 cm x 29 cm, 1.8 kg
- Modular system
- High computational power including float processing
- Distance scanner measuring distance up to 1.5m
- Two cameras, one mounted as omnicamera
- Self-assembling mechanism
- Hot-swappable battery
- Treel mobility system
IR-sensor:https://www.electronicshub.org/ir-sensor/
有8个IR-sensor,搞不明白怎么测量的角度?
The returned data of each sensor is
- A reading (a decaying exponential) that depends on the distance between the sensor and the object being detected. This reading is 0 when nothing is detected, and it increases exponentially to 1 when detected objects are closer.
- The angle is measured between the nose of the robot (local X axis) and the angle at which the sensor is located on the body of the robot.
所以,靠的是机器人身上的传感器的位置来计算的正面与障碍物的角度。
argos3-simulator的更多相关文章
- unable to boot the simulator,无法启动模拟器已解决
突然模拟器报错:unable to boot the simulator(无法启动模拟器) 试了好几种解决办法,删除所有的模拟器重启以后再添加,删除钥匙串登陆中的证书,重新安装Xcode都不行 最后通 ...
- Unable to run app in Simulator
xcode6 beta出现 “Unable to run app in Simulator” 错误提示,之前一直用着好好的,重启xcode就可以了. xcode6 beta出现 “Unable to ...
- 给ros安装arbotix simulator仿真环境
首先下载程序包.编译.安装. cd ~/catkin_ws/src git clone https://github.com/pirobot/rbx1.git cd rbx1 git checkout ...
- XCode6的iOS Simulator 文件保存位置
我现在用的是XCode6.4,模拟器系统是iOS 8.4.其他版本可能会略有差异. 进入Finder,前往"~/Library/Developer/CoreSimulator/Devices ...
- Unable to open liblaunch_sim.dylib. Try reinstalling Xcode or the simulator
关于Xcode7 Beta报错 simulator runtime is not available. Unable to open liblaunch_sim.dylib Try reinstall ...
- iOS Simulator功能介绍关于Xamarin IOS开发
iOS Simulator功能介绍关于Xamarin IOS开发 iOS Simulator功能介绍 在图1.38所示的运行效果中,所见到的类似于手机的模型就是iOS Simulator.在没有iPh ...
- 安装arbotix simulator仿真环境--9
原创博客:转载请表明出处:http://www.cnblogs.com/zxouxuewei/ 周学伟 安装之前:首先确保已经正常制作了ros工作空间并且安装了rbx1功能包: cd ~/catki ...
- NewRelicAgent(CustomAnalyticEvent.cxx.o), building for iOS simulator, but linking in object file built for OSX, for architecture x8(botched)
昨天遇到一个问题,在项目swift1.2适配swift2.0的过程中,修改完毕之后,运行报错如下: /Pods/NewRelicAgent/NewRelic_iOS_Agent_5.1.0/NewRe ...
- 【转】Xcode中的iOS模拟器(iOS Simulator)的介绍和使用心得
iOS模拟器简介 iOS功能简介 iOS模拟器,是在Mac下面开发程序时,开发iOS平台的程序时候,可以使用的辅助工具. 其功能是,帮你模拟iOS平台设备,在模拟器上运行对应的程序,以方便你没有实体设 ...
- TI-Davinci开发系列之二使用CCS5.2TI Simulator模拟环境调试DSP程序
上接博文<TI-Davinci开发系列之一CCS5.2的安装及注意事项>. 如何没有实际的开发板或者仿真器,可以使用CCS自带的TISimulator来学习与熟悉CCS开发调试环境.下面是 ...
随机推荐
- scala容器使用
花了两个小时左右,学习了一下scala语言, 由于scala运行在jvm之上, 可以使用java容器也可以使用scala自带的容器. import java.util import java.util ...
- Zookeeper watch参照表
Watcher 设置是开发中最常见的,需要搞清楚watcher的一些基本特征,对于exists.getdata.getchild对于节点的不同操 作会收到不同的 watcher信息.对父节点的变更以及 ...
- java各种业务解决方案总结
最近有点时间,突然感慨良多,感觉辛苦工作这么久什么都没有,总结了以前的工作,将接触的主要工具列出来,希望给大家解决问题做参考.相关工具都是实践检验过的 1.数据库 (1).内存数据库 redis (2 ...
- Sass 基础(三)
扩展/继承 继承对于了解css 的同学来说一点都不陌生,先来看一张图 在Sass 中也具有继承一说,也就是继承类中的样式代码块,在Sass中时通过关键词“@extend”来 继承已经存在的类样式块,从 ...
- 第13届景驰-埃森哲杯广东工业大学ACM程序设计大赛--I-填空题
链接:https://www.nowcoder.com/acm/contest/90/I 来源:牛客网 1.题目描述 牛客网是是一个专注于程序员的学习和成长的专业平台,集笔面试系统.课程教育.社群交流 ...
- 【Nowcoder 上海五校赛】1 + 2 = 3?(斐波那契规律)
题目描述 小Y在研究数字的时候,发现了一个神奇的等式方程,他屈指算了一下有很多正整数x满足这个等式,比如1和2,现在问题来了,他想知道从小到大第N个满足这个等式的正整数,请你用程序帮他计算一下. (表 ...
- koa2 mongdb 做后端接口的小demo
现在前端全栈里面有一种技术栈比较火 前端使用 vue 或者react 后端使用 koa2 mysql数据库 或者mongdb做数据储存 但是基本这样的全栈教程 都要收费 收费就收费吧 但是 有没有遇到 ...
- (转)程序员新人怎样在复杂代码中找 bug?
我曾经做了两年大型软件的维护工作,那个项目有10多年了,大约3000万行以上的代码,参与过开发的有数千人,代码checkout出来有大约5个GB,而且bug特别多,open的有上千,即使最高优先级的s ...
- 关于使用array_rand随机取出数组的值
代码如下 <?php echo "<meta charset='utf-8'/>";//选择解码方式,防止乱码现象 $a = array("abc&qu ...
- js onsubmit和return false的关系
一直以来,我都是以为onsubmit=“return false”就不会进行提交,但经过项目之后才知道return false只是避免了之后的跳转,但onsubmit已经是正在进行了,故onsubmi ...