79 unsigned char mid = signal_filt[1];
85 rotated += pose_update.heading() / (2.0 * M_PI);
86 std::ostringstream oss;
87 oss <<
"rotated: " << std::fixed << std::setprecision(2) << std::setw(4) <<
rotated;
88 debug_str = oss.str();
120 else if(std::abs(rotated) > 1.0)
146 unsigned char right = signal_filt[0];
147 unsigned char left = signal_filt[2];
149 double next_vx = 0.0;
150 double next_wz = 0.0;
197 unsigned char right = signal_filt[0];
198 unsigned char left = signal_filt[2];
200 double next_vx = 0.0;
201 double next_wz = 0.0;
248 unsigned char mid = signal_filt[1];
250 double next_vx = nvx;
251 double next_wz = nwz;
257 debug_str =
"AlignedNearCenter";
263 debug_str =
"AlignedNearLeft";
269 debug_str =
"AlignedNearRight";
275 debug_str =
"AlignedFarCenter";
281 debug_str =
"AlignedFarLeft";
287 debug_str =
"AlignedFarRight";
Simple module for the docking drive algorithm.
void bumped(RobotDockingState::State &nstate, double &nvx, double &nwz, int &bump_count)
void scan(RobotDockingState::State &state, double &vx, double &wz, const std::vector< unsigned char > &signal_filt, const ecl::LegacyPose2D< double > &pose_update, std::string &debug_str)
void find_stream(RobotDockingState::State &state, double &vx, double &wz, const std::vector< unsigned char > &signal_filt)
void idle(RobotDockingState::State &state, double &vx, double &wz)
void get_stream(RobotDockingState::State &state, double &vx, double &wz, const std::vector< unsigned char > &signal_filt)
void aligned(RobotDockingState::State &state, double &vx, double &wz, const std::vector< unsigned char > &signal_filt, std::string &debug_str)