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

What is rostopic for geometry_msg::posestamped ?

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

rishabhdeadpool gravatar image

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

Hamid Didari gravatar image

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

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

Question Tools

Stats

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

Seen: 654 times

Last updated: Nov 06 '18