MCPcopy Create free account
hub / github.com/LimHyungTae/patchwork / condParam

Function condParam

include/patchwork/patchwork.hpp:37–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35// locations
36template <typename T>
37bool condParam(ros::NodeHandle *nh,
38 const std::string &param_name,
39 T &param_val,
40 const T &default_val,
41 const std::string &prefix = "/patchwork") {
42 if (nh->hasParam(prefix + "/" + param_name)) {
43 if (nh->getParam(prefix + "/" + param_name, param_val)) {
44 ROS_INFO_STREAM("param '" << prefix << "/" << param_name << "' -> '" << param_val << "'");
45 return true;
46 }
47 } else if (nh->hasParam(ros::this_node::getName() + "/" + param_name)) {
48 if (nh->getParam(ros::this_node::getName() + "/" + param_name, param_val)) {
49 ROS_INFO_STREAM("param '" << ros::this_node::getName() << "/" << param_name << "' -> '"
50 << param_val << "'");
51 return true;
52 }
53 }
54 param_val = default_val;
55 ROS_INFO_STREAM("param '" << param_name << "' -> '" << param_val << "' (default)");
56 return false;
57}
58
59#define NUM_HEURISTIC_MAX_PTS_IN_PATCH 3000
60#define MARKER_Z_VALUE -2.2

Callers 1

PatchWorkMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected