ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Is there a C++ equivalent of rosgraph.names.ns_join

asked 2021-12-02 13:02:37 -0500

Peter_Mitrano gravatar image

title says it all

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-12-03 06:22:41 -0500

osilva gravatar image

Is there a C++ equivalent of rosgraph.names.ns_join?

Not really. If you look at the source code for names.cppfound at: https://docs.ros.org/en/indigo/api/ro...

std::string ros::names::append  (   const std::string &     left, const std::string &   right  )         Append one name to another.

Definition at line 118 of file names.cpp.

the append()is not an equivalent to ns_join() found in module rosgraph.nameshttps://docs.ros.org/en/kinetic/api/r...

ns_join(ns, name)
source code 
Join a namespace and name. If name is unjoinable (i.e. ~private or /global) it will be returned without joining

    Parameters: ns (str) - namespace ('/' and '~' are both legal). If ns is the empty string, name will be returned. name, str - a legal name Returns: str
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-12-02 13:02:37 -0500

Seen: 72 times

Last updated: Dec 03 '21