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

jdreic's profile - activity

2016-07-13 10:10:07 -0500 received badge  Student (source)
2015-08-13 14:37:34 -0500 received badge  Famous Question (source)
2015-08-13 14:37:34 -0500 received badge  Notable Question (source)
2014-09-12 09:25:31 -0500 received badge  Famous Question (source)
2014-07-15 14:08:52 -0500 received badge  Enthusiast
2014-07-01 05:35:52 -0500 received badge  Notable Question (source)
2014-06-29 07:02:05 -0500 received badge  Popular Question (source)
2014-06-12 10:26:51 -0500 received badge  Popular Question (source)
2014-06-11 13:00:02 -0500 received badge  Editor (source)
2014-06-11 12:47:43 -0500 asked a question Array in message data being read as string

In ROS Hydro, I'm publishing a PointCloud2 message, and reading off the "data" field with a simple subscriber. However, unlike other arrays which I've tried to read before (including the "fields" field, which comes through fine), it is read somehow as a string of seemingly random characters. When I print the data directly from the topic using rostopic echo, it shows up fine. For example:

data: [109, 116, 205, 66, 187, 18, 129, 191, 179, 122, 164, 66, 253, 32, 32, 95]

becomes

data: "bXTNQrsSgb+zeqRC/SAgXw=="

when read using a Python/JavaScript subscriber rather than rostopic echo.

I also discovered that if I read the message object with Python as a whole rather than just the specific "data" field, then it is displayed correctly, and only if I try to separate the field from the object does it behave strangely. The subscriber in JavaScript displays it strangely regardless of separation.

I feel like this might have something to do with the way arrays are encoded for different types (data is a uint8[] and fields is a PointField[]), but it's hard to tell. Does anyone know if this is a bug, or if I'm just missing something?

The PointCloud2 I'm testing on is created from the following pcd file using pcl_ros:

# .PCD v.7 - Point Cloud Data file format
VERSION .7
FIELDS x y z rgb
SIZE 4 4 4 4
TYPE F F F F
COUNT 1 1 1 1
WIDTH 1
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 1
DATA ascii
1.027273914e+02 -1.008384056e+00 8.223965048e+01 1.15385e+19

Thanks!

2014-06-05 14:48:20 -0500 asked a question Displaying point cloud in browser

I've been looking into displaying a point cloud in the browser using ros3djs and rosbridge. There's a tutorial for streaming point cloud data from a Kinect, but I just want to take a pointcloud2 message and render it with ros3djs. As documented, it seems like it can only take a stream directly from a camera, but is there a way within the current framework to just display directly from a pointcloud2 message?