ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

ROS msg get seqence number || pointer adress allways added

asked 2013-02-04 03:53:17 -0600

HanSolow gravatar image

updated 2014-01-28 17:15:05 -0600

ngrennan gravatar image

Hi I have a problem with ROS and messages especially.

void recievedGoals_callback(const boost::shared_ptr<nav_msgs::Path const>& msg)
               std::cerr << "header seq   " << msg->header.seq << std::cerr;

The return of this is something like "header seq 150x6297a8" and not the sequence-number i published (15)

Why? - Why is a pointer-adress added? How can I get rid of this adress?

The subscriber is:

ros::Subscriber sub_PathToGoal = n.subscribe<nav_msgs::Path>("/Exp/Goal", 1, boost::bind(recievedGoals_callback, _1), ros::VoidConstPtr(),ros::TransportHints().tcpNoDelay());


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-02-04 04:19:58 -0600

dornhege gravatar image

updated 2013-02-04 04:20:32 -0600

You are outputting std::cerr as the last value. That is the pointer variable being added.

I guess you want std::endl instead.

edit flag offensive delete link more


doh you were absolutely right. That solved it. Thanks!

HanSolow gravatar image HanSolow  ( 2013-02-04 23:29:57 -0600 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2013-02-04 03:53:17 -0600

Seen: 147 times

Last updated: Feb 04 '13