uc_bridge.cpp
Go to the documentation of this file.
1 
8 
9 int main(int argc, char** argv)
10 {
11  // set up ros node handle
12  ros::init(argc, argv, "uc_bridge", ros::init_options::NoSigintHandler);
13  ros::NodeHandle nh;
14  // get launch paramer
15  bool regSensorGrps, motorCtrlOn, steeringCtrlOn, kinectOn, usOn, daqOn,
16  debugMsgOn, rawComOn;
17  std::string configPath;
18  nh.getParam("/uc_bridge/reset_on_shutdown", uc_bridge::rstOnShutdown);
19  nh.getParam("/uc_bridge/register_sensor_groups", regSensorGrps);
20  nh.getParam("/uc_bridge/activate_motor_controller", motorCtrlOn);
21  nh.getParam("/uc_bridge/activate_steering_controller", steeringCtrlOn);
22  nh.getParam("/uc_bridge/activate_kinect", kinectOn);
23  nh.getParam("/uc_bridge/activate_us_sensors", usOn);
24  nh.getParam("/uc_bridge/activate_daq", daqOn);
25  nh.getParam("/uc_bridge/config_path", configPath);
26  nh.getParam("/uc_bridge/enable_debug_messages", debugMsgOn);
27  nh.getParam("/uc_bridge/enable_raw_communication", rawComOn);
28  if (rawComOn)
29  {
30  regSensorGrps = false;
31  motorCtrlOn = false;
32  steeringCtrlOn = false;
33  kinectOn = false;
34  usOn = false;
35  daqOn = false;
36  }
37  // load communication config files and init communication
38  // std::string typesPath = ros::package::getPath("pses_ucbridge") + "/config/";
39  Communication com(configPath);
40  uc_bridge::com_ptr = &com;
41  // create sensor group publish services
42  ros::Publisher grp11 = nh.advertise<sensor_msgs::Range>("/uc_bridge/usl", 10);
43  ros::Publisher grp12 = nh.advertise<sensor_msgs::Range>("/uc_bridge/usf", 10);
44  ros::Publisher grp13 = nh.advertise<sensor_msgs::Range>("/uc_bridge/usr", 10);
45  ros::Publisher grp2 = nh.advertise<sensor_msgs::Imu>("/uc_bridge/imu", 10);
46  ros::Publisher grp31 =
47  nh.advertise<std_msgs::UInt8>("/uc_bridge/hall_cnt", 10);
48  ros::Publisher grp32 =
49  nh.advertise<std_msgs::Float64>("/uc_bridge/hall_dt", 10);
50  ros::Publisher grp6 =
51  nh.advertise<std_msgs::Float64>("/uc_bridge/hall_dt8", 10);
52  ros::Publisher grp4 =
53  nh.advertise<sensor_msgs::MagneticField>("/uc_bridge/mag", 10);
54  ros::Publisher grp51 =
55  nh.advertise<sensor_msgs::BatteryState>("/uc_bridge/vdbat", 10);
56  ros::Publisher grp52 =
57  nh.advertise<sensor_msgs::BatteryState>("/uc_bridge/vsbat", 10);
58  ros::Publisher debug;
59  if (debugMsgOn)
60  debug = nh.advertise<std_msgs::String>("DEBUG", 10);
61  // group publish services by putting them into a map
62  std::unordered_map<std::string, ros::Publisher*> usGrp;
63  std::unordered_map<std::string, ros::Publisher*> imuGrp;
64  std::unordered_map<std::string, ros::Publisher*> hallcntDtGrp;
65  std::unordered_map<std::string, ros::Publisher*> hallDt8Grp;
66  std::unordered_map<std::string, ros::Publisher*> magGrp;
67  std::unordered_map<std::string, ros::Publisher*> batGrp;
68  usGrp.insert(std::make_pair("USL", &grp11));
69  usGrp.insert(std::make_pair("USF", &grp12));
70  usGrp.insert(std::make_pair("USR", &grp13));
71  imuGrp.insert(std::make_pair("IMU", &grp2));
72  hallcntDtGrp.insert(std::make_pair("HALL_CNT", &grp31));
73  hallcntDtGrp.insert(std::make_pair("HALL_DT", &grp32));
74  hallDt8Grp.insert(std::make_pair("HALL_DT8", &grp6));
75  magGrp.insert(std::make_pair("MAG", &grp4));
76  batGrp.insert(std::make_pair("VDBAT", &grp51));
77  batGrp.insert(std::make_pair("VSBAT", &grp52));
78 
79  // register publish callbacks with the uc-board communication framework
80  if (regSensorGrps)
81  {
83  1, boost::bind(&uc_bridge::publishSensorGroupMessage1, _1, usGrp));
85  2, boost::bind(&uc_bridge::publishSensorGroupMessage2, _1, imuGrp));
87  3, boost::bind(&uc_bridge::publishSensorGroupMessage3, _1, hallcntDtGrp));
89  4, boost::bind(&uc_bridge::publishSensorGroupMessage4, _1, magGrp));
91  5, boost::bind(&uc_bridge::publishSensorGroupMessage5, _1, batGrp));
93  6, boost::bind(&uc_bridge::publishSensorGroupMessage6, _1, hallDt8Grp));
94  }
95  // debug special modes
96  if (debugMsgOn)
98  boost::bind(&uc_bridge::publishDebugMessage, _1, &debug));
99  if (rawComOn)
101 
102  // register error/txt-message callbacks
105 
106  // start serial communication
107  try
108  {
109  com.connect();
110  com.startCommunication();
111  }
112  catch (std::exception& e)
113  {
114  ROS_WARN_STREAM("An error occured while trying to set up the connection.\n "
115  "Description: "
116  << e.what());
118  }
119 
120  // configure communication according to start up parameters
121  if (regSensorGrps)
122  {
124  }
125 
126  if (motorCtrlOn)
127  {
129  }
130 
131  if (steeringCtrlOn)
132  {
134  }
135 
136  if (kinectOn)
137  {
139  }
140 
141  if (usOn)
142  {
143  uc_bridge::activateUS(&com);
144  }
145 
146  if (daqOn)
147  {
149  }
150 
151  // register uc-board communication services with ros
152  ros::ServiceServer deleteGroupService =
153  nh.advertiseService<pses_ucbridge::DeleteGroup::Request,
154  pses_ucbridge::DeleteGroup::Response>(
155  "/uc_bridge/delete_group",
156  std::bind(ServiceFunctions::deleteGroup, std::placeholders::_1,
157  std::placeholders::_2, &com));
158 
159  ros::ServiceServer getControllerIDService =
160  nh.advertiseService<pses_ucbridge::GetControllerID::Request,
161  pses_ucbridge::GetControllerID::Response>(
162  "/uc_bridge/get_controller_id",
163  std::bind(ServiceFunctions::getControllerID, std::placeholders::_1,
164  std::placeholders::_2, &com));
165 
166  ros::ServiceServer getDAQStatusService =
167  nh.advertiseService<pses_ucbridge::GetDAQStatus::Request,
168  pses_ucbridge::GetDAQStatus::Response>(
169  "/uc_bridge/get_daq_status",
170  std::bind(ServiceFunctions::getDAQStatus, std::placeholders::_1,
171  std::placeholders::_2, &com));
172 
173  ros::ServiceServer getFirmwareVersionService =
174  nh.advertiseService<pses_ucbridge::GetFirmwareVersion::Request,
175  pses_ucbridge::GetFirmwareVersion::Response>(
176  "/uc_bridge/get_firmware_version",
177  std::bind(ServiceFunctions::getFirmwareVersion, std::placeholders::_1,
178  std::placeholders::_2, &com));
179 
180  ros::ServiceServer getIMUInfoService =
181  nh.advertiseService<pses_ucbridge::GetIMUInfo::Request,
182  pses_ucbridge::GetIMUInfo::Response>(
183  "/uc_bridge/get_imu_info",
184  std::bind(ServiceFunctions::getIMUInfo, std::placeholders::_1,
185  std::placeholders::_2, &com));
186 
187  ros::ServiceServer getInfoAllGroupsService =
188  nh.advertiseService<pses_ucbridge::GetInfoAllGroups::Request,
189  pses_ucbridge::GetInfoAllGroups::Response>(
190  "/uc_bridge/get_info_all_groups",
191  std::bind(ServiceFunctions::getInfoAllGroups, std::placeholders::_1,
192  std::placeholders::_2, &com));
193 
194  ros::ServiceServer getInfoGroupService =
195  nh.advertiseService<pses_ucbridge::GetInfoGroup::Request,
196  pses_ucbridge::GetInfoGroup::Response>(
197  "/uc_bridge/get_info_group",
198  std::bind(ServiceFunctions::getInfoGroup, std::placeholders::_1,
199  std::placeholders::_2, &com));
200 
201  ros::ServiceServer getKinectStatusService =
202  nh.advertiseService<pses_ucbridge::GetKinectStatus::Request,
203  pses_ucbridge::GetKinectStatus::Response>(
204  "/uc_bridge/get_kinect_status",
205  std::bind(ServiceFunctions::getKinectStatus, std::placeholders::_1,
206  std::placeholders::_2, &com));
207 
208  ros::ServiceServer getMagASAService =
209  nh.advertiseService<pses_ucbridge::GetMagASA::Request,
210  pses_ucbridge::GetMagASA::Response>(
211  "/uc_bridge/get_mag_asa",
212  std::bind(ServiceFunctions::getMagASA, std::placeholders::_1,
213  std::placeholders::_2, &com));
214 
215  ros::ServiceServer getMagInfoService =
216  nh.advertiseService<pses_ucbridge::GetMagInfo::Request,
217  pses_ucbridge::GetMagInfo::Response>(
218  "/uc_bridge/get_mag_info",
219  std::bind(ServiceFunctions::getMagInfo, std::placeholders::_1,
220  std::placeholders::_2, &com));
221 
222  ros::ServiceServer getMotorLevelService =
223  nh.advertiseService<pses_ucbridge::GetMotorLevel::Request,
224  pses_ucbridge::GetMotorLevel::Response>(
225  "/uc_bridge/get_motor_level",
226  std::bind(ServiceFunctions::getMotorLevel, std::placeholders::_1,
227  std::placeholders::_2, &com));
228 
229  ros::ServiceServer getSessionIDService =
230  nh.advertiseService<pses_ucbridge::GetSessionID::Request,
231  pses_ucbridge::GetSessionID::Response>(
232  "/uc_bridge/get_session_id",
233  std::bind(ServiceFunctions::getSessionID, std::placeholders::_1,
234  std::placeholders::_2, &com));
235 
236  ros::ServiceServer getSteeringLevelService =
237  nh.advertiseService<pses_ucbridge::GetSteeringLevel::Request,
238  pses_ucbridge::GetSteeringLevel::Response>(
239  "/uc_bridge/get_steering_level",
240  std::bind(ServiceFunctions::getSteeringLevel, std::placeholders::_1,
241  std::placeholders::_2, &com));
242 
243  ros::ServiceServer getUSInfoService =
244  nh.advertiseService<pses_ucbridge::GetUSInfo::Request,
245  pses_ucbridge::GetUSInfo::Response>(
246  "/uc_bridge/get_us_info",
247  std::bind(ServiceFunctions::getUSInfo, std::placeholders::_1,
248  std::placeholders::_2, &com));
249 
250  ros::ServiceServer resetControllerService =
251  nh.advertiseService<pses_ucbridge::ResetController::Request,
252  pses_ucbridge::ResetController::Response>(
253  "/uc_bridge/reset_controller",
254  std::bind(ServiceFunctions::resetController, std::placeholders::_1,
255  std::placeholders::_2, &com));
256 
257  ros::ServiceServer resetDMSService =
258  nh.advertiseService<pses_ucbridge::ResetDMS::Request,
259  pses_ucbridge::ResetDMS::Response>(
260  "/uc_bridge/reset_dms",
261  std::bind(ServiceFunctions::resetDMS, std::placeholders::_1,
262  std::placeholders::_2, &com));
263 
264  ros::ServiceServer setIMUService =
265  nh.advertiseService<pses_ucbridge::SetIMU::Request,
266  pses_ucbridge::SetIMU::Response>(
267  "/uc_bridge/set_imu",
268  std::bind(ServiceFunctions::setIMU, std::placeholders::_1,
269  std::placeholders::_2, &com));
270 
271  ros::ServiceServer setMagService =
272  nh.advertiseService<pses_ucbridge::SetMag::Request,
273  pses_ucbridge::SetMag::Response>(
274  "/uc_bridge/set_mag",
275  std::bind(ServiceFunctions::setMag, std::placeholders::_1,
276  std::placeholders::_2, &com));
277 
278  ros::ServiceServer setMotorLevelService =
279  nh.advertiseService<pses_ucbridge::SetMotorLevel::Request,
280  pses_ucbridge::SetMotorLevel::Response>(
281  "/uc_bridge/set_motor_level",
282  std::bind(ServiceFunctions::setMotorLevel, std::placeholders::_1,
283  std::placeholders::_2, &com));
284 
285  ros::ServiceServer setSessionIDService =
286  nh.advertiseService<pses_ucbridge::SetSessionID::Request,
287  pses_ucbridge::SetSessionID::Response>(
288  "/uc_bridge/set_session_id",
289  std::bind(ServiceFunctions::setSessionID, std::placeholders::_1,
290  std::placeholders::_2, &com));
291 
292  ros::ServiceServer setSteeringLevelService =
293  nh.advertiseService<pses_ucbridge::SetSteering::Request,
294  pses_ucbridge::SetSteering::Response>(
295  "/uc_bridge/set_steering_level",
296  std::bind(ServiceFunctions::setSteeringLevel, std::placeholders::_1,
297  std::placeholders::_2, &com));
298 
299  ros::ServiceServer setUSService =
300  nh.advertiseService<pses_ucbridge::SetUS::Request,
301  pses_ucbridge::SetUS::Response>(
302  "/uc_bridge/set_us",
303  std::bind(ServiceFunctions::setUS, std::placeholders::_1,
304  std::placeholders::_2, &com));
305 
306  ros::ServiceServer toggleBrakesService =
307  nh.advertiseService<pses_ucbridge::ToggleBrakes::Request,
308  pses_ucbridge::ToggleBrakes::Response>(
309  "/uc_bridge/toggle_brakes",
310  std::bind(ServiceFunctions::toggleBrakes, std::placeholders::_1,
311  std::placeholders::_2, &com));
312 
313  ros::ServiceServer toggleDAQService =
314  nh.advertiseService<pses_ucbridge::ToggleDAQ::Request,
315  pses_ucbridge::ToggleDAQ::Response>(
316  "/uc_bridge/toggle_daq",
317  std::bind(ServiceFunctions::toggleDAQ, std::placeholders::_1,
318  std::placeholders::_2, &com));
319 
320  ros::ServiceServer toggleDMSService =
321  nh.advertiseService<pses_ucbridge::ToggleDMS::Request,
322  pses_ucbridge::ToggleDMS::Response>(
323  "/uc_bridge/toggle_dms",
324  std::bind(ServiceFunctions::toggleDMS, std::placeholders::_1,
325  std::placeholders::_2, &com));
326 
327  ros::ServiceServer toggleGroupService =
328  nh.advertiseService<pses_ucbridge::ToggleGroup::Request,
329  pses_ucbridge::ToggleGroup::Response>(
330  "/uc_bridge/toggle_group",
331  std::bind(ServiceFunctions::toggleGroup, std::placeholders::_1,
332  std::placeholders::_2, &com));
333 
334  ros::ServiceServer toggleKinectService =
335  nh.advertiseService<pses_ucbridge::ToggleKinect::Request,
336  pses_ucbridge::ToggleKinect::Response>(
337  "/uc_bridge/toggle_kinect",
338  std::bind(ServiceFunctions::toggleKinect, std::placeholders::_1,
339  std::placeholders::_2, &com));
340 
341  ros::ServiceServer toggleMotorService =
342  nh.advertiseService<pses_ucbridge::ToggleMotor::Request,
343  pses_ucbridge::ToggleMotor::Response>(
344  "/uc_bridge/toggle_motor",
345  std::bind(ServiceFunctions::toggleMotor, std::placeholders::_1,
346  std::placeholders::_2, &com));
347  ros::ServiceServer toggleUSService =
348  nh.advertiseService<pses_ucbridge::ToggleUS::Request,
349  pses_ucbridge::ToggleUS::Response>(
350  "/uc_bridge/toggle_us",
351  std::bind(ServiceFunctions::toggleUS, std::placeholders::_1,
352  std::placeholders::_2, &com));
353 
354  // create control subscribers e.g. steering, motorlevel etc.
355  ros::Subscriber motorLevelSubscriber = nh.subscribe<std_msgs::Int16>(
356  "/uc_bridge/set_motor_level_msg", 1,
357  boost::bind(uc_bridge::motorLevelCallback, _1, &com));
358  ros::Subscriber steeringLevelSubscriber = nh.subscribe<std_msgs::Int16>(
359  "/uc_bridge/set_steering_level_msg", 1,
360  boost::bind(uc_bridge::steeringLevelCallback, _1, &com));
361  // raw mode subscriber
362  ros::Subscriber ucBoardMsgSubscriber;
363  if (rawComOn)
364  ucBoardMsgSubscriber = nh.subscribe<std_msgs::String>(
365  "/uc_bridge/send_uc_board_msg", 10,
366  boost::bind(uc_bridge::ucBoardMessageCallback, _1, &com));
367 
368  // register shut down signal handler
369  signal(SIGINT, uc_bridge::shutdownSignalHandler);
370 
371  ros::spin();
372  return 0;
373 }
void motorLevelCallback(std_msgs::Int16::ConstPtr motorLevel, Communication *com)
This function will be called whenever a ros node published a message on the motor level topic...
Definition: uc_bridge.h:470
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...
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...
void startCommunication()
Start reading the serial input buffer and start parsing threads.
void registerSensorGroups(Communication *com)
This function will trigger the registration of all predefined sensor groups on the serial device...
Definition: uc_bridge.h:89
void textCallback(const std::string &msg)
This function will be called whenever the communication received a plain text message which will be p...
Definition: uc_bridge.h:441
void shutdownSignalHandler(int sig)
This function is the callback for the shutdown system signal.
Definition: uc_bridge.h:64
void enableRawCommunication()
Enables the transmission of raw messages to the serial device.
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...
void ucBoardMessageCallback(std_msgs::String::ConstPtr msg, Communication *com)
This function will be called whenever a ros node published a message on the raw communication topic...
Definition: uc_bridge.h:541
void connect()
Tries to setup a connection to a serial devive with a certain device-tag and specified baudrate...
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...
void activateSteeringController(Communication *com)
This function will activate the steering controller of the serial device.
Definition: uc_bridge.h:134
void publishSensorGroupMessage2(SensorGroup *grp, std::unordered_map< std::string, ros::Publisher * > &pub)
This function will be called whenever a message from sensor group 2 has been received and publish the...
Definition: uc_bridge.h:290
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...
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...
void publishSensorGroupMessage3(SensorGroup *grp, std::unordered_map< std::string, ros::Publisher * > &pub)
This function will be called whenever a message from sensor group 3 has been received and publish the...
Definition: uc_bridge.h:322
void registerErrorCallback(debugCallbackPtr error)
Register a callback to handle transmission/communication errors.
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...
void publishSensorGroupMessage1(SensorGroup *grp, std::unordered_map< std::string, ros::Publisher * > &pub)
This function will be called whenever a message from sensor group 1 has been received and publish the...
Definition: uc_bridge.h:236
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.
void enableDebugMessages(debugCallbackPtr debug)
Enable pass through of every line in the input buffer.
void registerTextCallback(debugCallbackPtr text)
Register a callback to handle plain text messages from the serial device.
void registerSensorGroupCallback(const unsigned char &grpNumber, responseCallback cbPtr)
Register a callback to handle sensor group messages from the serial device.
void activateUS(Communication *com)
This function will activate the ultra sonic range sensors of the serial device.
Definition: uc_bridge.h:184
int main(int argc, char **argv)
Definition: uc_bridge.cpp:9
Header file for the uc_bridge node.
Communication * com_ptr
Definition: uc_bridge.h:35
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 errorCallback(const std::string &msg)
This function will be called whenever a communication error occured and post its content as a ROS War...
Definition: uc_bridge.h:432
void activateKinect(Communication *com)
This function will activate the kinect power supply of the serial device.
Definition: uc_bridge.h:160
void activateDAQ(Communication *com)
This function will activate the daq of the serial device.
Definition: uc_bridge.h:207
void steeringLevelCallback(std_msgs::Int16::ConstPtr steeringLevel, Communication *com)
This function will be called whenever a ros node published a message on the steering level topic...
Definition: uc_bridge.h:507
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...
void publishSensorGroupMessage5(SensorGroup *grp, std::unordered_map< std::string, ros::Publisher * > &pub)
This function will be called whenever a message from sensor group 5 has been received and publish the...
Definition: uc_bridge.h:377
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...
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...
void activateMotorController(Communication *com)
This function will activate the motor controller of the serial device.
Definition: uc_bridge.h:108
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 rstOnShutdown
Definition: uc_bridge.h:36
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...
void publishSensorGroupMessage6(SensorGroup *grp, std::unordered_map< std::string, ros::Publisher * > &pub)
This function will be called whenever a message from sensor group 6 has been received and publish the...
Definition: uc_bridge.h:409
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...
void publishSensorGroupMessage4(SensorGroup *grp, std::unordered_map< std::string, ros::Publisher * > &pub)
This function will be called whenever a message from sensor group 4 has been received and publish the...
Definition: uc_bridge.h:348
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...
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...
void publishDebugMessage(const std::string &msg, ros::Publisher *pub)
This function will be called whenever the communication received any message if the debug mode is ena...
Definition: uc_bridge.h:453


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