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

ROS msg get seqence number || pointer adress allways added

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

HanSolow gravatar image

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

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());

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

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

dornhege gravatar image

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

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

Comments

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

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

Question Tools

Stats

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

Seen: 168 times

Last updated: Feb 04 '13