Re: [ros-users] Callback once

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Prasad Dixit
Date:  
To: ros-users
Subject: Re: [ros-users] Callback once
@Blaise and Josh:
Thanks for your help.
Its working now! I have made few changes by removing callback and straight
away writing a code like below:

geometry_msgs::PoseWithCovarianceStampedConstPtr msg =
ros::topic::waitForMessage<geometry_msgs::PoseWithCovarianceStamped>("amcl_p
ose");

ROS_INFO("Received X:[%f] :: Y:[%f] :: Z:[%f] ",
msg->pose.pose.position.x, msg->pose.pose.position.y,
msg->pose.pose.position.z);

- Prasad