Ask Your Question
0

What is rostopic for geometry_msg::posestamped ?

asked 2018-11-06 07:40:33 -0600

I want to write a cpp code to publish geometry_msg::posestamped. what rostopic should i write in the place of "chatter" in the code ? ros::Publisher local_pos_pub = n.advertise<geometry_msgs::posestamped> ("chatter", 2);

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-11-06 07:56:05 -0600

hamid gravatar image

updated 2018-11-06 07:56:40 -0600

hi
in this code

ros::Publisher local_pos_pub = n.advertise<geometry_msgs::posestamped> ("chatter", 2);

chatter is the name of topic and you can change to what you want in this part "advertise<geometry_msgs::posestamped> " you set the msg type in this case is geometry_msgs::posestamped

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

Stats

Asked: 2018-11-06 07:40:33 -0600

Seen: 45 times

Last updated: Nov 06 '18