Ask Your Question

ayush_dewan's profile - activity

2019-07-27 06:12:20 -0500 received badge  Famous Question (source)
2017-07-28 03:34:11 -0500 received badge  Good Answer (source)
2017-06-12 09:02:03 -0500 marked best answer Message filter using Approximate time policy. callback function called once..

I want to access images and ultrasound reading from my ardrone parrot. To get readings in synchronized way i tried using message filter with approximate time policy.

image_transport::SubscriberFilter sub(it_,"/out_resize", 110);

message_filters::Subscriber<ardrone_autonomy::navdata_altitude> altitude_sub(nh, "/ardrone/navdata_altitude", 100);

sync_policies::ApproximateTime<sensor_msgs::image,ardrone_autonomy::navdata_altitude> MySyncPolicy;

Synchronizer<mysyncpolicy> sync(MySyncPolicy(200),sub,altitude_sub);

sync.registerCallback(boost::bind(&VideoSource::callback,this, _1, _2));

Callback function

void VideoSource::callback(const sensor_msgs::ImageConstPtr& img_msg,const ardrone_autonomy::navdata_altitude::ConstPtr &msg) {

fprintf(stderr,"inside\n"); alti_raw=*msg; img = *img_msg; is_frame_available = true;


This callback is only called once even though I am receiving continuous messages on both the topics. The difference between timestamps is around 100ms.

Can anyone tell me why this callback is getting called only once..

2017-04-13 07:50:56 -0500 received badge  Nice Answer (source)
2017-02-17 06:16:32 -0500 received badge  Nice Answer (source)
2016-11-30 08:42:58 -0500 received badge  Great Answer (source)
2016-11-30 08:42:58 -0500 received badge  Guru (source)
2016-08-14 01:50:11 -0500 marked best answer How to flush out subscribed messages??

Is it possible to remove messages stored in subscriber queue. For example if I start a new iteration I would want to remove all the message stored in queue which are from previous iteration. Is it possible to do this using any message filters like cache or time sequencer??

2016-05-08 20:50:34 -0500 received badge  Nice Answer (source)
2016-01-25 06:23:51 -0500 received badge  Good Question (source)
2016-01-25 06:23:44 -0500 received badge  Nice Answer (source)
2016-01-20 23:23:49 -0500 received badge  Famous Question (source)
2015-10-14 08:41:24 -0500 received badge  Nice Question (source)
2015-07-08 14:18:23 -0500 received badge  Nice Answer (source)
2015-03-08 14:28:15 -0500 received badge  Taxonomist
2015-03-02 10:54:07 -0500 received badge  Famous Question (source)
2015-02-21 04:59:57 -0500 received badge  Good Answer (source)
2015-01-15 13:35:00 -0500 received badge  Nice Answer (source)
2014-10-17 11:24:10 -0500 received badge  Famous Question (source)
2014-10-17 11:24:10 -0500 received badge  Notable Question (source)
2014-10-02 03:44:26 -0500 received badge  Guru (source)
2014-07-13 21:52:28 -0500 received badge  Self-Learner (source)
2014-04-21 03:29:02 -0500 received badge  Famous Question (source)
2014-04-20 06:53:04 -0500 marked best answer pointcloud_to_laser output value is constant...

I am using pointcloud_to_laser package in fuerte, the output laser range value is constant but when i use the same code in different laptop(electric) it works fine. Does anyone has a possible explanation for this behavior??

2014-04-20 06:53:01 -0500 marked best answer move_base Get plan not working for real time data???

I am using P3dx bot and want to get a plan using move_base Get Plan service, so when I use data like tf and scan messages directly from robot I get the following warning :

[ WARN] [1359052907.140636231]: Could not get robot pose, cancelling reconfiguration
[ WARN] [1359052908.140937352]: Costmap2DROS transform timeout. Current time: 1359052908.1409, global_pose stamp: 1359052907.5267, tolerance: 0.2000

and planning fails, but when i store the data in bag file and then run the code it works fine. Can anyone please help..

2014-04-20 06:50:42 -0500 marked best answer How do estimate AR drone height

I have a AR drone parrot and I use the drone package from Brown university, so is it possible to estimate altitude for drone using the available IMU data in navdata messages...

2014-04-20 06:50:26 -0500 marked best answer installing artoolkit

Whenever I rosmake artoolkit package I get the following error..

  mkdir -p build
  if [ ! -f ARToolKit-SVN-r311.tar.gz.md5sum ]; then echo "Error: Couldn't find md5sum file ARToolKit-SVN-r311.tar.gz.md5sum" && false; fi
  `rospack find rosbuild`/bin/ build/ARToolKit-SVN-r311.tar.gz `awk {'print $1'} ARToolKit-SVN-r311.tar.gz.md5sum`
  [rosbuild] Downloading to build/ARToolKit-SVN-r311.tar.gz...Traceback (most recent call last):
    File "/opt/ros/electric/ros/core/rosbuild/bin/", line 56, in <module>
    File "/opt/ros/electric/ros/core/rosbuild/bin/", line 28, in main
      urllib.urlretrieve(uri, dest)
    File "/usr/lib/python2.7/", line 91, in urlretrieve
      return _urlopener.retrieve(url, filename, reporthook, data)
    File "/usr/lib/python2.7/", line 237, in retrieve
      fp =, data)
    File "/usr/lib/python2.7/", line 205, in open
      return getattr(self, name)(url)
    File "/usr/lib/python2.7/", line 435, in open_https
    File "/usr/lib/python2.7/", line 951, in endheaders
    File "/usr/lib/python2.7/", line 811, in _send_output
    File "/usr/lib/python2.7/", line 773, in send
    File "/usr/lib/python2.7/", line 1158, in connect
      self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
    File "/usr/lib/python2.7/", line 344, in wrap_socket
    File "/usr/lib/python2.7/", line 121, in __init__
    File "/usr/lib/python2.7/", line 283, in do_handshake
  IOError: [Errno socket error] [Errno 1] _ssl.c:499: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

The md5sum file that is shown missing is present in artoolkit directory.

2014-04-20 06:50:17 -0500 marked best answer How to convert an an opencv image using cvBridge??

How do I convert an image I have opened through opencv into sensor_msgs/image??

2014-04-16 05:48:47 -0500 received badge  Notable Question (source)
2014-04-16 05:48:47 -0500 received badge  Popular Question (source)
2014-02-23 14:06:01 -0500 received badge  Notable Question (source)
2014-01-28 17:31:28 -0500 marked best answer How to receive the lastest message stored in subscriber queue??

Is it possible to retrieve the most latest message stored in subscriber queue?? If possible the how??

2014-01-28 17:29:31 -0500 marked best answer Unsubscribing uisng shutdown()

I have a vector of subscribers and each subscriber has same callback function. When i try to clear the vector , code hangs indefinitely. So is there a way to unsubscribe or a way to deallocate the alloted memory.. beside the method mentioned above. I have also tried uisng ros::Subscriber::shutdown to unsubscribe an element of vector and still my code hangs...

2014-01-28 17:29:00 -0500 marked best answer Kinect with turtlebot...

I am running kinect with turtle bot. The value of pointcloud(/camera/rgb/points) and value of("/scan")remains constant. I am not unable to visualize both laser scan and poincloud in rviz. In rviz it shows transformation is correct, it shows the number of messages received which keeps on increasing but in poincloud side panel it says [0] points displayed from [0] messages. The hardware is fine because i have used with different machine and it works fine.