Revision ade1b7f9
ID | ade1b7f9e6aee15cde7890ca6330f9cd57e118b5 |
Basic line sensor readings!
scout/scoutsim/src/scout.h | ||
---|---|---|
73 | 73 |
/// The scale factor so the speed of scout robots is reasonable for the sim |
74 | 74 |
#define SPEED_SCALE_FACTOR 0.05 |
75 | 75 |
|
76 |
#define NUM_LINESENSORS 8 |
|
77 |
|
|
78 |
// Distance, pixels, from center of robot to the linesensors. |
|
79 |
#define LNSNSR_D 20 |
|
80 |
|
|
76 | 81 |
namespace scoutsim |
77 | 82 |
{ |
78 | 83 |
struct Vector2 |
... | ... | |
109 | 114 |
|
110 | 115 |
geometry_msgs::Pose2D update(double dt, wxMemoryDC& path_dc, |
111 | 116 |
const wxImage& path_image, |
117 |
const wxImage& lines_image, |
|
112 | 118 |
wxColour background_color, |
113 | 119 |
world_state state); |
114 | 120 |
void paint(wxDC& dc); |
... | ... | |
122 | 128 |
encoders::query_encoders::Response&); |
123 | 129 |
bool query_linesensor_callback(linesensor::query_linesensor::Request&, |
124 | 130 |
linesensor::query_linesensor::Response&); |
131 |
unsigned int rgb_to_linesensor_val(unsigned char r, |
|
132 |
unsigned char g, |
|
133 |
unsigned char b); |
|
134 |
void update_linesensor(const wxImage& lines_image, int x, int y, double theta); |
|
125 | 135 |
|
126 | 136 |
ros::NodeHandle node; |
127 | 137 |
|
... | ... | |
145 | 155 |
unsigned int bl_ticks; |
146 | 156 |
unsigned int br_ticks; |
147 | 157 |
|
158 |
// A vector of the 8 linesensor readings |
|
159 |
std::vector<unsigned int> linesensor_readings; |
|
160 |
|
|
148 | 161 |
// Each scout has a unique id number, which is also displayed on its image. |
149 | 162 |
int scout_id; |
150 | 163 |
|
Also available in: Unified diff