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

Revision history [back]

click to hide/show revision 1
initial version

Hello.

I mostly use a C++, but I think in Python you can write (if your def callback is a subscriber):

def callback(msg):

point = PointStamped()
point.header.stamp = rospy.Time.now()
point.header.frame_id = "/map"
point.point.x = msg.point.x         // access to point data structure and its x, y, z components
point.point.y = msg.point.y
point.point.z = msg.point.z
**rospy.loginfo("coordinates:x=%f y=%f" %(point.point.x, point.point.y))**