51 std::ostringstream debug_stream;
53 std::string far_signal =
"[F: ";
54 std::string near_signal =
"[N: ";
55 for (
unsigned int i=0; i<3; i++) {
67 debug_stream << far_signal << near_signal;
71 std::string out =
"[B: ";
72 if (bumper&4) out +=
"L";
else out +=
"-";
73 if (bumper&2) out +=
"C";
else out +=
"-";
74 if (bumper&1) out +=
"R";
else out +=
"-";
81 std::ostringstream oss;
82 oss <<
"[C:" << std::setw(2) << (
unsigned int)charger;
84 if (charger) oss <<
"ON";
else oss <<
" ";
86 debug_stream << oss.str();
90 debug_stream <<
"[vx: " << std::setw(7) <<
vx <<
", wz: " << std::setw(7) <<
wz <<
"]";
91 debug_stream <<
"[S: " <<
state_str <<
"]";
92 debug_stream <<
"[dock_detecotr: : " <<
dock_detector <<
" ]";
93 debug_stream <<
"[" << debug_str <<
"]";
102 for(
unsigned int i=0;i<6; i++){
103 if (number&1) ret =
"1" + ret;
104 else ret =
"0" + ret;
105 number = number >> 1;
Simple module for the docking drive algorithm.
void generateDebugMessage(const std::vector< unsigned char > &signal_filt, const unsigned char &bumper, const unsigned char &charger, const ecl::LegacyPose2D< double > &pose_update, const std::string &debug_str)
std::string binary(unsigned char number) const