Ask Your Question

rune's profile - activity

2012-12-09 21:28:10 -0500 received badge  Taxonomist
2012-09-12 08:43:39 -0500 received badge  Famous Question (source)
2012-09-12 08:43:39 -0500 received badge  Popular Question (source)
2012-09-12 08:43:39 -0500 received badge  Notable Question (source)
2012-08-20 05:32:49 -0500 received badge  Famous Question (source)
2012-08-06 00:35:48 -0500 received badge  Notable Question (source)
2012-07-03 12:18:55 -0500 received badge  Student (source)
2012-04-08 12:57:07 -0500 received badge  Popular Question (source)
2012-02-29 22:11:28 -0500 commented question pause functionality in rosbag play?

If anyone else is interested, as a temporary solution, I ended up spawning rosbag by using p = subprocess.Popen() and p.stdin.write(). This works, but a rosbag API would still be preferred :)

2012-02-29 06:26:40 -0500 asked a question pause functionality in rosbag play?

The rosbag wiki says 'The main new feature being planned for rosbag is the addition of a ROS API for interacting with the playing and recording nodes via service calls.'... I was wondering what the status on this is? Will this be added any time soon?

At the moment I am running rosbag play through the roslaunch api, and I would like to have a way to pause/resume the playback through a GUI I have. Apparently, by running the rosbag application externally, you can press space to pause, but this does not really work for me. Any ideas how to do this? For instance like sending a 'space' input to the rosbag node...?

For the record I am using python at the moment.

2011-10-15 21:52:18 -0500 received badge  Supporter (source)
2011-10-15 21:52:16 -0500 commented answer error when subscribing to /camera/depth/points
It worked. Thanks!
2011-10-14 01:35:33 -0500 marked best answer error when subscribing to /camera/depth/points

To clarify fergs' answer, it looks like you've done

#include <pcl/point_cloud.h>
#include <pcl/point_types.h>

but not

#include <pcl_ros/point_cloud.h>

The pcl/XXX headers define pcl::PointCloud and pcl::PointXYZ types used by PCL. However, PCL is a stand-alone library that knows nothing about ROS. If you include only those headers, ROS doesn't know what to do with pcl::PointCloud, because it's not a native ROS message type. Thus the ROS serialization code barfs.

pcl_ros/point_cloud.h contains the glue code that tells ROS how to serialize/deserialize pcl::PointCloud. This code serializes pcl::PointCloud into exactly the same over-the-wire format as the ROS-native sensor_msgs/PointCloud2 message type, which is why you can use them interchangeably in your subscriber code.

If you exactly cut-and-paste the subscribing example, does it work?

2011-10-14 01:35:33 -0500 received badge  Scholar (source)
2011-10-14 01:35:15 -0500 commented answer error when subscribing to /camera/depth/points
Ah, how silly. I have indeed forgot to include pcl_ros/point_cloud.h. I am not able to test this at the moment, but I'm sure this will help. Thanks! I'll post an update when I have actually made sure it works
2011-10-13 06:49:24 -0500 asked a question error when subscribing to /camera/depth/points

Hello, I am currently running ros electric on Ubuntu 10.04, using a Kinect sensor and trying to subscribe to the /camera/depth/points topic published by openni_launch. Doing it the following way works:

cloudsub = n.subscribe <sensor_msgs::PointCloud2> ("/camera/depth/points", 1, cloudcb);

However, when trying to subscribe to it as follows:

cloudsub = n.subscribe <pcl::PointCloud<pcl::PointXYZ> > ("/camera/depth/points", 1, cloudcb);

I get the error message below:

In file included from /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include/ros/serialization.h:37,
             from /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/publisher.h:34,
             from /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:32,
             from /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/ros.h:45,
             from /home/rune/ros_workspace/hand_tracker/src/segment.cpp:1:
/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include/ros/message_traits.h: In static member function ‘static const char* ros::message_traits::MD5Sum<M>::value() [with M = pcl::PointCloud<pcl::PointXYZ>]’:
/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include/ros/message_traits.h:228:   instantiated from ‘const char* ros::message_traits::md5sum() [with M = pcl::PointCloud<pcl::PointXYZ>]’
/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/subscribe_options.h:110:   instantiated from ‘void ros::SubscribeOptions::init(const std::string&, uint32_t, const boost::function<void(const boost::shared_ptr<const M>&)>&, const boost::function<boost::shared_ptr<X>()>&) [with M = pcl::PointCloud<pcl::PointXYZ>]’
/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:665:   instantiated from ‘ros::Subscriber ros::NodeHandle::subscribe(const std::string&, uint32_t, void (*)(const boost::shared_ptr<const M>&), const ros::TransportHints&) [with M = pcl::PointCloud<pcl::PointXYZ>]’
/home/rune/ros_workspace/hand_tracker/src/segment.cpp:216:   instantiated from here
/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include/ros/message_traits.h:121: error: ‘__s_getMD5Sum’ is not a member of ‘pcl::PointCloud<pcl::PointXYZ>’
/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include/ros/message_traits.h: In static member function ‘static const char* ros::message_traits::DataType<M>::value() [with M = pcl::PointCloud<pcl::PointXYZ>]’:
/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include/ros/message_traits.h:237:   instantiated from ‘const char* ros::message_traits::datatype() [with M = pcl::PointCloud<pcl::PointXYZ>]’
/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/subscribe_options.h:111:   instantiated from ‘void ros::SubscribeOptions::init(const std::string&, uint32_t, const boost::function<void(const boost::shared_ptr<const M>&)>&, const boost::function<boost::shared_ptr<X>()>&) [with M = pcl::PointCloud<pcl::PointXYZ>]’
/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:665:   instantiated from ‘ros::Subscriber ros::NodeHandle::subscribe(const std::string&, uint32_t, void (*)(const boost::shared_ptr<const M>&), const ros::TransportHints&) [with M = pcl::PointCloud<pcl::PointXYZ>]’
/home/rune/ros_workspace/hand_tracker/src/segment.cpp:216:   instantiated from here
/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include/ros/message_traits.h:138: error: ‘__s_getDataType’ is not a member of ‘pcl::PointCloud<pcl::PointXYZ>’
In file included from /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include ...
(more)