Ask Your Question
0

getNamespace returns incorrect namespace

asked 2018-10-18 16:55:58 -0500

debonair gravatar image

updated 2018-10-19 12:50:13 -0500

whenever I call, ros::this_node::getNamespace() it always returns with double slash everywhere.

I have ros::NodeHandle as a member of a class. Then I am creating object of that class inside one static function. Now main() is calling this static function. I ros::Init() inside my main. When I try to query nodehandle.getNameSpace() inside constructor of that class. it returns namespace with extra slash. If I launch node using ns="temp"it returns "//temp". If I pass nodehandle from main() to constructor of that class and use that node handle, then it returns "/temp" which is expected. This is puzzling to me. I am not using private handle here.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-06-11 09:29:20 -0500

130s gravatar image

This question is labeled as kinetic, so my post cannot be an answer though,

the mentioned issue is reported in the development repo and fixed by ros_comm!1100. From ros_comm!1205 I assume the fix has been available in ros_comm 1.13.4 onward. For ROS Kinetic, where the last release of ros_comm seems younger than according to its changelog, the fix is unlikely available. You could try manually applying the PR ros_comm!1100.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-10-18 16:55:58 -0500

Seen: 173 times

Last updated: Jun 11