pacmod_ros_msg_handler.cpp
Go to the documentation of this file.
1 /*
2 * Unpublished Copyright (c) 2009-2017 AutonomouStuff, LLC, All Rights Reserved.
3 *
4 * This file is part of the PACMod ROS 1.0 driver which is released under the MIT license.
5 * See file LICENSE included with this software or go to https://opensource.org/licenses/MIT for full license details.
6 */
7 
9 
10 #include <string>
11 #include <vector>
12 
13 using namespace AS::Drivers::PACMod;
14 
16  _data(),
17  _data_mut(),
18  _is_valid(false),
19  _valid_mut()
20 {
21 }
22 
23 bool LockedData::isValid() const
24 {
25  std::lock_guard<std::mutex> lck(_valid_mut);
26  return _is_valid;
27 }
28 
29 void LockedData::setIsValid(bool valid)
30 {
31  std::lock_guard<std::mutex> lck(_valid_mut);
32  _is_valid = valid;
33 }
34 
35 std::vector<unsigned char> LockedData::getData() const
36 {
37  std::lock_guard<std::mutex> lck(_data_mut);
38  return _data;
39 }
40 
41 void LockedData::setData(std::vector<unsigned char> new_data)
42 {
43  std::lock_guard<std::mutex> lck(_data_mut);
44  _data = new_data;
45 }
46 
47 void PacmodTxRosMsgHandler::fillAndPublish(const int64_t& can_id,
48  std::string frame_id,
49  const ros::Publisher& pub,
50  const std::shared_ptr<PacmodTxMsg>& parser_class)
51 {
52  if (can_id == TurnSignalRptMsg::CAN_ID ||
53  can_id == ShiftRptMsg::CAN_ID ||
54  can_id == HeadlightRptMsg::CAN_ID ||
55  can_id == HornRptMsg::CAN_ID ||
56  can_id == WiperRptMsg::CAN_ID)
57  {
58  pacmod_msgs::SystemRptInt new_msg;
59  fillSystemRptInt(parser_class, &new_msg, frame_id);
60  pub.publish(new_msg);
61  }
62  else if (can_id == AccelRptMsg::CAN_ID ||
63  can_id == BrakeRptMsg::CAN_ID ||
64  can_id == SteerRptMsg::CAN_ID ||
65  can_id == SteerRpt2Msg::CAN_ID ||
66  can_id == SteerRpt3Msg::CAN_ID)
67  {
68  pacmod_msgs::SystemRptFloat new_msg;
69  fillSystemRptFloat(parser_class, &new_msg, frame_id);
70  pub.publish(new_msg);
71  }
72  else if (can_id == GlobalRptMsg::CAN_ID)
73  {
74  pacmod_msgs::GlobalRpt new_msg;
75  fillGlobalRpt(parser_class, &new_msg, frame_id);
76  pub.publish(new_msg);
77  }
78  else if (can_id == VehicleSpeedRptMsg::CAN_ID)
79  {
80  pacmod_msgs::VehicleSpeedRpt new_msg;
81  fillVehicleSpeedRpt(parser_class, &new_msg, frame_id);
82  pub.publish(new_msg);
83  }
84  else if (can_id == BrakeMotorRpt1Msg::CAN_ID ||
85  can_id == SteerMotorRpt1Msg::CAN_ID)
86  {
87  pacmod_msgs::MotorRpt1 new_msg;
88  fillMotorRpt1(parser_class, &new_msg, frame_id);
89  pub.publish(new_msg);
90  }
91  else if (can_id == BrakeMotorRpt2Msg::CAN_ID ||
92  can_id == SteerMotorRpt2Msg::CAN_ID)
93  {
94  pacmod_msgs::MotorRpt2 new_msg;
95  fillMotorRpt2(parser_class, &new_msg, frame_id);
96  pub.publish(new_msg);
97  }
98  else if (can_id == BrakeMotorRpt3Msg::CAN_ID ||
99  can_id == SteerMotorRpt3Msg::CAN_ID)
100  {
101  pacmod_msgs::MotorRpt3 new_msg;
102  fillMotorRpt3(parser_class, &new_msg, frame_id);
103  pub.publish(new_msg);
104  }
105  else if (can_id == WheelSpeedRptMsg::CAN_ID)
106  {
107  pacmod_msgs::WheelSpeedRpt new_msg;
108  fillWheelSpeedRpt(parser_class, &new_msg, frame_id);
109  pub.publish(new_msg);
110  }
111  else if (can_id == SteeringPIDRpt1Msg::CAN_ID)
112  {
113  pacmod_msgs::SteeringPIDRpt1 new_msg;
114  fillSteeringPIDRpt1(parser_class, &new_msg, frame_id);
115  pub.publish(new_msg);
116  }
117  else if (can_id == SteeringPIDRpt2Msg::CAN_ID)
118  {
119  pacmod_msgs::SteeringPIDRpt2 new_msg;
120  fillSteeringPIDRpt2(parser_class, &new_msg, frame_id);
121  pub.publish(new_msg);
122  }
123  else if (can_id == SteeringPIDRpt3Msg::CAN_ID)
124  {
125  pacmod_msgs::SteeringPIDRpt3 new_msg;
126  fillSteeringPIDRpt3(parser_class, &new_msg, frame_id);
127  pub.publish(new_msg);
128  }
129  else if (can_id == ParkingBrakeStatusRptMsg::CAN_ID)
130  {
131  pacmod_msgs::ParkingBrakeStatusRpt new_msg;
132  fillParkingBrakeStatusRpt(parser_class, &new_msg, frame_id);
133  pub.publish(new_msg);
134  }
135  else if (can_id == YawRateRptMsg::CAN_ID)
136  {
137  pacmod_msgs::YawRateRpt new_msg;
138  fillYawRateRpt(parser_class, &new_msg, frame_id);
139  pub.publish(new_msg);
140  }
141  else if (can_id == LatLonHeadingRptMsg::CAN_ID)
142  {
143  pacmod_msgs::LatLonHeadingRpt new_msg;
144  fillLatLonHeadingRpt(parser_class, &new_msg, frame_id);
145  pub.publish(new_msg);
146  }
147  else if (can_id == DateTimeRptMsg::CAN_ID)
148  {
149  pacmod_msgs::DateTimeRpt new_msg;
150  fillDateTimeRpt(parser_class, &new_msg, frame_id);
151  pub.publish(new_msg);
152  }
153  else if (can_id == SteeringPIDRpt4Msg::CAN_ID)
154  {
155  pacmod_msgs::SteeringPIDRpt4 new_msg;
156  fillSteeringPIDRpt4(parser_class, &new_msg, frame_id);
157  pub.publish(new_msg);
158  }
159  else if (can_id == VinRptMsg::CAN_ID)
160  {
161  pacmod_msgs::VinRpt new_msg;
162  fillVinRpt(parser_class, &new_msg, frame_id);
163  pub.publish(new_msg);
164  }
165 }
166 
167 void PacmodTxRosMsgHandler::fillSystemRptInt(const std::shared_ptr<PacmodTxMsg>& parser_class,
168  pacmod_msgs::SystemRptInt* new_msg,
169  std::string frame_id)
170 {
171  auto dc_parser = std::dynamic_pointer_cast<SystemRptIntMsg>(parser_class);
172 
173  new_msg->manual_input = dc_parser->manual_input;
174  new_msg->command = dc_parser->command;
175  new_msg->output = dc_parser->output;
176 
177  new_msg->header.frame_id = frame_id;
178  new_msg->header.stamp = ros::Time::now();
179 }
180 
181 void PacmodTxRosMsgHandler::fillSystemRptFloat(const std::shared_ptr<PacmodTxMsg>& parser_class,
182  pacmod_msgs::SystemRptFloat* new_msg,
183  std::string frame_id)
184 {
185  auto dc_parser = std::dynamic_pointer_cast<SystemRptFloatMsg>(parser_class);
186 
187  new_msg->manual_input = dc_parser->manual_input;
188  new_msg->command = dc_parser->command;
189  new_msg->output = dc_parser->output;
190 
191  new_msg->header.frame_id = frame_id;
192  new_msg->header.stamp = ros::Time::now();
193 }
194 
195 void PacmodTxRosMsgHandler::fillGlobalRpt(const std::shared_ptr<PacmodTxMsg>& parser_class,
196  pacmod_msgs::GlobalRpt* new_msg,
197  std::string frame_id)
198 {
199  auto dc_parser = std::dynamic_pointer_cast<GlobalRptMsg>(parser_class);
200 
201  new_msg->enabled = dc_parser->enabled;
202  new_msg->override_active = dc_parser->override_active;
203  new_msg->user_can_timeout = dc_parser->user_can_timeout;
204  new_msg->brake_can_timeout = dc_parser->brake_can_timeout;
205  new_msg->steering_can_timeout = dc_parser->steering_can_timeout;
206  new_msg->vehicle_can_timeout = dc_parser->vehicle_can_timeout;
207  new_msg->user_can_read_errors = dc_parser->user_can_read_errors;
208 
209  new_msg->header.frame_id = frame_id;
210  new_msg->header.stamp = ros::Time::now();
211 }
212 
213 void PacmodTxRosMsgHandler::fillVehicleSpeedRpt(const std::shared_ptr<PacmodTxMsg>& parser_class,
214  pacmod_msgs::VehicleSpeedRpt* new_msg,
215  std::string frame_id)
216 {
217  auto dc_parser = std::dynamic_pointer_cast<VehicleSpeedRptMsg>(parser_class);
218 
219  new_msg->vehicle_speed = dc_parser->vehicle_speed;
220  new_msg->vehicle_speed_valid = dc_parser->vehicle_speed_valid;
221  new_msg->vehicle_speed_raw[0] = dc_parser->vehicle_speed_raw[0];
222  new_msg->vehicle_speed_raw[1] = dc_parser->vehicle_speed_raw[1];
223 
224  new_msg->header.frame_id = frame_id;
225  new_msg->header.stamp = ros::Time::now();
226 }
227 
228 void PacmodTxRosMsgHandler::fillMotorRpt1(const std::shared_ptr<PacmodTxMsg>& parser_class,
229  pacmod_msgs::MotorRpt1* new_msg,
230  std::string frame_id)
231 {
232  auto dc_parser = std::dynamic_pointer_cast<MotorRpt1Msg>(parser_class);
233 
234  new_msg->current = dc_parser->current;
235  new_msg->position = dc_parser->position;
236 
237  new_msg->header.frame_id = frame_id;
238  new_msg->header.stamp = ros::Time::now();
239 }
240 
241 void PacmodTxRosMsgHandler::fillMotorRpt2(const std::shared_ptr<PacmodTxMsg>& parser_class,
242  pacmod_msgs::MotorRpt2* new_msg,
243  std::string frame_id)
244 {
245  auto dc_parser = std::dynamic_pointer_cast<MotorRpt2Msg>(parser_class);
246 
247  new_msg->encoder_temp = dc_parser->encoder_temp;
248  new_msg->motor_temp = dc_parser->motor_temp;
249  new_msg->angular_velocity = dc_parser->velocity;
250 
251  new_msg->header.frame_id = frame_id;
252  new_msg->header.stamp = ros::Time::now();
253 }
254 
255 void PacmodTxRosMsgHandler::fillMotorRpt3(const std::shared_ptr<PacmodTxMsg>& parser_class,
256  pacmod_msgs::MotorRpt3* new_msg,
257  std::string frame_id)
258 {
259  auto dc_parser = std::dynamic_pointer_cast<MotorRpt3Msg>(parser_class);
260 
261  new_msg->torque_output = dc_parser->torque_output;
262  new_msg->torque_input = dc_parser->torque_input;
263 
264  new_msg->header.frame_id = frame_id;
265  new_msg->header.stamp = ros::Time::now();
266 }
267 
268 void PacmodTxRosMsgHandler::fillWheelSpeedRpt(const std::shared_ptr<PacmodTxMsg>& parser_class,
269  pacmod_msgs::WheelSpeedRpt* new_msg,
270  std::string frame_id)
271 {
272  auto dc_parser = std::dynamic_pointer_cast<WheelSpeedRptMsg>(parser_class);
273 
274  new_msg->front_left_wheel_speed = dc_parser->front_left_wheel_speed;
275  new_msg->front_right_wheel_speed = dc_parser->front_right_wheel_speed;
276  new_msg->rear_left_wheel_speed = dc_parser->rear_left_wheel_speed;
277  new_msg->rear_right_wheel_speed = dc_parser->rear_right_wheel_speed;
278 
279  new_msg->header.frame_id = frame_id;
280  new_msg->header.stamp = ros::Time::now();
281 }
282 
283 void PacmodTxRosMsgHandler::fillSteeringPIDRpt1(const std::shared_ptr<PacmodTxMsg>& parser_class,
284  pacmod_msgs::SteeringPIDRpt1* new_msg,
285  std::string frame_id)
286 {
287  auto dc_parser = std::dynamic_pointer_cast<SteeringPIDRpt1Msg>(parser_class);
288 
289  new_msg->dt = dc_parser->dt;
290  new_msg->Kp = dc_parser->Kp;
291  new_msg->Ki = dc_parser->Ki;
292  new_msg->Kd = dc_parser->Kd;
293 
294  new_msg->header.frame_id = frame_id;
295  new_msg->header.stamp = ros::Time::now();
296 }
297 
298 void PacmodTxRosMsgHandler::fillSteeringPIDRpt2(const std::shared_ptr<PacmodTxMsg>& parser_class,
299  pacmod_msgs::SteeringPIDRpt2* new_msg,
300  std::string frame_id)
301 {
302  auto dc_parser = std::dynamic_pointer_cast<SteeringPIDRpt2Msg>(parser_class);
303 
304  new_msg->P_term = dc_parser->P_term;
305  new_msg->I_term = dc_parser->I_term;
306  new_msg->D_term = dc_parser->D_term;
307  new_msg->all_terms = dc_parser->all_terms;
308 
309  new_msg->header.frame_id = frame_id;
310  new_msg->header.stamp = ros::Time::now();
311 }
312 
313 void PacmodTxRosMsgHandler::fillSteeringPIDRpt3(const std::shared_ptr<PacmodTxMsg>& parser_class,
314  pacmod_msgs::SteeringPIDRpt3* new_msg,
315  std::string frame_id)
316 {
317  auto dc_parser = std::dynamic_pointer_cast<SteeringPIDRpt3Msg>(parser_class);
318 
319  new_msg->new_torque = dc_parser->new_torque;
320  new_msg->str_angle_desired = dc_parser->str_angle_desired;
321  new_msg->str_angle_actual = dc_parser->str_angle_actual;
322  new_msg->error = dc_parser->error;
323 
324  new_msg->header.frame_id = frame_id;
325  new_msg->header.stamp = ros::Time::now();
326 }
327 
328 void PacmodTxRosMsgHandler::fillParkingBrakeStatusRpt(const std::shared_ptr<PacmodTxMsg>& parser_class,
329  pacmod_msgs::ParkingBrakeStatusRpt* new_msg,
330  std::string frame_id)
331 {
332  auto dc_parser = std::dynamic_pointer_cast<ParkingBrakeStatusRptMsg>(parser_class);
333 
334  new_msg->parking_brake_engaged = dc_parser->parking_brake_engaged;
335 
336  new_msg->header.frame_id = frame_id;
337  new_msg->header.stamp = ros::Time::now();
338 }
339 
340 void PacmodTxRosMsgHandler::fillYawRateRpt(const std::shared_ptr<PacmodTxMsg>& parser_class,
341  pacmod_msgs::YawRateRpt* new_msg,
342  std::string frame_id)
343 {
344  auto dc_parser = std::dynamic_pointer_cast<YawRateRptMsg>(parser_class);
345 
346  new_msg->yaw_rate = dc_parser->yaw_rate;
347 
348  new_msg->header.frame_id = frame_id;
349  new_msg->header.stamp = ros::Time::now();
350 }
351 
352 void PacmodTxRosMsgHandler::fillLatLonHeadingRpt(const std::shared_ptr<PacmodTxMsg>& parser_class,
353  pacmod_msgs::LatLonHeadingRpt* new_msg,
354  std::string frame_id)
355 {
356  auto dc_parser = std::dynamic_pointer_cast<LatLonHeadingRptMsg>(parser_class);
357 
358  new_msg->latitude_degrees = dc_parser->latitude_degrees;
359  new_msg->latitude_minutes = dc_parser->latitude_minutes;
360  new_msg->latitude_seconds = dc_parser->latitude_seconds;
361  new_msg->longitude_degrees = dc_parser->longitude_degrees;
362  new_msg->longitude_minutes = dc_parser->longitude_minutes;
363  new_msg->longitude_seconds = dc_parser->longitude_seconds;
364  new_msg->heading = dc_parser->heading;
365 
366  new_msg->header.frame_id = frame_id;
367  new_msg->header.stamp = ros::Time::now();
368 }
369 
370 void PacmodTxRosMsgHandler::fillDateTimeRpt(const std::shared_ptr<PacmodTxMsg>& parser_class,
371  pacmod_msgs::DateTimeRpt* new_msg,
372  std::string frame_id)
373 {
374  auto dc_parser = std::dynamic_pointer_cast<DateTimeRptMsg>(parser_class);
375 
376  new_msg->year = dc_parser->year;
377  new_msg->month = dc_parser->month;
378  new_msg->day = dc_parser->day;
379  new_msg->hour = dc_parser->hour;
380  new_msg->minute = dc_parser->minute;
381  new_msg->second = dc_parser->second;
382 
383  new_msg->header.frame_id = frame_id;
384  new_msg->header.stamp = ros::Time::now();
385 }
386 
387 void PacmodTxRosMsgHandler::fillSteeringPIDRpt4(const std::shared_ptr<PacmodTxMsg>& parser_class,
388  pacmod_msgs::SteeringPIDRpt4* new_msg,
389  std::string frame_id)
390 {
391  auto dc_parser = std::dynamic_pointer_cast<SteeringPIDRpt4Msg>(parser_class);
392 
393  new_msg->angular_velocity = dc_parser->angular_velocity;
394  new_msg->angular_acceleration = dc_parser->angular_acceleration;
395 
396  new_msg->header.frame_id = frame_id;
397  new_msg->header.stamp = ros::Time::now();
398 }
399 
400 void PacmodTxRosMsgHandler::fillVinRpt(const std::shared_ptr<PacmodTxMsg>& parser_class,
401  pacmod_msgs::VinRpt* new_msg,
402  std::string frame_id)
403 {
404  auto dc_parser = std::dynamic_pointer_cast<VinRptMsg>(parser_class);
405 
406  new_msg->mfg_code = dc_parser->mfg_code;
407  new_msg->mfg = dc_parser->mfg;
408  new_msg->model_year_code = dc_parser->model_year_code;
409  new_msg->model_year = dc_parser->model_year;
410  new_msg->serial = dc_parser->serial;
411 
412  new_msg->header.frame_id = frame_id;
413  new_msg->header.stamp = ros::Time::now();
414 }
415 
416 std::vector<uint8_t> PacmodRxRosMsgHandler::unpackAndEncode(const int64_t& can_id,
417  const pacmod_msgs::PacmodCmd::ConstPtr& msg)
418 {
419  if (can_id == TurnSignalCmdMsg::CAN_ID)
420  {
421  TurnSignalCmdMsg encoder;
422  encoder.encode(msg->ui16_cmd);
423  return encoder.data;
424  }
425  else if (can_id == ShiftCmdMsg::CAN_ID)
426  {
427  ShiftCmdMsg encoder;
428  encoder.encode(msg->ui16_cmd);
429  return encoder.data;
430  }
431  else if (can_id == AccelCmdMsg::CAN_ID)
432  {
433  AccelCmdMsg encoder;
434  encoder.encode(msg->f64_cmd);
435  return encoder.data;
436  }
437  else if (can_id == GlobalCmdMsg::CAN_ID)
438  {
439  GlobalCmdMsg encoder;
440  encoder.encode(msg->enable, msg->clear, msg->ignore);
441  return encoder.data;
442  }
443  else if (can_id == BrakeCmdMsg::CAN_ID)
444  {
445  BrakeCmdMsg encoder;
446  encoder.encode(msg->f64_cmd);
447  return encoder.data;
448  }
449  else if (can_id == HeadlightCmdMsg::CAN_ID)
450  {
451  HeadlightCmdMsg encoder;
452  encoder.encode(msg->ui16_cmd);
453  return encoder.data;
454  }
455  else if (can_id == HornCmdMsg::CAN_ID)
456  {
457  HornCmdMsg encoder;
458  encoder.encode(msg->ui16_cmd);
459  return encoder.data;
460  }
461  else if (can_id == WiperCmdMsg::CAN_ID)
462  {
463  WiperCmdMsg encoder;
464  encoder.encode(msg->ui16_cmd);
465  return encoder.data;
466  }
467 }
468 
469 std::vector<uint8_t> PacmodRxRosMsgHandler::unpackAndEncode(const int64_t& can_id,
470  const pacmod_msgs::PositionWithSpeed::ConstPtr& msg)
471 {
472  std::vector<uint8_t> ret_vec;
473 
474  if (can_id == SteerCmdMsg::CAN_ID)
475  {
476  SteerCmdMsg encoder;
477  encoder.encode(msg->angular_position, msg->angular_velocity_limit);
478  return encoder.data;
479  }
480 }
void fillWheelSpeedRpt(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::WheelSpeedRpt *new_msg, std::string frame_id)
static const int64_t CAN_ID
Definition: pacmod_core.h:455
void encode(uint8_t horn_cmd)
void publish(const boost::shared_ptr< M > &message) const
void fillLatLonHeadingRpt(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::LatLonHeadingRpt *new_msg, std::string frame_id)
static const int64_t CAN_ID
Definition: pacmod_core.h:114
void fillMotorRpt3(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::MotorRpt3 *new_msg, std::string frame_id)
static std::vector< uint8_t > unpackAndEncode(const int64_t &can_id, const pacmod_msgs::PacmodCmd::ConstPtr &msg)
static const int64_t CAN_ID
Definition: pacmod_core.h:410
void fillSteeringPIDRpt1(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::SteeringPIDRpt1 *new_msg, std::string frame_id)
static const int64_t CAN_ID
Definition: pacmod_core.h:437
void fillVehicleSpeedRpt(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::VehicleSpeedRpt *new_msg, std::string frame_id)
static const int64_t CAN_ID
Definition: pacmod_core.h:153
void fillSteeringPIDRpt2(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::SteeringPIDRpt2 *new_msg, std::string frame_id)
void encode(double steer_pos, double steer_spd)
static const int64_t CAN_ID
Definition: pacmod_core.h:383
static const int64_t CAN_ID
Definition: pacmod_core.h:107
void fillMotorRpt2(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::MotorRpt2 *new_msg, std::string frame_id)
void fillMotorRpt1(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::MotorRpt1 *new_msg, std::string frame_id)
static const int64_t CAN_ID
Definition: pacmod_core.h:60
static const int64_t CAN_ID
Definition: pacmod_core.h:146
std::vector< unsigned char > _data
void encode(double accel_cmd)
std::vector< uint8_t > data
Definition: pacmod_core.h:376
void encode(uint8_t wiper_cmd)
std::vector< unsigned char > getData() const
void fillSystemRptInt(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::SystemRptInt *new_msg, std::string frame_id)
void fillDateTimeRpt(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::DateTimeRpt *new_msg, std::string frame_id)
void fillSystemRptFloat(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::SystemRptFloat *new_msg, std::string frame_id)
void encode(double brake_cmd)
void encode(uint8_t turn_signal_cmd)
void encode(uint8_t shift_cmd)
static const int64_t CAN_ID
Definition: pacmod_core.h:419
static const int64_t CAN_ID
Definition: pacmod_core.h:100
static const int64_t CAN_ID
Definition: pacmod_core.h:428
void encode(uint8_t headlight_cmd)
static const int64_t CAN_ID
Definition: pacmod_core.h:43
void fillYawRateRpt(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::YawRateRpt *new_msg, std::string frame_id)
void fillSteeringPIDRpt4(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::SteeringPIDRpt4 *new_msg, std::string frame_id)
static const int64_t CAN_ID
Definition: pacmod_core.h:132
void setData(std::vector< unsigned char > new_data)
void fillVinRpt(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::VinRpt *new_msg, std::string frame_id)
static const int64_t CAN_ID
Definition: pacmod_core.h:160
void fillGlobalRpt(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::GlobalRpt *new_msg, std::string frame_id)
void fillSteeringPIDRpt3(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::SteeringPIDRpt3 *new_msg, std::string frame_id)
static Time now()
static const int64_t CAN_ID
Definition: pacmod_core.h:139
void fillAndPublish(const int64_t &can_id, std::string frame_id, const ros::Publisher &pub, const std::shared_ptr< PacmodTxMsg > &parser_class)
void fillParkingBrakeStatusRpt(const std::shared_ptr< PacmodTxMsg > &parser_class, pacmod_msgs::ParkingBrakeStatusRpt *new_msg, std::string frame_id)
static const int64_t CAN_ID
Definition: pacmod_core.h:446
void encode(bool enable, bool clear_override, bool ignore_overide)


pacmod
Author(s): Joe Driscoll , Josh Whitley
autogenerated on Fri Jun 7 2019 21:54:13