-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Point cloud delayed #9
Comments
PointCloud2 performance has been bad because it is sending base64-encoded data in a JSON string, which is large over the wire, slow to decode, and expensive to convert back to binary data. It is greatly improved as of this ros3djs commit on develop branch which switches to the new CBOR binary encoding. We will also need to use roslibjs of at least this commit on develop branch for binary decoding. We will need to run it against rosbridge_suite of at least 0.10.1 for binary encoding, which is released to melodic and set to be included in the next kinetic sync. I will work out a PR to switch to the new client code once the kinetic sync is released. |
Hi @mvollrath, I've been trying to use the latest Am I missing something obvious? Do I need to do anything specific to use |
You need to use roslibjs from develop branch, things will probably be broken until they release it. |
I think that turtlebot cloud you're trying to use has a different point format, ros3djs seems like it only supports one. Also it's epic huge. |
Note that I could see the pointcloud with I'll give |
There's a different code path for decoding binary vs. base64 PointCloud2 data, for whatever reason. That's probably it works on master but not over CBOR. The PointCloud2 data in the turtlebot thing is malformed. Either the fields are mislabeled or 50% of the data is unused bloat. |
Yes, when I print the data on the console I see a large amount of The pointcloud coming from Turtlebot Gazebo (not ok) has the following metadata:
while the one coming from the Tango device (ok) has the following:
Then, the one coming from Gazebo has twice the point step. I will try viewing the pointcloud in |
Update: I could see the (well formed) pointcloud using I tried again pointcloud2 example with the latest |
roslibjs 0.20.0 doesn't have support for "cbor" decompression, for some reason they made a release last week but only included commits from a year ago. However, ros3djs should have requested "cbor" compression from rosbridge and gotten binary messages back (even though roslibjs couldn't decompress them). In ros3djs develop, "cbor" is the default compression for PointCloud2. So it sounds like it's either the old rosbridge (which would ignore "cbor" compression and use JSON) or the old ros3djs (which would not request "cbor" compression) or both, and when both of those are right, roslibjs 0.20.0 can't decompress it. Since you're looking at the packets over wireshark, see if the client is requesting "cbor" compression in the subscription message and that should help to narrow it down. |
@mvollrath thanks for those hints! Now I'm getting another error when receiving messages:
But at least it seems I got the latest versions of all the tools to play along. I'll try debugging this now. |
Where is that RangeError happening? |
I dug through a bunch of dependencies, forked six repos, and ended up with a working Bower distribution with CBOR point clouds. There is a PR to follow this chain of forks, but will take some more work to get all of the deps released and updated. |
After some debugging I found that the problem is here: In my case The problem is partially solved by RobotWebTools/ros3djs#244, but then the size of doesn't match the dimensions for the
Cool! I gave it a quick shot and it worked for the pointclouds I was testing. I'll take a deeper look; it would be awesome to start sending PRs to the upstream repos so as not to depend on the chain of forks on specific commits as you point out. |
I didn't have the issue with If the pointcloud is larger than |
Glad it's working! I'll be working on getting the upstreams fixed, and I'll test ros3djs some more against max_pts. |
For the record, the tests I ran with a pointcloud coming from a Tango device applying changes mentioned in #13 an |
@athackst , let us know if the latest branch works better for you and we can close this issue. Thanks! |
I'm running TF and points (from a velodyne) and we're seeing a really long lag between the display and true data
The text was updated successfully, but these errors were encountered: