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

is it possible to change name ros::Publisher to xyz::Publishernew in talker.cpp node? [closed]

asked 2017-11-02 05:40:59 -0500

SumitP gravatar image

updated 2017-11-03 02:56:59 -0500

I want to change the name ros::Publisher to xyz::Publishernew. Is it possible?

Thank you for your answer in advance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by SumitP
close date 2017-11-10 09:23:15.234557



On first thought this seems like a strange thing to do. Could you perhaps tell us why you're looking to do that?

gvdhoorn gravatar image gvdhoorn  ( 2017-11-03 11:45:49 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-11-08 15:33:03 -0500

Wolf gravatar image

I don't See any reason for doing this, but yes you can so this:

namespace xyz
      typedef ros:: Publisher Publishernew;

ros::Publisher one_ros_publisher_object;

xyz::Publishernew yet_another_ros_publisher_object;
edit flag offensive delete link more


Ahh That's Great. thank you.

SumitP gravatar image SumitP  ( 2017-11-09 02:42:20 -0500 )edit

Question Tools



Asked: 2017-11-02 05:40:59 -0500

Seen: 135 times

Last updated: Nov 08 '17