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 -0600

SumitP gravatar image

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

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 imagegvdhoorn ( 2017-11-03 11:45:49 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

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

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 imageSumitP ( 2017-11-09 02:42:20 -0600 )edit

Question Tools



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

Seen: 67 times

Last updated: Nov 08 '17