<span style="font-family: Tahoma; font-size: 10pt">@Blaise and Josh:<br />
Thanks for your help.<br />
Its working now! I have made few changes by removing callback and straight away writing a code like below:<br />
<br />
 geometry_msgs::PoseWithCovarianceStampedConstPtr msg = ros::topic::waitForMessage<geometry_msgs::PoseWithCovarianceStamped>("amcl_pose");<br />
<br />
   ROS_INFO("Received X:[%f] :: Y:[%f] :: Z:[%f] ", msg->pose.pose.position.x, msg->pose.pose.position.y, msg->pose.pose.position.z);<br />
<br />
- Prasad <br />
<br />
<div id="divSignature"></div></span>