Go to the documentation of this file.
70 void init(
const std::string& name,
const M_string& remappings, uint32_t options);
94 void init(
const std::string& name,
const M_string& remappings, uint32_t options)
103 _dupenv_s(&ns_env, NULL,
"ROS_NAMESPACE");
105 ns_env = getenv(
"ROS_NAMESPACE");
122 bool disable_anon =
false;
123 M_string::const_iterator it = remappings.find(
"__name");
124 if (it != remappings.end())
130 it = remappings.find(
"__ns");
131 if (it != remappings.end())
145 std::stringstream ss;
146 ss <<
"Namespace [" <<
namespace_ <<
"] is invalid: " << error;
154 if (
name_.find(
"/") != std::string::npos)
158 if (
name_.find(
"~") != std::string::npos)
168 std::snprintf(buf,
sizeof(buf),
"_%llu", (
unsigned long long)
WallTime::now().toNSec());
@ AnonymousName
Anonymize the node name. Adds a random number to the end of your node's name, to make it unique.
const ROSCPP_DECL std::string & getNamespace()
Returns the namespace of the current node.
void init(const std::string &name, const M_string &remappings, uint32_t options)
ROSCPP_DECL std::string clean(const std::string &name)
Cleans a graph resource name: removes double slashes, trailing slash.
ROSCPP_DECL bool validate(const std::string &name, std::string &error)
Validate a name against the name spec.
ROSCPP_DECL std::string resolve(const std::string &name, bool remap=true)
Resolve a graph resource name into a fully qualified graph resource name.
void init(const M_string &remappings)
static ThisNode & instance()
void init(const std::string &names, const M_string &remappings, uint32_t options)
const std::string & getNamespace() const
Thrown when an invalid node name is specified to ros::init()
ROSCONSOLE_DECL void setFixedFilterToken(const std::string &key, const std::string &val)
const ROSCPP_DECL std::string & getName()
Returns the name of the current node.
static const TopicManagerPtr & instance()
ROSCPP_DECL void getAdvertisedTopics(V_string &topics)
Get the list of topics advertised by this node.
Thrown when an invalid graph resource name is specified to any roscpp function.
std::vector< std::string > V_string
ROSCPP_DECL void getSubscribedTopics(V_string &topics)
Get the list of topics subscribed to by this node.
const std::string & getName() const
std::map< std::string, std::string > M_string
roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas
, Jacob Perron
autogenerated on Sat Sep 14 2024 02:59:36