66 long CmdMessage::total_destroyed = 0;
67 long CmdMessage::total_sent = 0;
69 CmdMessage::~CmdMessage()
75 CPR_WARN() <<
"Command message destroyed without being sent. Type: " 76 <<
"0x" << hex << getType() << dec
77 <<
". Total unsent: " << (total_destroyed-total_sent) << endl;
137 ROS_DEBUG_STREAM(
"SetAckermannOutput: steer:%.2lf, throt:%.2lf, brake:%.2lf",steer,throt,brake);
161 ROS_DEBUG_STREAM(
"SetDifferentialControl: P:%.2lf,I:%.2lf,D:%.2lf.", p, i, d);
188 ROS_DEBUG_STREAM(
"SetDifferentialControl: left_p:%.2lf,left_i:%.2lf,left_d:%.2lf" 189 "right_p:%.2lf,right_i:%.2lf,right_d:%.2lf.", left_p,
219 ROS_DEBUG_STREAM(
"SetDifferentialOutput: left:%.2lf,right:%.2lf",left,right);
236 double left_accel,
double right_accel)
244 #ifdef DEBUG_SEND_SPEED 245 ROS_DEBUG_STREAM(
"SetDifferentialSpeed: left_speed:%.2lf,right_speed:%.2lf,left_accel:%.2lf,right_accel:%.2lf",left_speed,right_speed,left_accel,right_accel);
279 ROS_DEBUG_STREAM(
"SetMaxAccel: max_fwd:%.2lf, max_rev:%.2lf",max_fwd,max_rev);
297 ROS_DEBUG_STREAM(
"SetMaxSpeed: max_fwd:%.2lf, max_rev:%.2lf",max_fwd,max_rev);
310 size_t cpy_len = strlen(name);
312 if (cpy_len > max_len) { cpy_len = max_len; }
385 ROS_DEBUG_STREAM(
"Set Wheel gauge: %.2lf, wheel diameter: %.2lf .",wheel_gauge,wheel_diameter);
403 ROS_DEBUG_STREAM(
"SetVelocity: trans:%.2lf, rot:%.2lf, accel:%.2lf",trans,rot,accel);
SetWheelInfo(double wheel_gauge, double Wheel_diameter)
static const size_t MAX_MSG_LENGTH
void setType(uint16_t type)
SetDifferentialControl(double p, double i, double d)
void utob(void *dest, size_t dest_len, uint64_t src)
uint8_t * getPayloadPointer(size_t offset=0)
SetTurn(double trans, double rad, double accel)
SetMaxSpeed(double max_fwd, double max_rev)
SetDifferentialSpeed(double left_spd, double right_speed, double left_accel, double right_accel)
SetMaxAccel(double max_fwd, double max_rev)
void setPayloadLength(uint8_t len)
#define ROS_DEBUG_STREAM(args)
void ftob(void *dest, size_t dest_len, double src, double scale)
static const size_t CRC_LENGTH
SetAckermannOutput(double steering, double throt, double brake)
SetSafetySystem(uint16_t flags)
SetDifferentialOutput(double left, double right)
CmdRestoreSettings(enum restoreFlags flags)
static const size_t HEADER_LENGTH
SetVelocity(double trans, double rot, double accel)