Go to the documentation of this file. 1 #pragma warning(disable: 4996)
2 #pragma warning(disable: 4267)
4 #define _USE_MATH_DEFINES
9 #include "ros/forwards.h"
10 #include "ros/publisher.h"
11 #include "ros/subscriber.h"
12 #include "ros/service_server.h"
13 #include "ros/service_client.h"
14 #include "ros/timer.h"
16 #include "ros/wall_timer.h"
17 #include "ros/advertise_options.h"
18 #include "ros/advertise_service_options.h"
19 #include "ros/subscribe_options.h"
20 #include "ros/service_client_options.h"
21 #include "ros/timer_options.h"
22 #include "ros/wall_timer_options.h"
23 #include "ros/spinner.h"
29 #include <xmlrpcpp/XmlRpcValue.h>
42 std::map<std::string, std::string>::const_iterator find =
mMapString.find(tag);
53 std::string
getVal(std::string tag)
const
56 std::map<std::string, std::string>::const_iterator find =
mMapString.find(tag);
65 void setVal(std::string tag, std::string val)
119 sprintf(szTmp,
"%d",
d);
120 single.
setVal(key, szTmp);
127 sprintf(szTmp,
"%le",
d);
128 single.
setVal(key, szTmp);
136 single.
setVal(key, b ?
"true" :
"false");
162 sscanf(
s.c_str(),
"%le", &
dummy);
177 sscanf(
s.c_str(),
"%e", &
dummy);
192 sscanf(
s.c_str(),
"%d", &
dummy);
209 if (
s[0] ==
'1' ||
s[0] ==
't' ||
s[0] ==
'T')
230 void ros::init(
int &,
char * *,
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char> >
const &,
unsigned int)
251 if (
loc &&
loc->level_ >= ros::console::levels::Level::Info)
252 loc->logger_enabled_ =
true;
358 if (msg_level >= ros::console::levels::Level::Info)
360 std::string level_str;
364 level_str =
"[DEBUG]";
367 level_str =
"[Info]";
370 level_str =
"[Warn]";
373 level_str =
"[Error]";
376 level_str =
"[Fatal]";
382 std::cout << level_str <<
": " <<
msg.str() << std::endl;
403 loc->initialized_ =
true;
412 ros::NodeHandle::NodeHandle(
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char> >
const &,
class std::map<
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char> >,
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char> >,
struct std::less<
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char> > >,
class std::allocator<
struct std::pair<
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char> >
const,
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char> > > > >
const &)
435 va_start(arg, format);
436 done = vfprintf(stdout, format, arg);
446 int tmpactive_echos = 1;
447 int tmpEcho_filter = 2;
448 bool tmpauto_reboot =
true;
449 std::string tmpframe_id =
"cloud";
450 std::string scannerName;
451 nhPriv.
getParam(
"name", scannerName);
452 std::string tmphostname =
"192.168.0.232";
453 bool tmpintensity =
false;
454 if (scannerName.compare(
"sick_mrs_1xxx") == 0)
456 tmphostname =
"192.168.0.4";
458 if (scannerName.compare(
"sick_mrs_6xxx") == 0)
461 tmphostname =
"192.168.0.24";
464 double tmpminang = -60 / 180.0 * M_PI;
465 double tmpmaxang = +60 / 180.0 * M_PI;
466 std::string tmpport =
"2112";
467 double tmprange_min = 0.01;
468 double tmprange_max = 25.0;
470 double tmptime_offset = -0.001;
471 double tmptimelimit = 5;
475 nhPriv.
setParam(
"active_echos", tmpactive_echos);
476 nhPriv.
setParam(
"filter_echos", tmpEcho_filter);
477 nhPriv.
setParam(
"auto_reboot", tmpauto_reboot);
478 nhPriv.
setParam(
"hostname", tmphostname);
479 nhPriv.
setParam(
"frame_id", tmpframe_id);
480 nhPriv.
setParam(
"intensity", tmpintensity);
481 nhPriv.
setParam(
"min_ang", tmpminang);
482 nhPriv.
setParam(
"max_ang", tmpmaxang);
484 nhPriv.
setParam(
"range_min", tmprange_min);
485 nhPriv.
setParam(
"range_max", tmprange_max);
487 nhPriv.
setParam(
"time_offset", tmptime_offset);
488 nhPriv.
setParam(
"timelimit", tmptimelimit);
void setParam(const std::string &key, bool b) const
ROSCONSOLE_DECL bool set_logger_level(const std::string &name, levels::Level level)
int rossimu_error(const char *format,...)
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
alternate ROS initialization function.
bool getParam(const std::string &key, bool &b) const
void shutdown()
Unsubscribe the callback associated with this Subscriber.
ROSCPP_DECL void spinOnce()
Process a single round of callbacks.
ROSCPP_DECL void shutdown()
Disconnects everything and unregisters from the master. It is generally not necessary to call this fu...
ServiceServer advertiseService(AdvertiseServiceOptions &ops)
ROSCONSOLE_DECL void initializeLogLocation(LogLocation *loc, const std::string &name, Level level)
std::string getVal(std::string tag) const
void publish(const boost::shared_ptr< M > &message) const
Publisher advertise(AdvertiseOptions &ops)
ROSCPP_DECL bool ok()
Check whether it's time to exit.
ROSCONSOLE_DECL void setLogLocationLevel(LogLocation *loc, Level level)
void init(const M_string &remappings)
void usleep(__int64 usec)
const MapStringSingleton & operator=(const MapStringSingleton &old)
std::map< std::string, std::string > mMapString
void setParam(const std::string &key, const XmlRpc::XmlRpcValue &v) const
Set an arbitrary XML/RPC value on the parameter server.
bool hasParam(const std::string &key) const
bool getParam(const std::string &key, std::string &s) const
Get a string value from the parameter server.
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
bool hasTag(std::string tag)
NodeHandle(const NodeHandle &parent, const std::string &ns)
const ROSCPP_DECL std::string & getName()
Returns the name of the current node.
ROSCONSOLE_DECL void checkLogLocationEnabled(LogLocation *loc)
std::string getTopic() const
bool getParamCached(const std::string &key, bool &b) const
ROSCONSOLE_DECL void initialize()
Don't call this directly. Performs any required initialization/configuration. Happens automatically w...
int rossimu_settings(ros::NodeHandle &nhPriv)
ROSCPP_DECL bool isShuttingDown()
Returns whether or not ros::shutdown() has been (or is being) called.
static MapStringSingleton & Instance()
ROSCPP_DECL void spin()
Enter simple event loop.
ROSCPP_SERIALIZATION_DECL void throwStreamOverrun()
void setVal(std::string tag, std::string val)
ROSCONSOLE_DECL void print(FilterBase *filter, void *logger, Level level, const char *file, int line, const char *function, const char *fmt,...) ROSCONSOLE_PRINTF_ATTRIBUTE(7
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:10