servicefunctions.h
Go to the documentation of this file.
1 
7 #ifndef SERVICEFUNCTIONS_H
8 #define SERVICEFUNCTIONS_H
9 
10 #include <ros/ros.h>
12 // service includes begin
13 #include <pses_ucbridge/DeleteGroup.h>
14 #include <pses_ucbridge/GetControllerID.h>
15 #include <pses_ucbridge/GetDAQStatus.h>
16 #include <pses_ucbridge/GetFirmwareVersion.h>
17 #include <pses_ucbridge/GetIMUInfo.h>
18 #include <pses_ucbridge/GetInfoAllGroups.h>
19 #include <pses_ucbridge/GetInfoGroup.h>
20 #include <pses_ucbridge/GetKinectStatus.h>
21 #include <pses_ucbridge/GetMagASA.h>
22 #include <pses_ucbridge/GetMagInfo.h>
23 #include <pses_ucbridge/GetMotorLevel.h>
24 #include <pses_ucbridge/GetSessionID.h>
25 #include <pses_ucbridge/GetSteeringLevel.h>
26 #include <pses_ucbridge/GetUSInfo.h>
27 #include <pses_ucbridge/ResetController.h>
28 #include <pses_ucbridge/ResetDMS.h>
29 #include <pses_ucbridge/SetIMU.h>
30 #include <pses_ucbridge/SetMag.h>
31 #include <pses_ucbridge/SetMotorLevel.h>
32 #include <pses_ucbridge/SetSteering.h>
33 #include <pses_ucbridge/SetSessionID.h>
34 #include <pses_ucbridge/SetUS.h>
35 #include <pses_ucbridge/ToggleBrakes.h>
36 #include <pses_ucbridge/ToggleDAQ.h>
37 #include <pses_ucbridge/ToggleDMS.h>
38 #include <pses_ucbridge/ToggleGroup.h>
39 #include <pses_ucbridge/ToggleKinect.h>
40 #include <pses_ucbridge/ToggleMotor.h>
41 #include <pses_ucbridge/ToggleUS.h>
42 
43 // service includes end
44 
52 namespace ServiceFunctions
53 {
54 
63 bool deleteGroup(pses_ucbridge::DeleteGroup::Request& req,
64  pses_ucbridge::DeleteGroup::Response& res, Communication* com)
65 {
66  res.was_set = false;
67  std::string cmd = "Delete Group";
70  input.insertParameter("grp_nr", "uint8_t", req.group_number);
71  try
72  {
73  res.was_set = com->sendCommand(cmd, input, output);
74  }
75  catch (std::exception& e)
76  {
77  ROS_WARN_STREAM(
78  "An error in Service 'Delete Group' occured!\n Description: "
79  << e.what());
80  res.was_set = false;
81  return false;
82  }
83  return true;
84 }
93 bool getControllerID(pses_ucbridge::GetControllerID::Request& req,
94  pses_ucbridge::GetControllerID::Response& res,
95  Communication* com)
96 {
97  res.answer_received = false;
98  std::string cmd = "Get Controller ID";
101  try
102  {
103  res.answer_received = com->sendCommand(cmd, input, output);
104  if (!res.answer_received)
105  return false;
106  output.getParameterValue("ID", res.ID);
107  }
108  catch (std::exception& e)
109  {
110  ROS_WARN_STREAM(
111  "An error in Service 'Get Controller ID' occured!\n Description: "
112  << e.what());
113  res.answer_received = false;
114  return false;
115  }
116  return true;
117 }
126 bool getDAQStatus(pses_ucbridge::GetDAQStatus::Request& req,
127  pses_ucbridge::GetDAQStatus::Response& res,
128  Communication* com)
129 {
130  res.answer_received = false;
131  std::string cmd = "Is DAQ Started";
134  try
135  {
136  res.answer_received = com->sendCommand(cmd, input, output);
137  if (!res.answer_received)
138  return false;
139  output.getParameterValue("info", res.status);
140  }
141  catch (std::exception& e)
142  {
143  ROS_WARN_STREAM(
144  "An error in Service 'Is DAQ Started' occured!\n Description: "
145  << e.what());
146  res.answer_received = false;
147  return false;
148  }
149  return true;
150 }
159 bool getFirmwareVersion(pses_ucbridge::GetFirmwareVersion::Request& req,
160  pses_ucbridge::GetFirmwareVersion::Response& res,
161  Communication* com)
162 {
163  res.answer_received = false;
164  std::string cmd = "Get Firmware Version";
167  try
168  {
169  res.answer_received = com->sendCommand(cmd, input, output);
170  if (!res.answer_received)
171  return false;
172  output.getParameterValue("version", res.version);
173  }
174  catch (std::exception& e)
175  {
176  ROS_WARN_STREAM(
177  "An error in Service 'Get Firmware Version' occured!\n Description: "
178  << e.what());
179  res.answer_received = false;
180  return false;
181  }
182  return true;
183 }
192 bool getIMUInfo(pses_ucbridge::GetIMUInfo::Request& req,
193  pses_ucbridge::GetIMUInfo::Response& res, Communication* com)
194 {
195  res.answer_received = false;
196  std::string cmd = "Get IMU Info";
199  try
200  {
201  res.answer_received = com->sendCommand(cmd, input, output);
202  if (!res.answer_received)
203  return false;
204  output.getParameterValue("info", res.info);
205  }
206  catch (std::exception& e)
207  {
208  ROS_WARN_STREAM(
209  "An error in Service 'Get IMU info' occured!\n Description: "
210  << e.what());
211  res.answer_received = false;
212  return false;
213  }
214  return true;
215 }
224 bool getInfoAllGroups(pses_ucbridge::GetInfoAllGroups::Request& req,
225  pses_ucbridge::GetInfoAllGroups::Response& res,
226  Communication* com)
227 {
228  res.answer_received = false;
229  std::string cmd = "All Groups Info";
232  try
233  {
234  res.answer_received = com->sendCommand(cmd, input, output);
235  if (!res.answer_received)
236  return false;
237  output.getParameterValue("info", res.info);
238  }
239  catch (std::exception& e)
240  {
241  ROS_WARN_STREAM(
242  "An error in Service 'All Groups Info' occured!\n Description: "
243  << e.what());
244  res.answer_received = false;
245  return false;
246  }
247  return true;
248 }
257 bool getInfoGroup(pses_ucbridge::GetInfoGroup::Request& req,
258  pses_ucbridge::GetInfoGroup::Response& res,
259  Communication* com)
260 {
261  res.answer_received = false;
262  std::string cmd = "Group Info";
265  input.insertParameter("grp_nr", "uint8_t", req.group_number);
266  try
267  {
268  res.answer_received = com->sendCommand(cmd, input, output);
269  if (!res.answer_received)
270  return false;
271  output.getParameterValue("info", res.info);
272  }
273  catch (std::exception& e)
274  {
275  ROS_WARN_STREAM("An error in Service 'Group Info' occured!\n Description: "
276  << e.what());
277  res.answer_received = false;
278  return false;
279  }
280  return true;
281 }
290 bool getKinectStatus(pses_ucbridge::GetKinectStatus::Request& req,
291  pses_ucbridge::GetKinectStatus::Response& res,
292  Communication* com)
293 {
294  res.answer_received = false;
295  std::string cmd = "Get Kinect Status";
298  try
299  {
300  res.answer_received = com->sendCommand(cmd, input, output);
301  if (!res.answer_received)
302  return false;
303  output.getParameterValue("kinect_stat", res.status);
304  }
305  catch (std::exception& e)
306  {
307  ROS_WARN_STREAM(
308  "An error in Service 'Get Kinect Status' occured!\n Description: "
309  << e.what());
310  res.answer_received = false;
311  return false;
312  }
313  return true;
314 }
323 bool getMagASA(pses_ucbridge::GetMagASA::Request& req,
324  pses_ucbridge::GetMagASA::Response& res, Communication* com)
325 {
326  res.answer_received = false;
327  std::string cmd = "Get MAG ASA";
330  try
331  {
332  res.answer_received = com->sendCommand(cmd, input, output);
333  if (!res.answer_received)
334  return false;
335  output.getParameterValue("asa_mx", res.asa_mx);
336  output.getParameterValue("asa_my", res.asa_my);
337  output.getParameterValue("asa_mz", res.asa_mz);
338  }
339  catch (std::exception& e)
340  {
341  ROS_WARN_STREAM("An error in Service 'Get Mag ASA' occured!\n Description: "
342  << e.what());
343  res.answer_received = false;
344  return false;
345  }
346  return true;
347 }
356 bool getMagInfo(pses_ucbridge::GetMagInfo::Request& req,
357  pses_ucbridge::GetMagInfo::Response& res, Communication* com)
358 {
359  res.answer_received = false;
360  std::string cmd = "Get MAG Info";
363  try
364  {
365  res.answer_received = com->sendCommand(cmd, input, output);
366  if (!res.answer_received)
367  return false;
368  output.getParameterValue("info", res.info);
369  }
370  catch (std::exception& e)
371  {
372  ROS_WARN_STREAM(
373  "An error in Service 'Get Mag info' occured!\n Description: "
374  << e.what());
375  res.answer_received = false;
376  return false;
377  }
378  return true;
379 }
388 bool getMotorLevel(pses_ucbridge::GetMotorLevel::Request& req,
389  pses_ucbridge::GetMotorLevel::Response& res,
390  Communication* com)
391 {
392  res.answer_received = false;
393  std::string cmd = "Get Motor Level";
396  try
397  {
398  res.answer_received = com->sendCommand(cmd, input, output);
399  if (!res.answer_received)
400  return false;
401  std::string direction;
402  short level;
403  output.getParameterValue("direction", direction);
404  output.getParameterValue("level", level);
405  if (direction.compare("F") != 0)
406  {
407  level = -level;
408  }
409  res.level = level;
410  }
411  catch (std::exception& e)
412  {
413  ROS_WARN_STREAM(
414  "An error in Service 'Get Motor Level' occured!\n Description: "
415  << e.what());
416  res.answer_received = false;
417  return false;
418  }
419  return true;
420 }
429 bool getSessionID(pses_ucbridge::GetSessionID::Request& req,
430  pses_ucbridge::GetSessionID::Response& res,
431  Communication* com)
432 {
433  res.answer_received = false;
434  std::string cmd = "Get Session ID";
437  try
438  {
439  res.answer_received = com->sendCommand(cmd, input, output);
440  if (!res.answer_received)
441  return false;
442  output.getParameterValue("ID", res.SID);
443  }
444  catch (std::exception& e)
445  {
446  ROS_WARN_STREAM(
447  "An error in Service 'Get Session ID' occured!\n Description: "
448  << e.what());
449  res.answer_received = false;
450  return false;
451  }
452  return true;
453 }
462 bool getSteeringLevel(pses_ucbridge::GetSteeringLevel::Request& req,
463  pses_ucbridge::GetSteeringLevel::Response& res,
464  Communication* com)
465 {
466  res.answer_received = false;
467  std::string cmd = "Get Steering Level";
470  try
471  {
472  res.answer_received = com->sendCommand(cmd, input, output);
473  if (!res.answer_received)
474  return false;
475  output.getParameterValue("level", res.level);
476  }
477  catch (std::exception& e)
478  {
479  ROS_WARN_STREAM(
480  "An error in Service 'Get Steering Level' occured!\n Description: "
481  << e.what());
482  res.answer_received = false;
483  return false;
484  }
485  return true;
486 }
495 bool getUSInfo(pses_ucbridge::GetUSInfo::Request& req,
496  pses_ucbridge::GetUSInfo::Response& res, Communication* com)
497 {
498  res.answer_received = false;
499  std::string cmd = "Get US Info";
502  try
503  {
504  res.answer_received = com->sendCommand(cmd, input, output);
505  if (!res.answer_received)
506  return false;
507  output.getParameterValue("info", res.info);
508  }
509  catch (std::exception& e)
510  {
511  ROS_WARN_STREAM("An error in Service 'Get US info' occured!\n Description: "
512  << e.what());
513  res.answer_received = false;
514  return false;
515  }
516  return true;
517 }
526 bool resetController(pses_ucbridge::ResetController::Request& req,
527  pses_ucbridge::ResetController::Response& res,
528  Communication* com)
529 {
530  res.was_set = false;
531  std::string cmd = "Reset Controller";
534  try
535  {
536  com->sendCommand(cmd, input, output);
537  res.was_set = true;
538  }
539  catch (std::exception& e)
540  {
541  ROS_WARN_STREAM(
542  "An error in Service 'Reset Controller' occured!\n Description: "
543  << e.what());
544  res.was_set = false;
545  return false;
546  }
547  return true;
548 }
557 bool resetDMS(pses_ucbridge::ResetDMS::Request& req,
558  pses_ucbridge::ResetDMS::Response& res, Communication* com)
559 {
560  res.was_set = false;
561  std::string cmd = "Reset DMS";
564  try
565  {
566  res.was_set = com->sendCommand(cmd, input, output);
567  }
568  catch (std::exception& e)
569  {
570  ROS_WARN_STREAM(
571  "An error in Service 'toggleDMS' occured!\n Description: " << e.what());
572  res.was_set = false;
573  return false;
574  }
575  return true;
576 }
585 bool setIMU(pses_ucbridge::SetIMU::Request& req,
586  pses_ucbridge::SetIMU::Response& res, Communication* com)
587 {
588  res.was_set = false;
589  std::string cmd = "Set IMU";
592  input.insertParameter("arange", "int16_t", req.accel_range);
593  input.insertParameter("afilt", "int16_t", req.accel_filter);
594  input.insertParameter("grange", "int16_t", req.gyro_range);
595  input.insertParameter("gfilt", "int16_t", req.gyro_filter);
596  std::vector<std::string> options;
597  options.push_back("IMU_AccelRange");
598  options.push_back("IMU_AccelFilter");
599  options.push_back("IMU_GyroRange");
600  options.push_back("IMU_GyroFilter");
601  options.push_back("IMU_si_info");
602  try
603  {
604  res.was_set = com->sendCommand(cmd, options, input, output);
605  output.getParameterValue("info", res.in_si_units);
606  }
607  catch (std::exception& e)
608  {
609  ROS_WARN_STREAM(
610  "An error in Service 'Set IMU' occured!\n Description: " << e.what());
611  res.was_set = false;
612  return false;
613  }
614  return true;
615 }
624 bool setMag(pses_ucbridge::SetMag::Request& req,
625  pses_ucbridge::SetMag::Response& res, Communication* com)
626 {
627  res.was_set = false;
628  std::string cmd = "Set MAG";
631  unsigned char use_asa = req.use_asa;
632  input.insertParameter("use_asa", "uint8_t", use_asa);
633  std::vector<std::string> options;
634  options.push_back("MAG_USEASA");
635  try
636  {
637  res.was_set = com->sendCommand(cmd, options, input, output);
638  }
639  catch (std::exception& e)
640  {
641  ROS_WARN_STREAM(
642  "An error in Service 'Set IMU' occured!\n Description: " << e.what());
643  res.was_set = false;
644  return false;
645  }
646  return true;
647 }
656 bool setMotorLevel(pses_ucbridge::SetMotorLevel::Request& req,
657  pses_ucbridge::SetMotorLevel::Response& res,
658  Communication* com)
659 {
660  res.was_set = false;
661  std::string cmd = "Drive Forward";
662  short level = req.level;
663  if (req.level < 0)
664  {
665  cmd = "Drive Backward";
666  level = -req.level;
667  }
668 
671  input.insertParameter("speed", "int16_t", level);
672  try
673  {
674  res.was_set = com->sendCommand(cmd, input, output);
675  }
676  catch (std::exception& e)
677  {
678  ROS_WARN_STREAM(
679  "An error in Service 'Set Motor Level' occured!\n Description: "
680  << e.what());
681  res.was_set = false;
682  return false;
683  }
684  return true;
685 }
694 bool setSessionID(pses_ucbridge::SetSessionID::Request& req,
695  pses_ucbridge::SetSessionID::Response& res,
696  Communication* com)
697 {
698  res.was_set = false;
699  std::string cmd = "Set Session ID";
702  input.insertParameter("ID", "int32_t", req.sid);
703  try
704  {
705  res.was_set = com->sendCommand(cmd, input, output);
706  }
707  catch (std::exception& e)
708  {
709  ROS_WARN_STREAM(
710  "An error in Service 'Set Session ID' occured!\n Description: "
711  << e.what());
712  res.was_set = false;
713  return false;
714  }
715  return true;
716 }
725 bool setSteeringLevel(pses_ucbridge::SetSteering::Request& req,
726  pses_ucbridge::SetSteering::Response& res,
727  Communication* com)
728 {
729  res.was_set = false;
730  std::string cmd = "Set Steering Level";
733  input.insertParameter("steering", "int16_t", req.steering);
734  try
735  {
736  res.was_set = com->sendCommand(cmd, input, output);
737  }
738  catch (std::exception& e)
739  {
740  ROS_WARN_STREAM(
741  "An error in Service 'Set Steering Level' occured!\n Description: "
742  << e.what());
743  res.was_set = false;
744  return false;
745  }
746  return true;
747 }
756 bool setUS(pses_ucbridge::SetUS::Request& req,
757  pses_ucbridge::SetUS::Response& res, Communication* com)
758 {
759  res.was_set = false;
760  std::string cmd = "Set US";
763  input.insertParameter("usrange", "int16_t", req.range);
764  input.insertParameter("usgain", "int16_t", req.gain);
765  std::vector<std::string> options;
766  options.push_back("US_Range");
767  options.push_back("US_Gain");
768  options.push_back("US_si_info");
769  try
770  {
771  res.was_set = com->sendCommand(cmd, options, input, output);
772  output.getParameterValue("info", res.in_si_units);
773  }
774  catch (std::exception& e)
775  {
776  ROS_WARN_STREAM(
777  "An error in Service 'Set US' occured!\n Description: " << e.what());
778  res.was_set = false;
779  return false;
780  }
781  return true;
782 }
791 bool toggleBrakes(pses_ucbridge::ToggleBrakes::Request& req,
792  pses_ucbridge::ToggleBrakes::Response& res,
793  Communication* com)
794 {
795  res.was_set = false;
798  std::string cmd;
799  if (req.brakes_on)
800  {
801  cmd = "Full Stop";
802  }
803  else
804  {
805  cmd = "Drive Forward";
806  short level = 0;
807  input.insertParameter("speed", "int16_t", level);
808  }
809  try
810  {
811  res.was_set = com->sendCommand(cmd, input, output);
812  }
813  catch (std::exception& e)
814  {
815  ROS_WARN_STREAM(
816  "An error in Service 'Toggle Brakes' occured!\n Description: "
817  << e.what());
818  res.was_set = false;
819  return false;
820  }
821  return true;
822 }
831 bool toggleDAQ(pses_ucbridge::ToggleDAQ::Request& req,
832  pses_ucbridge::ToggleDAQ::Response& res, Communication* com)
833 {
834  res.was_set = false;
837  std::string cmd;
838  if (req.DAQ_on)
839  {
840  cmd = "Start DAQ";
841  }
842  else
843  {
844  cmd = "Stop DAQ";
845  }
846  try
847  {
848  res.was_set = com->sendCommand(cmd, input, output);
849  }
850  catch (std::exception& e)
851  {
852  ROS_WARN_STREAM("An error in Service 'Toggle DAQ' occured!\n Description: "
853  << e.what());
854  res.was_set = false;
855  return false;
856  }
857  return true;
858 }
867 bool toggleDMS(pses_ucbridge::ToggleDMS::Request& req,
868  pses_ucbridge::ToggleDMS::Response& res, Communication* com)
869 {
870  res.was_set = false;
871  std::string cmd = "Set Drv";
872  unsigned int interval = 0;
873  if (req.dms_on)
874  {
875  interval = req.dms_interval;
876  }
877 
880  std::vector<std::string> options;
881  options.push_back("DMS_Interval");
882  input.insertParameter("dms_time", "uint32_t", interval);
883  try
884  {
885  res.was_set = com->sendCommand(cmd, options, input, output);
886  }
887  catch (std::exception& e)
888  {
889  ROS_WARN_STREAM(
890  "An error in Service 'toggleDMS' occured!\n Description: " << e.what());
891  res.was_set = false;
892  return false;
893  }
894  return true;
895 }
904 bool toggleGroup(pses_ucbridge::ToggleGroup::Request& req,
905  pses_ucbridge::ToggleGroup::Response& res, Communication* com)
906 {
907  res.was_set = false;
910  std::string cmd;
911  if (req.group_on)
912  {
913  cmd = "Activate Group";
914  }
915  else
916  {
917  cmd = "Deactivate Group";
918  }
919  input.insertParameter("grp_nr", "uint8_t", req.group_number);
920  try
921  {
922  res.was_set = com->sendCommand(cmd, input, output);
923  }
924  catch (std::exception& e)
925  {
926  ROS_WARN_STREAM(
927  "An error in Service 'Toggle Group' occured!\n Description: "
928  << e.what());
929  res.was_set = false;
930  return false;
931  }
932  return true;
933 }
942 bool toggleKinect(pses_ucbridge::ToggleKinect::Request& req,
943  pses_ucbridge::ToggleKinect::Response& res,
944  Communication* com)
945 {
946  res.was_set = false;
949  std::string cmd;
950  if (req.kinect_on)
951  {
952  cmd = "Toggle Kinect On";
953  }
954  else
955  {
956  cmd = "Toggle Kinect Off";
957  }
958 
959  try
960  {
961  res.was_set = com->sendCommand(cmd, input, output);
962  }
963  catch (std::exception& e)
964  {
965  ROS_WARN_STREAM(
966  "An error in Service 'Toggle Kinect' occured!\n Description: "
967  << e.what());
968  res.was_set = false;
969  return false;
970  }
971  return true;
972 }
981 bool toggleMotor(pses_ucbridge::ToggleMotor::Request& req,
982  pses_ucbridge::ToggleMotor::Response& res, Communication* com)
983 {
984  res.was_set = false;
987  std::string cmd;
988  if (req.motor_on)
989  {
990  cmd = "Drive Forward";
991  short level = 0;
992  input.insertParameter("speed", "int16_t", level);
993  }
994  else
995  {
996  cmd = "Motor Off";
997  }
998  try
999  {
1000  res.was_set = com->sendCommand(cmd, input, output);
1001  }
1002  catch (std::exception& e)
1003  {
1004  ROS_WARN_STREAM(
1005  "An error in Service 'Toggle Motor' occured!\n Description: "
1006  << e.what());
1007  res.was_set = false;
1008  return false;
1009  }
1010  return true;
1011 }
1020 bool toggleUS(pses_ucbridge::ToggleUS::Request& req,
1021  pses_ucbridge::ToggleUS::Response& res, Communication* com)
1022 {
1023  res.was_set = false;
1025  Parameter::ParameterMap output;
1026  std::string cmd;
1027  if (req.us_on)
1028  {
1029  cmd = "Toggle US On";
1030  }
1031  else
1032  {
1033  cmd = "Toggle US Off";
1034  }
1035 
1036  try
1037  {
1038  res.was_set = com->sendCommand(cmd, input, output);
1039  }
1040  catch (std::exception& e)
1041  {
1042  ROS_WARN_STREAM(
1043  "An error in Service 'Toggle US' occured!\n Description: " << e.what());
1044  res.was_set = false;
1045  return false;
1046  }
1047  return true;
1048 }
1049 }
1050 #endif // SERVICEFUNCTIONS_H
bool getMagInfo(pses_ucbridge::GetMagInfo::Request &req, pses_ucbridge::GetMagInfo::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit info about its magnetic f...
bool getUSInfo(pses_ucbridge::GetUSInfo::Request &req, pses_ucbridge::GetUSInfo::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit the calibration of its ul...
Header file for the Communication class.
bool toggleKinect(pses_ucbridge::ToggleKinect::Request &req, pses_ucbridge::ToggleKinect::Response &res, Communication *com)
A call to this Service will send a command to the serial device to activate/deactivate the kinect pow...
bool getIMUInfo(pses_ucbridge::GetIMUInfo::Request &req, pses_ucbridge::GetIMUInfo::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit the calibration of its IM...
bool toggleGroup(pses_ucbridge::ToggleGroup::Request &req, pses_ucbridge::ToggleGroup::Response &res, Communication *com)
A call to this Service will send a command to the serial device to activate/deactivate a particular g...
bool setSessionID(pses_ucbridge::SetSessionID::Request &req, pses_ucbridge::SetSessionID::Response &res, Communication *com)
A call to this Service will send a command to the serial device to set the current session id...
bool setUS(pses_ucbridge::SetUS::Request &req, pses_ucbridge::SetUS::Response &res, Communication *com)
A call to this Service will send a command to the serial device to change the calibration of its ultr...
bool deleteGroup(pses_ucbridge::DeleteGroup::Request &req, pses_ucbridge::DeleteGroup::Response &res, Communication *com)
A call to this Service will send a command to the serial device to delete a certain group...
bool getFirmwareVersion(pses_ucbridge::GetFirmwareVersion::Request &req, pses_ucbridge::GetFirmwareVersion::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit its firmware version...
bool getInfoGroup(pses_ucbridge::GetInfoGroup::Request &req, pses_ucbridge::GetInfoGroup::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit the info about a particul...
The Parameter::ParameterMap class provides a map functionality for Parameter::Parameter objects conta...
Definition: parameter.h:163
bool sendCommand(const std::string &command, const Parameter::ParameterMap &inputParams, Parameter::ParameterMap &outputParams, unsigned int timeout=100000)
Send a command to the servial device.
bool getKinectStatus(pses_ucbridge::GetKinectStatus::Request &req, pses_ucbridge::GetKinectStatus::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit the power supply status o...
bool getInfoAllGroups(pses_ucbridge::GetInfoAllGroups::Request &req, pses_ucbridge::GetInfoAllGroups::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit info about all registered...
bool setIMU(pses_ucbridge::SetIMU::Request &req, pses_ucbridge::SetIMU::Response &res, Communication *com)
A call to this Service will send a command to the serial device to change the calibration of its IMU...
bool getDAQStatus(pses_ucbridge::GetDAQStatus::Request &req, pses_ucbridge::GetDAQStatus::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit the daq status...
bool getControllerID(pses_ucbridge::GetControllerID::Request &req, pses_ucbridge::GetControllerID::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit its id.
The Communication class provides access to microcontroller communication.
Definition: communication.h:36
bool toggleDMS(pses_ucbridge::ToggleDMS::Request &req, pses_ucbridge::ToggleDMS::Response &res, Communication *com)
A call to this Service will send a command to the serial device to activate/deactivate the dead man&#39;s...
void insertParameter(const std::string &name, const std::string &type, const T &value, const bool isValid=true)
Insert a new parameter in this map, with the given name, type and value.
Definition: parameter.h:219
bool getMotorLevel(pses_ucbridge::GetMotorLevel::Request &req, pses_ucbridge::GetMotorLevel::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit the current motor level...
bool setMag(pses_ucbridge::SetMag::Request &req, pses_ucbridge::SetMag::Response &res, Communication *com)
A call to this Service will send a command to the serial device whether to use the magnetic field sen...
bool resetController(pses_ucbridge::ResetController::Request &req, pses_ucbridge::ResetController::Response &res, Communication *com)
A call to this Service will send a command to the serial device to do perform a soft reset...
Contains all service functions and their respective implementations.
bool resetDMS(pses_ucbridge::ResetDMS::Request &req, pses_ucbridge::ResetDMS::Response &res, Communication *com)
A call to this Service will send a command to the serial device to reset the counter on the dead man&#39;...
bool toggleBrakes(pses_ucbridge::ToggleBrakes::Request &req, pses_ucbridge::ToggleBrakes::Response &res, Communication *com)
A call to this Service will send a command to the serial device to activate/deactivate its motor brak...
bool getSteeringLevel(pses_ucbridge::GetSteeringLevel::Request &req, pses_ucbridge::GetSteeringLevel::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit the current steering leve...
bool toggleDAQ(pses_ucbridge::ToggleDAQ::Request &req, pses_ucbridge::ToggleDAQ::Response &res, Communication *com)
A call to this Service will send a command to the serial device to activate/deactivate the daq...
bool setSteeringLevel(pses_ucbridge::SetSteering::Request &req, pses_ucbridge::SetSteering::Response &res, Communication *com)
A call to this Service will send a command to the serial device to change the current steering level...
bool getMagASA(pses_ucbridge::GetMagASA::Request &req, pses_ucbridge::GetMagASA::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit the calibration of its ma...
bool setMotorLevel(pses_ucbridge::SetMotorLevel::Request &req, pses_ucbridge::SetMotorLevel::Response &res, Communication *com)
A call to this Service will send a command to the serial device to change the current motor level...
bool getSessionID(pses_ucbridge::GetSessionID::Request &req, pses_ucbridge::GetSessionID::Response &res, Communication *com)
A call to this Service will send a command to the serial device to transmit its current session id...
void getParameterValue(const std::string &name, T &value) const
Get the value of a parameter in this map with the given name.
Definition: parameter.h:235
bool toggleMotor(pses_ucbridge::ToggleMotor::Request &req, pses_ucbridge::ToggleMotor::Response &res, Communication *com)
A call to this Service will send a command to the serial device to activate/deactivate the motor cont...
bool toggleUS(pses_ucbridge::ToggleUS::Request &req, pses_ucbridge::ToggleUS::Response &res, Communication *com)
A call to this Service will send a command to the serial device to activate/deactivate the ultra soni...


pses_ucbridge
Author(s): Sebastian Ehmes
autogenerated on Sat Oct 28 2017 19:16:13