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开发调试环境.下面是 ...
随机推荐
- python—递归函数
递归函数 定义:即在函数定义中自己调用自己 递归就是在过程或函数中自我调用 递归必须有递归出口,即递归结束条件 举个栗子-阶乘: def fact(n): if n == 1: return 1 re ...
- c语言描述的二分插入排序法
#include<stdio.h> #include<stdlib.h> //二分插入排序法 void BinsertSort(int a[],int n){ int low, ...
- mac install PyQt5
1. install brew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/insta ...
- SpringBoot非官方教程 | 第五篇:springboot整合 beatlsql
转载请标明出处: 原文首发于:https://www.fangzhipeng.com/springboot/2017/07/11/springboot5-beatlsql/ 本文出自方志朋的博客 Be ...
- SQL on&where&having
on.where.having这三个都可以加条件的子句中,on是最先执行,where次之,having最后.有时候如果这先后顺序不影响中间结果的话,那最终结果是相同的.但因为on是先把不符合条件的记录 ...
- 使用xlsx把json对象导出excel
1,首先使用npm下载xlsx.执行命令 npm install xlsx --save import { Component, OnInit } from '@angular/core'; //im ...
- (mybatis)There is no getter for property named 'isEffective' in 'class java.lang.String
原来代码: <select id="findSpecialOffer" resultType="com.lizard.back.model.SpecialOffer ...
- 虚拟内存设置(解决linux内存不够情况)
一. 虚拟内存介绍 背景介绍 Memory指机器物理内存,读写速度低于CPU一个量级,但是高于磁盘不止一个量级.所以,程序和数据如果在内存的话,会有非常快的读写速度.但是,内存的造价是要高于 ...
- Linux中查看已安装内存与交换空间使用情况
目录 1. free查看内存使用量 2. 查看 /proc/meminfo 文件获取物理内存信息 3. top命令获取内存用量 1. free查看内存用量命令 该命令是专门用于查看内存用量 ...
- 【linux运维递进】
================================云计算和虚拟化=================================== docker openstack svn git ...