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开发调试环境.下面是 ...
随机推荐
- watch、computed、methods的区别
1. `computed`属性的结果会被缓存,除非依赖的响应式属性变化才会重新计算.主要当作属性来使用,要return出去一个值:2. `methods`方法表示一个具体的操作,主要书写业务逻辑:3. ...
- jsp页面的传值(list)
jsp页面与xml文件对应的关系: 例:网页上jsp的url为----purchase_app_btn.do? 对应xml文件下的 <action path="/purchase_ap ...
- ios学习路线—Objective-C(堆(heap)和栈(stack))
Objective-C的对象在内存中是以堆的方式分配空间的,并且堆内存是由你释放的,即release 栈由编译器管理自动释放的,在方法中(函数体)定义的变量通常是在栈内,因此如果你的变量要跨函数的话就 ...
- jstl的<c:set 的问题
在使用jstl提供的set标签对javabean进行处理的时候发现直接打bean的名字会错 <jsp:useBean id="kkk" class="com.log ...
- CentOS7版本基础使用
第1章 CentOS7的使用 1.1 为什么要使用CentOS7版本 CentOS7是在CentOS6基础上发布的新版本,与之前的版本相比,主要的更新包括: 1.内核更新到3.10.0 2.支持Lin ...
- [异常笔记]poi读取Excel异常
Exception in thread "main" org.apache.poi.poifs.filesystem.OfficeXmlFileException: The sup ...
- python元组操作
元组:(tuple)元素不可被修改,不能被增加或者删除 一般写元组的时候,建议在最后加上一个逗号 可以索引取值 可以切片取值 元组一级元素不可被修改,但是二级及以后可以被修改 count() 获 ...
- (转)程序员新人怎样在复杂代码中找 bug?
我曾经做了两年大型软件的维护工作,那个项目有10多年了,大约3000万行以上的代码,参与过开发的有数千人,代码checkout出来有大约5个GB,而且bug特别多,open的有上千,即使最高优先级的s ...
- node 写api几个简单的问题
最近出了一直在做无聊的管理后台,还抽空做了我公司的计费终端,前端vue,后端node,代码层面没啥太多的东西.由于自己node版本是8.0.0,node自身是不支持import和export的,要想基 ...
- MySQL必会
SQL语言对大小写不敏感,但一般使用大.1.创建数据库 CREATE DATABASE test; 2.授予权限 CRANT ALL ON test.* to user(s); 3.使用指定数据库 U ...