65 unsigned char byte[2];
97 bool isAlive()
const {
return is_alive; }
98 bool isShutdown()
const {
return shutdown_requested; }
99 bool isEnabled()
const {
return is_enabled; }
102 void shutdown() { shutdown_requested =
true; }
113 void lockDataAccess();
114 void unlockDataAccess();
122 double getAngularVelocity()
const;
123 VersionInfo versionInfo()
const {
return VersionInfo(firmware.version(), hardware.data.version, unique_device_id.data.udid0, unique_device_id.data.udid1, unique_device_id.data.udid2); }
124 Battery batteryStatus()
const {
return Battery(core_sensors.data.battery, core_sensors.data.charger); }
131 CoreSensors::Data getCoreSensorData()
const {
return core_sensors.data; }
132 DockIR::Data getDockIRData()
const {
return dock_ir.data; }
135 Inertia::Data getInertiaData()
const {
return inertia.data; }
136 GpInput::Data getGpInputData()
const {
return gp_input.data; }
137 ThreeAxisGyro::Data getRawInertiaData()
const {
return three_axis_gyro.data; }
138 ControllerInfo::Data getControllerInfoData()
const {
return controller_info.data; }
143 void getWheelJointStates(
double &wheel_left_angle,
double &wheel_left_angle_rate,
144 double &wheel_right_angle,
double &wheel_right_angle_rate);
146 ecl::linear_algebra::Vector3d &pose_update_rates);
151 void resetOdometry();
156 void setBaseControl(
const double &linear_velocity,
const double &angular_velocity);
161 bool setControllerGain(
const unsigned char &type,
const unsigned int &p_gain,
162 const unsigned int &i_gain,
const unsigned int &d_gain);
163 bool getControllerGain();
168 void printSigSlotConnections()
const;
175 bool shutdown_requested;
186 double heading_offset;
216 PacketFinder::BufferType data_buffer;
219 int version_info_reminder;
220 int controller_info_reminder;
225 void sendBaseControlCommand();
227 ecl::Mutex command_mutex;
231 ecl::Mutex data_mutex;
234 std::vector<short> velocity_commands_debug;
244 std::vector<std::string> log(std::string msg) {
return log(
"",
"", msg); }
245 std::vector<std::string> log(std::string level, std::string msg) {
return log(level,
"", msg); }
246 std::vector<std::string> log(std::string level, std::string name, std::string msg) {
247 std::vector<std::string> ret;
248 if( level !=
"" ) ret.push_back(level);
249 if( name !=
"" ) ret.push_back(name);
250 if( msg !=
"" ) ret.push_back(msg);