标签:scn this tween www ssi har including 机器 nothing
如何修改控制器:
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;
}
......
};
1 struct SReading { 2 CRadians Angle; 3 Real Distance; // in cm from the center of the robot (about 10cm from the border) 4 5 SReading() : 6 Angle(0.0f), 7 Distance(0.0f) {} 8 9 SReading(const CRadians& c_angle, 10 Real f_distance) : 11 Angle(c_angle), 12 Distance(f_distance) { 13 } 14 }; 15 typedef std::vector<SReading> TReadings;
参考:https://git.mistlab.ca/isvogor/e-pucky/tree/260fc947afde2a04132b71c79d4204629419b576/swarms/controllers/cpp/collision_avoidance
锁定修改文件:footbot_diffusion_reference.cpp
读懂每个文件的函数意义:
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.
IR-sensor:https://www.electronicshub.org/ir-sensor/
有8个IR-sensor,搞不明白怎么测量的角度?
The returned data of each sensor is
所以,靠的是机器人身上的传感器的位置来计算的正面与障碍物的角度。
标签:scn this tween www ssi har including 机器 nothing
原文地址:https://www.cnblogs.com/snowdwq/p/9926111.html