17 assert(n_beams==rs->
beams().size());
19 for (
unsigned int i=0; i<size(); i++)
29 for (
unsigned int i=0; i<size(); i++)
34 for (
unsigned int i=0; i<size(); i++){
38 cos(rs->
beams()[i].pose.theta)*(*
this)[i],
39 sin(rs->
beams()[i].pose.theta)*(*
this)[i]);
40 Point dp=lastPoint-lp;
41 double distance=sqrt(dp*dp);
42 if (distance<density){
56 return static_cast<unsigned int>(size());
66 for (
unsigned int i=0; i<size(); i++){
70 cos(rs->
beams()[i].pose.theta)*(*
this)[i],
71 sin(rs->
beams()[i].pose.theta)*(*
this)[i]);
72 Point dp=lastPoint-lp;
73 double distance=sqrt(dp*dp);
74 if (distance<density){
89 assert(rangeSensor && rangeSensor->
beams().size());
91 uint m_beams=
static_cast<unsigned int>(rangeSensor->
beams().size());
92 std::vector<Point> cartesianPoints(m_beams);
98 for (
unsigned int i=0; i<m_beams; i++){
99 const double& rho=(*this)[i];
100 const double& s=rangeSensor->
beams()[i].s;
101 const double&
c=rangeSensor->
beams()[i].c;
103 cartesianPoints[i]=
Point(0,0);
106 cartesianPoints[i].
x=px+pc*p.
x-ps*p.
y;
107 cartesianPoints[i].y=py+ps*p.
x+pc*p.
y;
110 return cartesianPoints;
std::vector< Point > cartesianForm(double maxRange=1e6) const
unsigned int activeBeams(double density=0.) const
const Sensor * getSensor() const
RangeReading(const RangeSensor *rs, double time=0)
unsigned int rawView(double *v, double density=0.) const
OrientedPoint getPose() const
double max(double a, double b)
const std::vector< Beam > & beams() const