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

vpradeep's profile - activity

2022-02-07 04:23:57 -0500 received badge  Good Question (source)
2021-06-30 02:00:04 -0500 received badge  Good Answer (source)
2020-01-16 14:56:14 -0500 received badge  Nice Answer (source)
2019-11-13 15:45:30 -0500 received badge  Guru (source)
2019-03-28 03:28:34 -0500 received badge  Good Answer (source)
2018-12-06 00:44:47 -0500 received badge  Famous Question (source)
2018-11-04 14:56:03 -0500 received badge  Famous Question (source)
2018-06-07 22:06:19 -0500 commented answer What's the difference between PointCloudConstPtr and PointCloud::ConstPtr

Makes sense. You're right that PointCloud::ConstPtr uses std::allocator<void>, and hence they're the same. I gue

2018-06-07 22:03:32 -0500 marked best answer What's the difference between PointCloudConstPtr and PointCloud::ConstPtr

In subscriber callbacks our software stack uses a mixture of two function signatures. In the case of subscribing to a sensor_msgs::PointCloud, we use the following two signatures:

  1. void callback(const sensor_msgs::PointCloud::ConstPtr& msg)
  2. void callback(const sensor_msgs::PointCloudConstPtr& msg)

These are both defined in the autogenerated header PointCloud.h

template <class ContainerAllocator>
struct PointCloud_
{
  // ---- Snip ----
  typedef boost::shared_ptr< ::sensor_msgs::PointCloud_<ContainerAllocator> const> ConstPtr;
};
typedef ::sensor_msgs::PointCloud_<std::allocator<void> > PointCloud;

typedef boost::shared_ptr< ::sensor_msgs::PointCloud > PointCloudPtr;
typedef boost::shared_ptr< ::sensor_msgs::PointCloud const> PointCloudConstPtr;

Expanding the typedefs myself, I get the following

  1. sensor_msgs::PointCloud::ConstPtr

    boost::shared_ptr< ::sensor_msgs::PointCloud_<ContainerAllocator> const>

  2. sensor_msgs::PointCloudConstPtr
    boost::shared_ptr< ::sensor_msgs::PointCloud_<std::allocator<void> > const>

It's not clear to me what ContainerAllocator gets set to in case 1, and I'm also not sure what the purpose of ContainerAllocater is. Why would I choose one incantation over the other?

2018-06-07 22:03:24 -0500 received badge  Notable Question (source)
2018-06-07 16:10:44 -0500 received badge  Nice Question (source)
2018-06-07 13:15:15 -0500 received badge  Popular Question (source)
2018-06-07 12:01:44 -0500 received badge  Nice Question (source)
2018-06-07 11:21:23 -0500 asked a question What's the difference between PointCloudConstPtr and PointCloud::ConstPtr

What's the difference between PointCloudConstPtr and PointCloud::ConstPtr In subscriber callbacks our software stack use

2018-06-06 09:50:39 -0500 commented answer Why doesn't costmap clear the old obstacles outside the scanner scope?

FYI - I just submitted a PR that adds an obstacle_timeout parameter to voxel_layer, which removes obstacles from the vox

2018-04-25 01:52:52 -0500 received badge  Notable Question (source)
2018-04-03 08:19:03 -0500 received badge  Favorite Question (source)
2018-04-03 01:27:57 -0500 received badge  Popular Question (source)
2018-04-02 18:14:33 -0500 answered a question Tools for scripting professional-ish sensor data videos

Accidental duplicate of https://answers.ros.org/question/287323/best-practices-for-professionalish-robot-viz-videos/

2018-04-02 17:59:58 -0500 edited question Best practices for professional(ish) robot viz videos

Best practices for professional(ish) robot viz videos I'm trying to generate a high quality video of ROS sensor data &am

2018-04-02 17:58:52 -0500 asked a question Best practices for professional(ish) robot viz videos

Best practices for professional(ish) robot viz videos I'm trying to generate a high quality video of ROS sensor data &am

2018-04-02 17:57:37 -0500 asked a question Tools for scripting professional-ish sensor data videos

Tools for scripting professional-ish sensor data videos I'm trying to generate a high quality video of ROS sensor data &

2017-11-24 10:32:25 -0500 received badge  Great Answer (source)
2017-09-27 06:15:01 -0500 received badge  Guru (source)
2017-09-27 06:15:01 -0500 received badge  Great Answer (source)
2017-05-30 04:02:02 -0500 received badge  Great Question (source)
2016-12-08 19:05:22 -0500 received badge  Good Answer (source)
2015-03-15 20:54:32 -0500 received badge  Good Answer (source)
2014-12-12 23:33:20 -0500 received badge  Good Answer (source)
2014-04-20 06:52:39 -0500 marked best answer Unexpected delay in rospy subscriber

I'm trying to do some image processing in a python subscriber callback, and I'm seeing some unexpected latency in the system. It seems that even though I subscribe to a topic with queue_size=1, I still receive old messages. Also, when I remove the sleep(1.0) call from my listener callback, I get Delay: 0.019, which is the expected result.

See code snippets below:

talker.py

#!/usr/bin/env python
import roslib; roslib.load_manifest('sensor_msgs')
import rospy
from sensor_msgs.msg import Image

rospy.init_node('talker')
pub = rospy.Publisher('chatter', Image)
while not rospy.is_shutdown():
    msg = Image()
    msg.data = [0]*(640*480)
    msg.header.stamp = rospy.Time.now()
    pub.publish(msg)
    rospy.sleep(0.05)

listener.py

#!/usr/bin/env python
import roslib; roslib.load_manifest('sensor_msgs')
import rospy
from sensor_msgs.msg import Image

def imageCb(msg):
    print "Delay:%6.3f" % (rospy.Time.now() - msg.header.stamp).to_sec()
    rospy.sleep(1.0)

rospy.init_node('listener')
sub = rospy.Subscriber('chatter', Image, imageCb, queue_size=1)
rospy.spin()

When I run both nodes, listener.py outputs the following:

Delay: 0.023
Delay: 0.950
Delay: 1.879
Delay: 1.950
Delay: 2.876
Delay: 3.805
Delay: 4.733
Delay: 5.657
Delay: 5.954
Delay: 5.954
Delay: 6.882
Delay: 6.916
Delay: 6.917
Delay: 6.918
Delay: 6.916
Delay: 6.917

Is this a bug in rospy? Or, maybe there's some other Subscriber option that I should be using?

This is on Lucid/Fuerte system.

Thanks!

2014-04-20 06:47:49 -0500 marked best answer Looking for an existing ROS + Qt example

I'm currently building a remote cockpit/basestation for my robot, and I was considering using ROS and Qt to do it. I have a lot of experience using ROS, but this is definitely one of my first times using Qt. We're fairly committed to Qt, but we're still trying to decide on a backend for our app. ROS is definitely one potential option, assuming it slots in nicely with Qt.

The closest thing I've found to a ROS/Qt quickstart guide was (http://www.ros.org/wiki/eros_python_tools/roscreate_qt_pkg), but I was really looking for was a an existing ROS Qt package or application that I could run.

Does someone have an existing [and fairly crisp] ROS Qt application that they could point me to?

2014-03-27 02:19:30 -0500 marked best answer Looking for a USB Mixer ROS interface

I'm interested in using a Motorized USB Audio Mixer to control my ROS based system. One example mixer would be the Behringer BCF2000. Has anyone built a ROS driver for this device or similar USB Mixer/MIDI hardware?

Thanks!