mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 10:00:48 +02:00
Included a position-based controller. Also prettied up printing
This commit is contained in:
50
src/do_output.cpp
Normal file
50
src/do_output.cpp
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* do_output.cpp
|
||||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
* "THE BEER-WARE LICENSE" (Revision 42):
|
||||
* <thomas.timm.dk@gmail.com> wrote this file. As long as you retain this notice you
|
||||
* can do whatever you want with this stuff. If we meet some day, and you think
|
||||
* this stuff is worth it, you can buy me a beer in return. Thomas Timm Andersen
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "ur_modern_driver/du_output.h"
|
||||
|
||||
void print_debug(std::string inp) {
|
||||
#ifdef ROS_BUILD
|
||||
ROS_DEBUG(inp);
|
||||
#else
|
||||
printf("DEBUG: %s\n", inp.c_str());
|
||||
#endif
|
||||
}
|
||||
void print_info(std::string inp) {
|
||||
#ifdef ROS_BUILD
|
||||
ROS_INFO(inp);
|
||||
#else
|
||||
printf("INFO: %s\n", inp.c_str());
|
||||
#endif
|
||||
}
|
||||
void print_warning(std::string inp) {
|
||||
#ifdef ROS_BUILD
|
||||
ROS_WARN(inp);
|
||||
#else
|
||||
printf("WARNING: %s\n", inp.c_str());
|
||||
#endif
|
||||
}
|
||||
void print_error(std::string inp) {
|
||||
#ifdef ROS_BUILD
|
||||
ROS_ERROR(inp);
|
||||
#else
|
||||
printf("ERROR: %s\n", inp.c_str());
|
||||
#endif
|
||||
}
|
||||
void print_fatal(std::string inp) {
|
||||
#ifdef ROS_BUILD
|
||||
ROS_FATAL(inp);
|
||||
ros::shutdown();
|
||||
#else
|
||||
printf("FATAL: %s\n", inp.c_str());
|
||||
exit(1);
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user