Difference between revisions of "Getting Started with ROS on Embedded Systems/User Guide/C++/Names"
Rgutierrez (talk | contribs) m |
Rgutierrez (talk | contribs) m (Undo revision 37188 by Rgutierrez (talk)) (Tag: Undo) |
||
Line 2: | Line 2: | ||
== Introduction == | == Introduction == | ||
− | This wiki is based on the following page: http://wiki.ros.org/roscpp/Overview/ | + | This wiki is based on the following page: http://wiki.ros.org/roscpp/Overview/Names%20and%20Node%20Information |
− | + | Name manipulation is an important section for ROS, in here you can find useful functions that work well when doing this manipulation | |
− | == | + | == Functions == |
− | |||
− | + | An useful function is the resolve, which lets you create a name with the namespace of the node and a given name, resulting in node_namespace/name | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
− | + | std::string ros::names::resolve(const std::string& name, bool remap = true); | |
− | ros:: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | This is useful when you don't want to have the node name preappended to your topic names. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Another function is the append, which simply appends two strings resulting in left/right | |
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
− | + | std::string ros::names::append(const std::string& left, const std::string& right); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 12:42, 10 November 2021
Getting Started with ROS on Embedded Systems RidgeRun documentation is currently under development. |
Getting Started with ROS on Embedded Systems | |
---|---|
ROS on Embedded Systems Basics | |
|
|
Getting Started | |
|
|
C++ User Guide | |
|
|
Examples | |
|
|
Performance | |
|
|
Contact Us |
Introduction
This wiki is based on the following page: http://wiki.ros.org/roscpp/Overview/Names%20and%20Node%20Information
Name manipulation is an important section for ROS, in here you can find useful functions that work well when doing this manipulation
Functions
An useful function is the resolve, which lets you create a name with the namespace of the node and a given name, resulting in node_namespace/name
std::string ros::names::resolve(const std::string& name, bool remap = true);
This is useful when you don't want to have the node name preappended to your topic names.
Another function is the append, which simply appends two strings resulting in left/right
std::string ros::names::append(const std::string& left, const std::string& right);