[ros-users] Determine message sender

Ken Conley kwc at willowgarage.com
Mon Sep 20 16:25:03 UTC 2010


The info is stored in the "connection header". Both rospy and roscpp
provide access to this data. In rospy, it is simply the
._connection_header field. In roscpp, you use MessageEvent, described
in the overview here:

http://www.ros.org/wiki/roscpp/Overview/Publishers%20and%20Subscribers#MessageEvent_.5BROS_1.1.2B-.5D

 - Ken

On Mon, Sep 20, 2010 at 8:44 AM, Axelrod, Benjamin <baxelrod at irobot.com> wrote:
> Is there any way for the receiver of a message to know who sent the
> message?  I looked through the generated header file for a message and I
> didn’t see any meta data like this.  But I believe the core should know it
> on some level, and it would be great to have this info.
>
>
>
> Thanks,
>
> -Ben
>
>
>
> Ben Axelrod
>
> Research Scientist
>
> iRobot Corporation
>
> 8 Crosby Drive, Mail Stop 8-1
>
> Bedford, MA 01730
>
> (781) 430-3315 (Tel)
>
> (781) 960-2628 (Fax)
>
> baxelrod at irobot.com
>
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>



More information about the ros-users mailing list